Practical overview
When it fits
Use it when an image-classification project needs a Keras DenseNet implementation and the desired next step is model construction or configuration, rather than a hosted prediction service.
Who it is for
- Researchers and developers building or comparing DenseNet image-classification models.
- Keras users who want to configure depth, growth rate, bottleneck use or reduction.
- Practitioners who want to start from one of the documented ImageNet DenseNet variants.
Documented uses
- Construct a custom DenseNet model with chosen input dimensions and architecture parameters.
- Compare standard and bottleneck-compressed DenseNet configurations.
- Create a DenseNet-121, -161 or -169 ImageNet model using the repository's available pretrained weights.
Requirements & limits
The repository is public and licensed under MIT.
- The listed dependencies are Keras, h5Py and a supported backend; the README identifies TensorFlow as tested.
- The examples support both channels-first and channels-last input shapes.
- Pretrained weights are listed for DenseNet-121, -161 and -169 and are described as downloading when first called.
- The documentation covers model construction but not a full training, inference or evaluation workflow.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Construct a custom DenseNet model
Create a configurable Keras DenseNet using the repository's documented constructor.
Before you start
- Python
- Keras
- h5Py
- A backend: TensorFlow, Theano or CNTK
- An input image shape and number of classes
Steps
Import the repository's densenet module.
Choose an input shape in channels-first or channels-last order.
Call DenseNet with the class count, input shape, depth and growth rate; set bottleneck and reduction options as needed.
Expected outcome
A custom DenseNet model object configured with the selected dimensions and architecture parameters.
Guide limitations
- The documented example constructs the model; it does not cover training or inference.
- The README marks TensorFlow as tested; it says weights were not tested with Theano or CNTK.
Load a documented ImageNet DenseNet variant
Construct one of the repository's listed ImageNet DenseNet models.
Before you start
- Python
- Keras
- h5Py
- A backend: TensorFlow, Theano or CNTK
- An ImageNet input shape, shown as 224 by 224 with either channel ordering
Steps
Import the repository's densenet module.
Choose an ImageNet constructor, such as DenseNetImageNet121, and provide the input shape.
Call the constructor; the README says available weights for the 121, 161 and 169 variants are downloaded when first called.
Expected outcome
An ImageNet DenseNet model object; the listed variants have weights available from the repository's releases.
Guide limitations
- The README says weights were not tested with Theano or CNTK.
- The documented example does not cover inference or evaluation.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 7 November 2026
- Original website title
- titu1994/DenseNet · Official homepage title · retained in its source language

