zxt881108 / pytorch-cv

This is PyTorch version of gluon-cv. (including classification, segmentation, detection, etc...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pytorch-cv

Convert the gluon-cv to pytorch. (And add more models from others)

Note: use pytorch-nightly (due to nn.SyncBatchNorm

Enviroment

# 1. create new enviroment
conda env create -f environment.yml
source activate ptcv
# 2. install opencv 
conda install -c menpo opencv3
# 3. install pytorch (https://pytorch.org/get-started/locally/)
conda install pytorch-nightly cudatoolkit=9.0 -c pytorch  # choose your cuda version
# # 4. install mxnet and gluoncv (options---for convert pre-trained gluon model)
# pip install mxnet-cu92   # (https://beta.mxnet.io/install.html, choose your cuda version)
# pip install gluoncv --pre --upgrade

build cpp-extension (for object detection)

Note: it will delete after torchvision merge this pull-826

cd model
python setup.py build_ext develop

Supported Applications

Application Illustration Available Models
Image Classification:
recognize an object in an image.
CIFAR10, IMAGENET
Object Detection:
detect multiple objects with their
bounding boxes in an image.
SSD, YOLO3, Faster-RCNN, CenterNet
Semantic Segmentation:
associate each pixel of an image
with a categorical label.
FCN, DeepLabv3, PSPNet, DANet, OCNet, BiSeNet, CCNet
Instance Segmentation:
detect objects and associate
each pixel inside object area with an
instance label.
Mask RCNN, YOLACT
Pose Estimation:
detect human pose
from images.
Simple-Pose

Schedule

Classification:

demo eval train demo eval train
CIFAR10 IMAGENET

Semantic Segmentation:training performance nearly same as paper

demo eval train
Segmentation

Object Detection:the training performance nearly same as gluon-cv

demo eval train demo eval train
SSD YOLO
Faster-RCNN CenterNet

Instance Segmentation

demo eval train demo eval train
Mask-RCNN YOLACT

Pose Estimation

demo eval train demo eval train
Simple-Pose

TODO

  • Provide converted models (BaiduYun and GoogleDrive)
  • Compare the backbone performance with torchvison and pretrained-models.pytorch , and replace with better one.
  • Improve performance
  • Move sync BN through use convert_sync_batchnorm
  • Add more training code and models
  • Move convert code from master to branch

About

This is PyTorch version of gluon-cv. (including classification, segmentation, detection, etc...)

License:MIT License


Languages

Language:Python 90.4%Language:Cuda 5.7%Language:C++ 3.5%Language:C 0.4%Language:Shell 0.1%