This repository contains reimplementation of state-of-the-art Image Classification models:
Models | Published year | Paper |
---|---|---|
VGG16 | 2014 | Very Deep Convolutional Networks for Large-Scale Image Recognition |
InceptionV3 | 2015 | Rethinking the Inception Architecture for Computer Vision |
ResNet50 | 2015 | Deep Residual Learning for Image Recognition |
DenseNet121 | 2016 | Densely Connected Convolutional Networks |
Xception | 2016 | Xception: Deep Learning with Depthwise Separable Convolutions |
ResNeXt50 | 2016 | Aggregated Residual Transformations for Deep Neural Networks |
MobileNetV3 | 2019 | Searching for MobileNetV3 |
The goal of this implementation is to be simple, flat structured,
highly extensible, and easy to integrate into your own projects.
At current moment, you can easily:
- Build any of the above models in nn.Module class
- Use models for classification or feature extraction
- Train/Test models with your in-house data
Upcoming features: In the next few days, you will be able to:
- Local installation / pip installation
- Evaluate models within training
- Load pre-trained weights for models
- Finetune models on your own dataset
We collect models that bring huge impacts to Image Classification task, and re-implement it with flat structured code. Although most of these models have several types where their layers altered such as ResNet18/30/50, we only implement one of those in order to remain code legibility.
All Params are calculated with input size=(224, 224, 3) and classes=1000. Top-1 Acc. were evaluated by pre-trained model on ImageNet dataset
Name | keras |
torch |
# Params | Top-1 Acc. | Pretrained |
---|---|---|---|---|---|
VGG16 | v | v | 138,357,544 | ? | x |
InceptionV3 | v | v | 25,081,224 | ? | x |
ResNet50 | v | v | 25,621,352 | ? | x |
DenseNet121 | v | v | 7,899,430 | ? | x |
Xception | x | v | ? | ? | x |
ResNeXt50 | v | v | 38,715,196 | ? | x |
MobileNetV3 | v | v | 4,320,632 | ? | x |
- keras v2.2.4
- pytorch v1.4
- pytorch-lightning [doc]
- opencv
! Will update soon
python train.py -m VGG16 -f PATH_TO_TRAINDATA
"""
option: -m : neural network structure
-f : path to train data folder, structure showed as below:
train_folder
├─ Class1 (e.g. dog)
| ├─ image1.jpg
| └─ image2.jpg
└─ Class2 (e.g. cat)
├─ image1.jpg
└─ image2.jpg
"""
Load a model in python:
from .models.SOME_MODEL import SOME_MODEL
If you want us to add other models, feel free to create an issue, or submit a pull request. If you find a bug or having any question, create an issue and we'll solve it ASAP.
WTFPL licensed, just do what the fuck you want to public, cheers.