All Projects → MachineLP → Pytorch_image_classifier

MachineLP / Pytorch_image_classifier

Image classification: efficientnet/resnest/seresnext/.....

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch image classifier

Malware Classification
Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification
Stars: ✭ 88 (-25.42%)
Mutual labels:  image-classification
Tensorflow2.0 Examples
🙄 Difficult algorithm, Simple code.
Stars: ✭ 1,397 (+1083.9%)
Mutual labels:  image-classification
Tf.keras Commonly Used Models
基于Tensorflow的常用模型,包括分类分割、新型激活、卷积模块,可在Tensorflow2.X下运行。
Stars: ✭ 115 (-2.54%)
Mutual labels:  image-classification
Scene Baseline
PyTorch baseline for AI challenger Scene classification
Stars: ✭ 89 (-24.58%)
Mutual labels:  image-classification
Food 101 Mobile
Deep Learning Food Classifier for iOS using Keras and Tensorflow
Stars: ✭ 97 (-17.8%)
Mutual labels:  image-classification
Lambdanetworks
Implementing Lambda Networks using Pytorch
Stars: ✭ 107 (-9.32%)
Mutual labels:  image-classification
Deep Learning Training Gui
Train and predict your model on pre-trained deep learning models through the GUI (web app). No more many parameters, no more data preprocessing.
Stars: ✭ 85 (-27.97%)
Mutual labels:  image-classification
Labelbox
Labelbox is the fastest way to annotate data to build and ship computer vision applications.
Stars: ✭ 1,588 (+1245.76%)
Mutual labels:  image-classification
Tta wrapper
Test Time image Augmentation (TTA) wrapper for Keras model.
Stars: ✭ 98 (-16.95%)
Mutual labels:  image-classification
Protest Detection Violence Estimation
Implementation of the model used in the paper Protest Activity Detection and Perceived Violence Estimation from Social Media Images (ACM Multimedia 2017)
Stars: ✭ 114 (-3.39%)
Mutual labels:  image-classification
Fast Autoaugment
Official Implementation of 'Fast AutoAugment' in PyTorch.
Stars: ✭ 1,297 (+999.15%)
Mutual labels:  image-classification
Ml Classifier
A tool for quickly training image classifiers in the browser
Stars: ✭ 97 (-17.8%)
Mutual labels:  image-classification
Keras And Tensorflow Serving
Deploying Keras models using TensorFlow Serving and Flask
Stars: ✭ 109 (-7.63%)
Mutual labels:  image-classification
Wb color augmenter
WB color augmenter improves the accuracy of image classification and image semantic segmentation methods by emulating different WB effects (ICCV 2019) [Python & Matlab].
Stars: ✭ 89 (-24.58%)
Mutual labels:  image-classification
Residualmaskingnetwork
Facial Expression Recognition using Residual Masking Network
Stars: ✭ 119 (+0.85%)
Mutual labels:  image-classification
Tf Mobilenet V2
Mobilenet V2(Inverted Residual) Implementation & Trained Weights Using Tensorflow
Stars: ✭ 85 (-27.97%)
Mutual labels:  image-classification
Indian Paper Currency Prediction
Source code of Indian Paper Currency Prediction 🔥
Stars: ✭ 106 (-10.17%)
Mutual labels:  image-classification
Keras transfer cifar10
Object classification with CIFAR-10 using transfer learning
Stars: ✭ 120 (+1.69%)
Mutual labels:  image-classification
Amla
AutoML frAmework for Neural Networks
Stars: ✭ 119 (+0.85%)
Mutual labels:  image-classification
Petridishnn
Code for the neural architecture search methods contained in the paper Efficient Forward Neural Architecture Search
Stars: ✭ 112 (-5.08%)
Mutual labels:  image-classification

Image classfication

Easy-to-use/Easy-to-deploy/Easy-to-develop

图片名称 图片名称

*** example
models (efficientnet/mobilenet/resnest/seresnext等) 1
metric (Swish/ArcMarginProduct_subcenter/ArcFaceLossAdaptiveMargin/...) 2
data aug (rotate/flip/...、mixup/cutmix) 3
loss (ce_loss/ce_smothing_loss/focal_loss/bce_loss/...) 4
deploy (flask/grpc/BentoML等) 5
onnx/trt () 6

models:

RESNEST_LIST = ['resnest50', 'resnest101', 'resnest200', 'resnest269']

SERESNEXT_LIST = ['seresnext101']

GEFFNET_LIST = ['GenEfficientNet', 'mnasnet_050', 'mnasnet_075', 'mnasnet_100', 'mnasnet_b1', 'mnasnet_140', 'semnasnet_050', 'semnasnet_075', 'semnasnet_100', 'mnasnet_a1', 'semnasnet_140', 'mnasnet_small','mobilenetv2_100', 'mobilenetv2_140', 'mobilenetv2_110d', 'mobilenetv2_120d', 'fbnetc_100', 'spnasnet_100', 'efficientnet_b0', 'efficientnet_b1', 'efficientnet_b2', 'efficientnet_b3', 'efficientnet_b4', 'efficientnet_b5', 'efficientnet_b6', 'efficientnet_b7', 'efficientnet_b8', 'efficientnet_l2', 'efficientnet_es', 'efficientnet_em', 'efficientnet_el', 'efficientnet_cc_b0_4e', 'efficientnet_cc_b0_8e', 'efficientnet_cc_b1_8e', 'efficientnet_lite0', 'efficientnet_lite1', 'efficientnet_lite2', 'efficientnet_lite3', 'efficientnet_lite4', 'tf_efficientnet_b0', 'tf_efficientnet_b1', 'tf_efficientnet_b2', 'tf_efficientnet_b3', 'tf_efficientnet_b4', 'tf_efficientnet_b5', 'tf_efficientnet_b6', 'tf_efficientnet_b7', 'tf_efficientnet_b8', 'tf_efficientnet_b0_ap', 'tf_efficientnet_b1_ap', 'tf_efficientnet_b2_ap', 'tf_efficientnet_b3_ap', 'tf_efficientnet_b4_ap', 'tf_efficientnet_b5_ap', 'tf_efficientnet_b6_ap', 'tf_efficientnet_b7_ap', 'tf_efficientnet_b8_ap', 'tf_efficientnet_b0_ns', 'tf_efficientnet_b1_ns', 'tf_efficientnet_b2_ns', 'tf_efficientnet_b3_ns', 'tf_efficientnet_b4_ns', 'tf_efficientnet_b5_ns', 'tf_efficientnet_b6_ns', 'tf_efficientnet_b7_ns', 'tf_efficientnet_l2_ns', 'tf_efficientnet_l2_ns_475', 'tf_efficientnet_es', 'tf_efficientnet_em', 'tf_efficientnet_el', 'tf_efficientnet_cc_b0_4e', 'tf_efficientnet_cc_b0_8e', 'tf_efficientnet_cc_b1_8e', 'tf_efficientnet_lite0', 'tf_efficientnet_lite1', 'tf_efficientnet_lite2', 'tf_efficientnet_lite3', 'tf_efficientnet_lite4', 'mixnet_s', 'mixnet_m', 'mixnet_l', 'mixnet_xl', 'tf_mixnet_s', 'tf_mixnet_m', 'tf_mixnet_l', 'mobilenetv3_rw', 'mobilenetv3_large_075', 'mobilenetv3_large_100', 'mobilenetv3_large_minimal_100','mobilenetv3_small_075', 'mobilenetv3_small_100', 'mobilenetv3_small_minimal_100','tf_mobilenetv3_large_075', 'tf_mobilenetv3_large_100', 'tf_mobilenetv3_large_minimal_100','tf_mobilenetv3_small_075', 'tf_mobilenetv3_small_100', 'tf_mobilenetv3_small_minimal_100']

train/test/deploy

0、Data format transform

git clone https://github.com/MachineLP/PyTorch_image_classifier
pip install -r requirements.txt
cd PyTorch_image_classifier
python tools/data_preprocess.py --data_dir "./data/data.csv" --n_splits 5 --output_dir "./data/train.csv" --random_state 2020

resnest101

1、Modify configuration file

cp conf/resnest101.yaml conf/resnest101.yaml
vim conf/resnest101.yaml

2、Train:

python train.py --config_path conf/resnest101.yaml

3、Test

python test.py --config_path "conf/resnest101.yaml" --n_splits 5

4、Infer

    python infer.py --config_path "conf/resnest101.yaml" --img_path "./data/img/0male/0(2).jpg" --fold "0"
    pre>>>>> [1]
    python infer.py --config_path "conf/resnest101.yaml" --img_path "./data/img/1female/1(5).jpg" --fold "1"
    pre>>>>> [0]

5、Models transform ( https://github.com/NVIDIA-AI-IOT/torch2trt )

    onnx:python tools/pytorch_to_onnx.py --config_path "conf/resnest101.yaml" --img_path "./data/img/0male/0(2).jpg" --batch_size 4 --fold 0 --save_path "lp.onnx"
    '''
    load model ok.....
    >>>>> [[-0.15416172  0.36190417]]
    cost time: 0.050855159759521484
    ==> Exporting model to ONNX format at 'lp.onnx'
    >>>>> (1, 3, 512, 512)
    preds>>>>> [array([[-0.15416166,  0.36190417]], dtype=float32)]
    cost time: 3.649467706680298
    error_distance: 2.9802322e-08
    '''

    tensorrt:python tools/onnx_to_tensorrt.py --config_path "conf/resnest101.yaml" --img_path "./data/img/0male/0(2).jpg" --batch_size 4 --fold 0 --save_path "lp_pp.onnx" --trt_save_path "lp.trt"
    '''
    outputs: tensor([[-0.1543,  0.3619]])
    tensor([0.6263]) tensor([1])
    '''

6、Deploying models serving

effb3_ns

1、Modify configuration file

cp conf/test.yaml conf/effb3_ns.yaml
vim conf/effb3_ns.yaml

2、Train:

python train.py --config_path "conf/effb3_ns.yaml"

3、Test

python test.py --config_path "conf/effb3_ns.yaml" --n_splits 5

4、Infer

    python infer.py --config_path "conf/effb3_ns.yaml" --img_path "./data/img/0male/0(2).jpg" --fold "0"
    pre>>>>> [1]
    python infer.py --config_path "conf/effb3_ns.yaml" --img_path "./data/img/1female/1(5).jpg" --fold "1"
    pre>>>>> [0]

5、Models transform ( https://github.com/NVIDIA-AI-IOT/torch2trt )

    onnx:python tools/pytorch_to_onnx.py --config_path "conf/effb3_ns.yaml" --img_path "./data/img/0male/0(2).jpg" --batch_size 4 --fold 0 --save_path "lp.onnx"
    tensorrt:python tools/onnx_to_tensorrt.py

6、Deploying models serving

ref

(1)https://github.com/haqishen/SIIM-ISIC-Melanoma-Classification-1st-Place-Solution
(2)https://github.com/BADBADBADBOY/pytorchOCR
(3)https://github.com/MachineLP/QDServing
(4)https://github.com/bentoml/BentoML
(5)mixup-cutmix:https://blog.csdn.net/u014365862/article/details/104216086
(7)focalloss:https://blog.csdn.net/u014365862/article/details/104216192
(8)https://blog.csdn.net/u014365862/article/details/106728375 / https://blog.csdn.net/u014365862/article/details/106728402 
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].