Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
王路路 c68daf377f | 3 years ago | |
---|---|---|
font | 6 years ago | |
model_data | 6 years ago | |
yolo3 | 4 years ago | |
.gitignore | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 3 years ago | |
coco_annotation.py | 6 years ago | |
convert.py | 4 years ago | |
darknet53.cfg | 6 years ago | |
kmeans.py | 6 years ago | |
settings.py | 3 years ago | |
train.py | 3 years ago | |
train_bottleneck.py | 4 years ago | |
voc_annotation.py | 6 years ago | |
yolo.py | 3 years ago | |
yolo_video.py | 3 years ago | |
yolov3-tiny.cfg | 6 years ago | |
yolov3.cfg | 6 years ago |
行吧行吧,我知道这个项目真的很不好用~
那么,来看看 xyolo 吧!
xyolo 是对 tf2-keras-yolo3的重构和封装,旨在降低使用门槛,帮助实现快速开发。
几行Python代码即可训练自己的目标检测模型或者调用模型进行检测哦~你不试试吗?
这是对qqwweee/keras-yolo3的fork和修改,目的是使它支持TensorFlow 2.2。
主要修改内容如下:
2020.6.29 更新:
train.py
完成自定义数据集的训练,我在TensorFlow 2.2下做了测试,一切正常tf.function
优化模型性能关于训练:
亲测TensorFlow 2.2下训练自定义数据集是没有问题的,训练不成功的同学请尝试如下方法:
- 升级TensorFlow版本为2.2
- 仔细阅读原
README.MD
中关于train.py
部分的表述,在训练前需要先准备数据集、处理数据格式以及按实际情况修改train.py
中的参数。如果没有做这些工作的话,出现错误很正常。
TODO:
更多信息请访问 深度学习下的目标检测算法——TensorFlow 2.0下的YOLOv3实践 (https://blog.csdn.net/aaronjny/article/details/103658254)
下附qqwweee/keras-yolo3的README.
This is a fork and modification of qqwweee / keras-yolo3, in order to make it support TensorFlow 2.2.
Attached is the README of qqwweee / keras-yolo3.
A Keras implementation of YOLOv3 (Tensorflow backend) inspired by allanzelener/YAD2K.
wget https://pjreddie.com/media/files/yolov3.weights
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
python yolo_video.py [OPTIONS...] --image, for image detection mode, OR
python yolo_video.py [video_path] [output_path (optional)]
For Tiny YOLOv3, just do in a similar way, just specify model path and anchor path with --model model_file
and --anchors anchor_file
.
Use --help to see usage of yolo_video.py:
usage: yolo_video.py [-h] [--model MODEL] [--anchors ANCHORS]
[--classes CLASSES] [--gpu_num GPU_NUM] [--image]
[--input] [--output]
positional arguments:
--input Video input path
--output Video output path
optional arguments:
-h, --help show this help message and exit
--model MODEL path to model weight file, default model_data/yolo.h5
--anchors ANCHORS path to anchor definitions, default
model_data/yolo_anchors.txt
--classes CLASSES path to class definitions, default
model_data/coco_classes.txt
--gpu_num GPU_NUM Number of GPU to use, default 1
--image Image detection mode, will ignore all positional arguments
--gpu_num N
to use N GPUs. It is passed to the Keras multi_gpu_model().Generate your own annotation file and class names file.
One row for one image;
Row format: image_file_path box1 box2 ... boxN
;
Box format: x_min,y_min,x_max,y_max,class_id
(no space).
For VOC dataset, try python voc_annotation.py
Here is an example:
path/to/img1.jpg 50,100,150,200,0 30,50,200,120,3
path/to/img2.jpg 120,300,250,600,2
...
Make sure you have run python convert.py -w yolov3.cfg yolov3.weights model_data/yolo_weights.h5
The file model_data/yolo_weights.h5 is used to load pretrained weights.
Modify train.py and start training.
python train.py
Use your trained weights or checkpoint weights with command line option --model model_file
when using yolo_video.py
Remember to modify class path or anchor path, with --classes class_file
and --anchors anchor_file
.
If you want to use original pretrained weights for YOLOv3:
1. wget https://pjreddie.com/media/files/darknet53.conv.74
2. rename it as darknet53.weights
3. python convert.py -w darknet53.cfg darknet53.weights model_data/darknet53_weights.h5
4. use model_data/darknet53_weights.h5 in train.py
The test environment is
Default anchors are used. If you use your own anchors, probably some changes are needed.
The inference result is not totally the same as Darknet but the difference is small.
The speed is slower than Darknet. Replacing PIL with opencv may help a little.
Always load pretrained weights and freeze layers in the first stage of training. Or try Darknet training. It's OK if there is a mismatch warning.
The training strategy is for reference only. Adjust it according to your dataset and your goal. And add further strategy if needed.
For speeding up the training process with frozen layers train_bottleneck.py can be used. It will compute the bottleneck features of the frozen model first and then only trains the last layers. This makes training on CPU possible in a reasonable time. See this for more information on bottleneck features.
No Description
Python INI Text
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》