yolo_mark工具的使用

之前自己编译了一下yolo_mark用来标注样本。我编译时yolo_mark依赖了opencv3.2.0。当时为了方便直接把yolo_mark.exe放到编译yolo的文件夹。现在要在其他地方使用,就把所有文件整理出来。

其中opencv_world320.dll是官网下载的,自己编译yolo_mark.exe链接的是哪个就用哪个opencv动态库。

yolo_mark.cmd里面是执行的命令,使用.cmd文件执行可以避免每次执行时敲很多命令,用.bat文件原理类似。

yolo_mark.cmd里内容:

echo     Example how to start marking bouded boxes for training set Yolo v3

yolo_mark.exe ../tmp/detect/images ../tmp/detect/train.txt ../tmp/detect/obj.names

pause

从yolo_mark.cmd里内容可知,还用到了相对路径下的一个文件夹和两个文件,其中images文件夹下存放的是图片和对应的同名txt标注文件,其中标注格式为:

类别 相对中心横坐标 相对中心纵坐标 相对宽 相对高

类别:数字标签代表类别

相对xxxx:小数格式,取值范围(0,1)

文件train.txt:内容是图片路径,可以是绝对路径,也可以是相对于可执行程序的相对路径。

参考相对路径(说明,我生成路径时是绝对路径,在yolo_mark加载数据后就自动变成下面的相对路径了):

../tmp/detect/images/0000001_000_377187110549094.jpg
../tmp/detect/images/0000001_100_377187113857551.jpg
../tmp/detect/images/0000002_000_377187113857551.jpg
../tmp/detect/images/0000002_100_370285002677747.jpg
../tmp/detect/images/0000003_000_370285002677747.jpg
../tmp/detect/images/0000003_100_370285002677747.jpg
../tmp/detect/images/0000004_000_370285002677747.jpg
../tmp/detect/images/0000004_100_370285002677747.jpg

文件obj.names:内容是标注标签的名字,在实际的标注txt文件中不关注这些名字,只是用它们的序号,序号是从0开始的。

参考:

object

猜你喜欢

转载自blog.csdn.net/juluwangriyue/article/details/108746873
今日推荐