fdzh 034acbeab4 | 3 years ago | |
---|---|---|
VOCdevkit/VOC2007 | 3 years ago | |
__pycache__ | 3 years ago | |
data/screw/slice/JPEGImages | 3 years ago | |
logs | 3 years ago | |
mine | 3 years ago | |
model_data | 3 years ago | |
nets | 3 years ago | |
utils | 3 years ago | |
.gitignore | 3 years ago | |
FPS_test.py | 3 years ago | |
LICENSE | 3 years ago | |
README.en.md | 3 years ago | |
README.md | 3 years ago | |
cuda_test.py | 3 years ago | |
get_dr_txt.py | 3 years ago | |
get_gt_txt.py | 3 years ago | |
get_map.py | 3 years ago | |
kmeans_for_anchors.py | 3 years ago | |
predict.py | 3 years ago | |
test.py | 3 years ago | |
train.py | 3 years ago | |
train_with_tensorboard.py | 3 years ago | |
video.py | 3 years ago | |
voc_annotation.py | 3 years ago | |
yolo.py | 3 years ago | |
常见问题汇总.md | 3 years ago |
2021年2月7日更新:
加入letterbox_image的选项,关闭letterbox_image后网络的map得到大幅度提升。
训练数据集 | 权值文件名称 | 测试数据集 | 输入图片大小 | mAP 0.5:0.95 | mAP 0.5 |
---|---|---|---|---|---|
VOC07+12+COCO | yolo4_voc_weights.pth | VOC-Test07 | 416x416 | - | 89.0 |
COCO-Train2017 | yolo4_weights.pth | COCO-Val2017 | 416x416 | 46.1 | 70.2 |
torch==1.2.0
代码中的yolo4_weights.pth是基于608x608的图片训练的,但是由于显存原因。我将代码中的图片大小修改成了416x416。有需要的可以修改回来。 代码中的默认anchors是基于608x608的图片的。
注意不要使用中文标签,文件夹中不要有空格!
在训练前需要务必在model_data下新建一个txt文档,文档中输入需要分的类,在train.py中将classes_path指向该文件。
在train.py文件下:
1、mosaic参数可用于控制是否实现Mosaic数据增强。
2、Cosine_scheduler可用于控制是否使用学习率余弦退火衰减。
3、label_smoothing可用于控制是否Label Smoothing平滑。
训练所需的yolo4_weights.pth可在百度网盘中下载。
链接: https://pan.baidu.com/s/1WlDNPtGO1pwQbqwKx1gRZA 提取码: p4sc
yolo4_weights.pth是coco数据集的权重。
yolo4_voc_weights.pth是voc数据集的权重。
img/street.jpg
_defaults = {
"model_path": 'model_data/yolo4_weights.pth',
"anchors_path": 'model_data/yolo_anchors.txt',
"classes_path": 'model_data/coco_classes.txt',
"model_image_size" : (416, 416, 3),
"confidence": 0.5,
"cuda": True
}
img/street.jpg
classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]
classes_path = 'model_data/new_classes.txt'
model_data/new_classes.txt文件内容为:
cat
dog
...
更新了get_gt_txt.py、get_dr_txt.py和get_map.py文件。
get_map文件克隆自https://github.com/Cartucho/mAP
具体mAP计算过程可参考:https://www.bilibili.com/video/BV1zE411u7Vw
https://github.com/qqwweee/keras-yolo3/
https://github.com/Cartucho/mAP
https://github.com/Ma-Dan/keras-yolo4
No Description
Text Python Markdown
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》