Github:
https://github.com/eriklindernoren/PyTorch-YOLOv3
$ git clone https://github.com/eriklindernoren/PyTorch-YOLOv3
$ cd PyTorch-YOLOv3/
$ sudo pip3 install -r requirements.txt
下载预训练权值
$ cd weights/
$ bash download_weights.sh
下载 COCO
$ cd data/
$ bash get_coco_dataset.sh
使用预训练权值训练图像,下图显示了将输入图像缩放为 256x256 时的推理时间。
$ python3 detect.py --image_folder /data/samples
在 COCO 测试中评估模型。
$ python3 test.py --weights_path weights/yolov3.weights
在 COCO 上训练,数据增强和其他训练技巧有待优化。
train.py [-h] [--epochs EPOCHS] [--image_folder IMAGE_FOLDER]
[--batch_size BATCH_SIZE]
[--model_config_path MODEL_CONFIG_PATH]
[--data_config_path DATA_CONFIG_PATH]
[--weights_path WEIGHTS_PATH] [--class_path CLASS_PATH]
[--conf_thres CONF_THRES] [--nms_thres NMS_THRES]
[--n_cpu N_CPU] [--img_size IMG_SIZE]
[--checkpoint_interval CHECKPOINT_INTERVAL]
[--checkpoint_dir CHECKPOINT_DIR]
@article{yolov3,
title={YOLOv3: An Incremental Improvement},
author={Redmon, Joseph and Farhadi, Ali},
journal = {arXiv},
year={2018}