All Projects → calmisential → Basic_cnns_tensorflow2

calmisential / Basic_cnns_tensorflow2

Licence: mit
A tensorflow2 implementation of some basic CNNs(MobileNetV1/V2/V3, EfficientNet, ResNeXt, InceptionV4, InceptionResNetV1/V2, SENet, SqueezeNet, DenseNet, ShuffleNetV2, ResNet).

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Basic cnns tensorflow2

Pytorch classification
利用pytorch实现图像分类的一个完整的代码,训练,预测,TTA,模型融合,模型部署,cnn提取特征,svm或者随机森林等进行分类,模型蒸馏,一个完整的代码
Stars: ✭ 395 (+5.61%)
Mutual labels:  image-classification, resnet, densenet, resnext
Pytorch Cifar100
Practice on cifar100(ResNet, DenseNet, VGG, GoogleNet, InceptionV3, InceptionV4, Inception-ResNetv2, Xception, Resnet In Resnet, ResNext,ShuffleNet, ShuffleNetv2, MobileNet, MobileNetv2, SqueezeNet, NasNet, Residual Attention Network, SENet, WideResNet)
Stars: ✭ 2,423 (+547.86%)
Mutual labels:  image-classification, resnet, densenet, resnext
pyro-vision
Computer vision library for wildfire detection
Stars: ✭ 33 (-91.18%)
Mutual labels:  image-classification, densenet, resnet
Pytorch Classification
Classification with PyTorch.
Stars: ✭ 1,268 (+239.04%)
Mutual labels:  resnet, densenet, resnext
Pytorch Speech Commands
Speech commands recognition with PyTorch
Stars: ✭ 128 (-65.78%)
Mutual labels:  resnet, densenet, resnext
cifar-tensorflow
No description or website provided.
Stars: ✭ 18 (-95.19%)
Mutual labels:  image-classification, densenet, resnet
Keras Idiomatic Programmer
Books, Presentations, Workshops, Notebook Labs, and Model Zoo for Software Engineers and Data Scientists wanting to learn the TF.Keras Machine Learning framework
Stars: ✭ 720 (+92.51%)
Mutual labels:  resnet, densenet, resnext
Cifar Zoo
PyTorch implementation of CNNs for CIFAR benchmark
Stars: ✭ 584 (+56.15%)
Mutual labels:  resnet, densenet, resnext
Nsfw Resnet
🔥🔥NSFW implement in pytorch(色情图&性感图识别,本程序经过了线上大数据集测试,性能优异效果良好)🔥🔥
Stars: ✭ 142 (-62.03%)
Mutual labels:  image-classification, resnet, image-recognition
Awesome Computer Vision Models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 278 (-25.67%)
Mutual labels:  image-classification, resnet, densenet
Segmentation models
Segmentation models with pretrained backbones. Keras and TensorFlow Keras.
Stars: ✭ 3,575 (+855.88%)
Mutual labels:  resnet, densenet, resnext
Classification models
Classification models trained on ImageNet. Keras.
Stars: ✭ 938 (+150.8%)
Mutual labels:  resnet, densenet, resnext
Mmclassification
OpenMMLab Image Classification Toolbox and Benchmark
Stars: ✭ 532 (+42.25%)
Mutual labels:  image-classification, resnet, resnext
Iresnet
Improved Residual Networks (https://arxiv.org/pdf/2004.04989.pdf)
Stars: ✭ 163 (-56.42%)
Mutual labels:  image-classification, resnet, image-recognition
awesome-computer-vision-models
A list of popular deep learning models related to classification, segmentation and detection problems
Stars: ✭ 419 (+12.03%)
Mutual labels:  image-classification, densenet, resnet
pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 788 (+110.7%)
Mutual labels:  densenet, resnet
coursera-ai-for-medicine-specialization
Programming assignments, labs and quizzes from all courses in the Coursera AI for Medicine Specialization offered by deeplearning.ai
Stars: ✭ 80 (-78.61%)
Mutual labels:  image-classification, image-recognition
general backbone
No description or website provided.
Stars: ✭ 37 (-90.11%)
Mutual labels:  image-classification, resnet
GFNet
[NeurIPS 2021] Global Filter Networks for Image Classification
Stars: ✭ 199 (-46.79%)
Mutual labels:  image-classification, image-recognition
aws-rekognition
A Laravel Package/Facade for the AWS Rekognition API
Stars: ✭ 20 (-94.65%)
Mutual labels:  image-classification, image-recognition

Basic_CNNs_TensorFlow2

A tensorflow2 implementation of some basic CNNs.

Networks included:

Other networks

For AlexNet and VGG, see : https://github.com/calmisential/TensorFlow2.0_Image_Classification
For InceptionV3, see : https://github.com/calmisential/TensorFlow2.0_InceptionV3
For ResNet, see : https://github.com/calmisential/TensorFlow2.0_ResNet

Train

  1. Requirements:
  • Python >= 3.6
  • Tensorflow >= 2.4.0
  • tensorflow-addons>=0.12.0
  1. To train the network on your own dataset, you can put the dataset under the folder original dataset, and the directory should look like this:
|——original dataset
   |——class_name_0
   |——class_name_1
   |——class_name_2
   |——class_name_3
  1. Run the script split_dataset.py to split the raw dataset into train set, valid set and test set. The dataset directory will be like this:
|——dataset
  |——train
       |——class_name_1
       |——class_name_2
       ......
       |——class_name_n
  |——valid
       |——class_name_1
       |——class_name_2
       ......
       |——class_name_n
  |—-test
       |——class_name_1
       |——class_name_2
       ......
       |——class_name_n
  1. Run to_tfrecord.py to generate tfrecord files.
  2. Change the corresponding parameters in config.py.
  3. Run train.py to start training.
    If you want to train the EfficientNet, you should change the IMAGE_HEIGHT and IMAGE_WIDTH to resolution in the params, and then run train.py to start training.

Evaluate

Run evaluate.py to evaluate the model's performance on the test dataset.

Different input image sizes for different neural networks

Type Neural Network Input Image Size (height * width)
MobileNet MobileNet_V1 (224 * 224)
MobileNet_V2 (224 * 224)
MobileNet_V3 (224 * 224)
EfficientNet EfficientNet(B0~B7) /
ResNeXt ResNeXt50 (224 * 224)
ResNeXt101 (224 * 224)
SEResNeXt SEResNeXt50 (224 * 224)
SEResNeXt101 (224 * 224)
Inception InceptionV4 (299 * 299)
Inception_ResNet_V1 (299 * 299)
Inception_ResNet_V2 (299 * 299)
SE_ResNet SE_ResNet_50 (224 * 224)
SE_ResNet_101 (224 * 224)
SE_ResNet_152 (224 * 224)
SqueezeNet SqueezeNet (224 * 224)
DenseNet DenseNet_121 (224 * 224)
DenseNet_169 (224 * 224)
DenseNet_201 (224 * 224)
DenseNet_269 (224 * 224)
ShuffleNetV2 ShuffleNetV2 (224 * 224)
ResNet ResNet_18 (224 * 224)
ResNet_34 (224 * 224)
ResNet_50 (224 * 224)
ResNet_101 (224 * 224)
ResNet_152 (224 * 224)

References

  1. MobileNet_V1: Efficient Convolutional Neural Networks for Mobile Vision Applications
  2. MobileNet_V2: Inverted Residuals and Linear Bottlenecks
  3. MobileNet_V3: Searching for MobileNetV3
  4. EfficientNet: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
  5. The official code of EfficientNet: https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet
  6. ResNeXt: Aggregated Residual Transformations for Deep Neural Networks
  7. Inception_V4/Inception_ResNet_V1/Inception_ResNet_V2: Inception-v4, Inception-ResNet and the Impact of Residual Connectionson Learning
  8. The official implementation of Inception_V4: https://github.com/tensorflow/models/blob/master/research/slim/nets/inception_v4.py
  9. The official implementation of Inception_ResNet_V2: https://github.com/tensorflow/models/blob/master/research/slim/nets/inception_resnet_v2.py
  10. SENet: Squeeze-and-Excitation Networks
  11. SqueezeNet: SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size
  12. DenseNet: Densely Connected Convolutional Networks
  13. https://zhuanlan.zhihu.com/p/37189203
  14. ShuffleNetV2: ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design
  15. https://zhuanlan.zhihu.com/p/48261931
  16. ResNet: Deep Residual Learning for Image Recognition
  17. RegNet: Designing Network Design Spaces
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].