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.
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.
- pytorch >= 0.4.0
- python >= 3.6.0
git clone https://github.com/ZhuYun97/ShufflNetv2-YOLOv3.git
cd ShufflNetv2-YOLOv3/data
bash get_coco_dataset.sh
- 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
- Review config file training/params.py
- Replace YOUR_WORKING_DIR to your working directory. Use for save model and tmp file.
- Adjust your GPU device. see parallels.
- Adjust other parameters.
cd training
python training.py params.py
# please install tensorboard in first
python -m tensorboard.main --logdir=YOUR_WORKING_DIR
- 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.
cd evaluate
python eval_coco.py params.py
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.
pretrained weights Please download pretrained weights in progress or use yourself checkpoint.
cd test
python test_fps.py params.py
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.