An implementation of densenet in low level tensorflow API. Focus on performance, scalability and stability.
No tf.slim
No tf.layers
No tf.contrib
No opencv
Current graph is a variation of DenseNet-BC-121 with 224 input image size, the difference is that there's 52 convolutional layers in this implementation.
With this repo., you are able to train and test the architecture from scratch.
More sophisticated features are still under construction.
Support tfrecord
With minimum dependencies
numpy
- Clone the repo:
git clone https://github.com/yeephycho/densenet-tensorflow.git
- Download example tfrecord data: Click here to download. About how to generate tfrecord, please see repo. or see the script from tensorflow build image data.
Data comes from tensorflow inception retraining example which contains 5 kinds of flowers, click here to download original data.
- Train example data:
cd densenet-tensorflow
python train.py
- Visualize training loss:
tensorboard --logdir=./log
- Test model: A pre-trained model can be download here. Put the models folder under this project folder. Then
python test.py
Hopefully the pre-trained model should give you a precision of 80.3%.