Training in YOLOv2 with your data
来源:互联网 发布:c语言有什么用途 编辑:程序博客网 时间:2024/05/22 15:20
Steps for training YOLOv2 model
1. Preparing your datasets:
Put your olddatasets(Annotations,ImageSets,JPEGImages) of faster-rcnn into dirdarknet-master/scripts/VOCdevkit/VOC2007/
Edit file scripts/voc_label.py :
line7: sets=[('2007', 'trainval'), ('2007', 'test')]
line11: classes = ["mango"]
Convert data from .xml to .txt:
cd scripts/
$ python voc_label.py
Move two created files(2007_trainval.txt and2007_test.txt) to dir data/yours/ ,and rename 2007_trainval.txt to train.txt
2. Edit file data/coco.names:
xxxx
xxxx
...
(List your class label names)
3. Edit file cfg/voc.data:
classes= 1
train =/home/snowflake/Downloads/darknet-master/data/voc/train.txt
valid =/home/snowflake/Downloads/darknet-master/data/voc/2007_test.txt
names = data/coco.names
backup = backup
4. Edit file cfg/tiny-yolo-voc.cfg :
line15: max_batches = 50000
line114: filters = 30 #(classes + 1 + coord)*num
line120: classes = 1 #number of ur classes
5. Train your model:
$ ./darknet detector train cfg/voc.datacfg/tiny-yolo-voc.cfg darknet.conv.weights
About 30 hours for 2w images and 5w iterations. Finalmodel will be saved in dir backup/,and you need to move them into dirbackup/yours/ to avoid being covered.
6. Detect an image:
Put your demo images into dir data/yours/
$ ./darknet detect cfg/tiny-yolo-voc.cfgbackup/yours/tiny-yolo-voc_final.weights data/yours/xxx.jpg -thresh 0.05
7. Compute the recall and avg IoU:
$ ./darknet detector recall cfg/voc.datacfg/tiny-yolo-voc.cfg backup/yours/tiny-yolo-voc_final.weights
======================================
Reference:
1.Official web: https://pjreddie.com/darknet/yolo/
2.Train ur own model:http://blog.csdn.net/sinat_30071459/article/details/53100791
3.Modify:http://lib.csdn.net/article/deeplearning/57863?knId=1726
- Training in YOLOv2 with your data
- Training YOLOv2
- Protecting Your Data Integrity with Transactions in ADO.NET
- Start Training YOLO with Our Own Data
- Reach for your Matlab data with R
- ICME2014-MULTI-VIEW GAIT RECOGNITION WITH INCOMPLETE TRAINING DATA
- YOLOV2
- YOLOV2
- Don't Be Cute with Your Test Data
- Don’t Be Cute with Your Test Data
- Working with multiple data-sources in UITableView
- Dealing with unbalanced data in machine learning
- places training your code
- 《Training:Running Your App》
- Custom List in inspector, displaying data your way[Unity]
- Saving data to a file in your Android application
- work with multiple languages in your /App_Code folder
- Profile your application in the simulator with 'Zombies' Instrument.
- 彻底解决Webpack打包慢的问题
- java设计模式
- linux内核中红黑树代码理解
- Linux 查看日志的命令
- python报表(pygal)
- Training in YOLOv2 with your data
- 如何实现团队敏捷
- 第八天2017/04/17(2、❤String类的源代码)
- 全面解读HTTP Cookie
- 喵呜,又要配置环境
- oracle索引 总结
- ITK resample图像重采样
- BOS WebService 接口开发
- Vue.js学习系列(四十七)-- 路由