yolo3-pytorch

这是一个yolo3-pytorch的源码,可以用于训练自己的模型。

MIT License

Stars
2K

YOLOV3You Only Look OncePytorch


  1. Top News
  2. Related code
  3. Performance
  4. Environment
  5. Download
  6. How2train
  7. How2predict
  8. How2eval
  9. Reference

Top News

2022-04:GPUheatmap

2022-03:losslossstepcosadamsgdbatch_size BiliBilihttps://github.com/bubbliiiing/yolo3-pytorch/tree/bilibili

2021-10:fps

YoloV3 https://github.com/bubbliiiing/yolo3-pytorch
Efficientnet-Yolo3 https://github.com/bubbliiiing/efficientnet-yolo3-pytorch
YoloV4 https://github.com/bubbliiiing/yolov4-pytorch
YoloV4-tiny https://github.com/bubbliiiing/yolov4-tiny-pytorch
Mobilenet-Yolov4 https://github.com/bubbliiiing/mobilenet-yolov4-pytorch
YoloV5-V5.0 https://github.com/bubbliiiing/yolov5-pytorch
YoloV5-V6.1 https://github.com/bubbliiiing/yolov5-v6.1-pytorch
YoloX https://github.com/bubbliiiing/yolox-pytorch
YoloV7 https://github.com/bubbliiiing/yolov7-pytorch
YoloV7-tiny https://github.com/bubbliiiing/yolov7-tiny-pytorch

mAP 0.5:0.95 mAP 0.5
COCO-Train2017 yolo_weights.pth COCO-Val2017 416x416 38.0 67.2

torch == 1.2.0 requirements.txtpytorch1.71.7.1

yolo_weights.pth : https://pan.baidu.com/s/1hCV4kg8NyStkywLiAeEr3g : 6da3

VOC : https://pan.baidu.com/s/19Mw2u_df_nBzsC2lg20fQA : j5ge

aVOC07+12

VOCVOC07+12

voc_annotation.pyannotation_mode=2voc_annotation.py2007_train.txt2007_val.txt

train.pyVOCtrain.py

yolo.pypredict.pyyolo.pymodel_pathclasses_path model_pathlogs classes_pathtxt predict.py

b

VOC VOCdevkitVOC2007Annotation VOCdevkitVOC2007JPEGImages

voc_annotation.py2007_train.txt2007_val.txt voc_annotation.pyclasses_pathclasses_pathtxt cls_classes.txt model_data/cls_classes.txt

cat
dog
...

voc_annotation.pyclasses_pathcls_classes.txtvoc_annotation.py

train.pytrain.pyclasses_path classes_pathtxttxtvoc_annotation.pytxt classes_pathtrain.pyepochlogs

yolo.pypredict.pyyolo.pymodel_pathclasses_path model_pathlogs classes_pathtxt predict.py

a

  1. yolo_weights.pthmodel_datapredict.py
img/street.jpg
  1. predict.pyfpsvideo

b

  1. yolo.pymodel_pathclasses_pathmodel_pathlogsclasses_pathmodel_path
_defaults = {
    #--------------------------------------------------------------------------#
    #   model_pathclasses_path
    #   model_pathlogsclasses_pathmodel_datatxt
    #   shapemodel_pathclasses_path
    #--------------------------------------------------------------------------#
    "model_path"        : 'model_data/yolo_weights.pth',
    "classes_path"      : 'model_data/coco_classes.txt',
    #---------------------------------------------------------------------#
    #   anchors_pathtxt
    #   anchors_mask
    #---------------------------------------------------------------------#
    "anchors_path"      : 'model_data/yolo_anchors.txt',
    "anchors_mask"      : [[6, 7, 8], [3, 4, 5], [0, 1, 2]],
    #---------------------------------------------------------------------#
    #   32
    #---------------------------------------------------------------------#
    "input_shape"       : [416, 416],
    #---------------------------------------------------------------------#
    #   
    #---------------------------------------------------------------------#
    "confidence"        : 0.5,
    #---------------------------------------------------------------------#
    #   nms_iou
    #---------------------------------------------------------------------#
    "nms_iou"           : 0.3,
    #---------------------------------------------------------------------#
    #   letterbox_imageresize
    #   letterbox_imageresize
    #---------------------------------------------------------------------#
    "letterbox_image"   : False,
    #-------------------------------#
    #   Cuda
    #   GPUFalse
    #-------------------------------#
    "cuda"              : True,
}
  1. predict.py
img/street.jpg
  1. predict.pyfpsvideo

aVOC07+12

  1. VOCVOC07+12voc_annotation.pyImageSetstxt
  2. yolo.pymodel_pathclasses_pathmodel_pathlogsclasses_pathtxt
  3. get_map.pymap_out

b

  1. VOC
  2. voc_annotation.pyvoc_annotation.pytrainval_percenttrainval_percent(+) (+): = 9:1train_percent(+) : = 9:1
  3. voc_annotation.pyget_map.pyclasses_pathclasses_pathtxttxttxt
  4. yolo.pymodel_pathclasses_pathmodel_pathlogsclasses_pathtxt
  5. get_map.pymap_out

Reference

https://github.com/qqwweee/pytorch-yolo3 https://github.com/eriklindernoren/PyTorch-YOLOv3 https://github.com/BobLiu20/YOLOv3_PyTorch

Related Projects