# Pytorch-YOLOv3 **Repository Path**: firslov/YOLOv3-self ## Basic Information - **Project Name**: Pytorch-YOLOv3 - **Description**: YoloV3 by Hao. - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-04 - **Last Updated**: 2023-01-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: Python, Deep-learning, Computer-vision ## README # YoloV3_self A YoloV3 model using pytorch. > - Dataset: [十分类交通标志物数据集](https://aistudio.baidu.com/aistudio/datasetdetail/20495) > - Backbone: darknet53 > - Loss function: > - BCE: x、y、confidence、class > - MSE: w、h > - Anchors: COCO数据集9种尺寸聚类框 > - Features: gpu加速、学习率更新、断点续训、类内NMS... ## Loss function ![](fig/loss_func.jpg) ## Usage ### Install ```shell git clone --depth=1 https://gitee.com/firslov/YOLOv3-self.git ``` ### Config | 配置项 | 默认值 | | ---------- | ------------------- | | 基本配置 | ./cfg/cfg.yaml | | 分类类别 | ./cfg/classes.names | | 预训练权重 | ./weight/yo.pth | | 配色文件 | ./cfg/pallete | ### Train ```shell python yolo_train.py # 断点续训: cfg.yaml ==> resume=True ``` ### Inference | 配置项 | 功能 | 默认值 | | ----------- | ------------------ | ---------------- | | input_dir | 检测目录或图片路径 | ./eval | | output_dir | 推断图片存放路径 | ./output | | confidence | 识别置信度阈值 | 0.5 | | nms_thresh | nms阈值 | 0.4 | | weight_file | 预训练权重 | 默认Xavier初始化 | | in_dim | 输入图片边长 | 416 | ```shell python yolo_detect.py ``` ## Show ### Inference ![](fig/1.jpg) ![](fig/2.jpg) ![](fig/3.jpg) ![](fig/4.jpg) ![](fig/5.jpg) ![](fig/6.jpg) ![](fig/7.jpg) ![](fig/8.jpg) ### Train - total loss ![](fig/loss_total.png) - x loss ![](fig/loss_x.png) - y loss ![](fig/loss_y.png) - w loss ![](fig/loss_w.png) - h loss ![](fig/loss_h.png) - confidence loss ![](fig/loss_conf.png) - class loss ![](fig/loss_cls.png)