项目作者: welkin-feng

项目描述 :
Computer Vision models (include classification models and detection models) implemented by PyTorch
高级语言: Python
项目地址: git://github.com/welkin-feng/ComputerVision.git
创建时间: 2019-06-21T19:25:13Z
项目社区:https://github.com/welkin-feng/ComputerVision

开源协议:MIT License

下载


Computer Vision Models

Requirements and Usage

Requirements

  • Python >= 3.5
  • PyTorch >= 1.0.1.post2
  • torchvision >= 0.2.2.post3
  • TensorFlow/Tensorboard (if you want to use the tensorboard for visualization)
  • Other dependencies (pyyaml, easydict, tensorboardX)
  1. pip install -r requirements.txt

Usage

simply run the cmd for the training:

  1. ## 1 GPU for vgg
  2. CUDA_VISIBLE_DEVICES=0 python -u train_classifier.py --work-path ./experiments/vgg/cifar10
  3. ## resume from ckpt
  4. CUDA_VISIBLE_DEVICES=0 python -u train_classifier.py --work-path ./experiments/vgg/cifar10 --resume
  5. ## 2 GPUs for inception_v1
  6. CUDA_VISIBLE_DEVICES=0,1 python -u train_classifier.py --work-path ./experiments/inception_v1/cifar10
  7. ## 4 GPUs for yolo_v2
  8. CUDA_VISIBLE_DEVICES=0,1,2,3 python -u train_detector.py --work-path ./experience/yolo_v2/voc2007

We use yaml file config.yaml to save the parameters, check any files in ./experimets for more details.
You can see the training curve via tensorboard, tensorboard --logdir path-to-event --port your-port. (Not verified)
The training log will be dumped via logging, check log.txt in your work path.

Results on CIFAR

architecture params batch size epoch C10 test acc (%) C100 test acc (%)
alexnet 24.7M 128 250 82.70 -
inception_v1 7.2M 128 250 91.52 -
vgg19_bn 38.9M 128 250 93.37 -
resnet 1.7M 128 250 90.47 -
mobilenet_v1 3.2M 128 200 86.01 -