图像分类集成以下模型: VGG16、VGG19、InceptionV3、Xception、MobileNet、AlexNet、LeNet、ZF_Net、ResNet18、ResNet34、ResNet50、ResNet101、ResNet152、DenseNet,在config.py里面选择使用哪种模型,目前本人亲测,残差网络resnet的效果比较好。
- VGG16
- VGG19
- InceptionV3
- Xception
- MobileNet
- AlexNet
- LeNet
- ZF_Net
- ResNet18
- ResNet34
- ResNet50
- ResNet101
- ResNet152
- DenseNet(dismissed this time)
"training data set folder is:"
/dataset/train/0/cat*.jpg,
/dataset/train/1/cat*.jpg,
/dataset/train/2/cat*.jpg,
/dataset/train/3/cat*.jpg,
"testing data set folder is:"
/dataset/test/0/cat*.jpg,
/dataset/test/1/cat*.jpg,
/dataset/test/2/cat*.jpg,
/dataset/test/3/cat*.jpg,
- Attentions ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
- classes name ‘0,1,2,3’ or folder name must be number,and must start with '0'
My environment is based on
- ubuntu16
- cuda8 (cuda9.0)
- tensorflow_gpu1.4 (tensorflow_gpu1.10 )
- keras2.0.8
- numpy
- tqdm
- opencv-python
- scikit-learn
- pip3 install tensorflow_gpu==1.4
- pip3 install keras==2.0.8
- pip3 install numpy
- pip3 install tqdm
- pip3 install opencv-python
- pip3 install scikit-learn
-
train model: python train.py model_name
-
predict model: python predict.py model_name classes_name
-
(Atttention:classes_name should be 0,1,2,3,........)
Author email: [email protected]