资源算法ShuffleNetv2-YOLOv3

ShuffleNetv2-YOLOv3

2020-02-26 | |  44 |   0 |   0

ShuffleNetv2-YOLOv3

The work is base on YOLOv3_PyTorch. I replace the backbone with ShuffleNet v2. But after testing, I can't train a good detector. Many people said the work has many problems. So I don't recommend this repo, if you want to use shufflenetv2 + yolo3, you can go for this.

Why this project

The computing complexity of darknet53 is costly. I want to speed up network computing. So I replace the backbone with ShuffleNet v2 which is a lightweight network in order to use the detector in mobile devices like smartphone.

Installation

Environment

  • pytorch >= 0.4.0

  • python >= 3.6.0

Get code

git clone https://github.com/ZhuYun97/ShufflNetv2-YOLOv3.git

Download COCO dataset

cd ShufflNetv2-YOLOv3/data
bash get_coco_dataset.sh

Training

Download pretrained weights

  • If you want to use ShuffleNetv2, you can downlaod the pretrained weights(emmmm, under training)

  • if you want to use darknet, you just follow the original author

Modify training parameters

  1. Review config file training/params.py

  2. Replace YOUR_WORKING_DIR to your working directory. Use for save model and tmp file.

  3. Adjust your GPU device. see parallels.

  4. Adjust other parameters.

Start training

cd training
python training.py params.py

Option: Visualizing training

#  please install tensorboard in first
python -m tensorboard.main --logdir=YOUR_WORKING_DIR

Evaluate

Download pretrained weights

  • If you want to use ShuffleNetv2, you can downlaod the pretrained weights(emmmm, under training)

  • if you want to use darknet, you just follow the original author Move downloaded file to wegihts folder in this project.

Start evaluate

cd evaluate
python eval_coco.py params.py

Quick test

pretrained weights

Please download pretrained weights in progress or use yourself checkpoint.

Start test
cd test
python test_images.py params.py
You can got result images in output folder.

Measure FPS

pretrained weights Please download pretrained weights in progress or use yourself checkpoint.

Start test

cd test
python test_fps.py params.py

Results

Test in TitanX GPU with different input size and batch size. Keep in mind this is a full test in YOLOv3. Not only backbone but also yolo layer and NMS.

References

YOLOv3_PyTorch


上一篇:pytorch_ShuffleNet_ShuffleNetV2

下一篇:shufflenet-v1-and-v2

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...