Couldn’t open file: …/darknet/VOCdevkit/Flir/labels/FLIR_00005.jpeg
在训练FLIR红外热成像数据时,遇到找不到文件的问题,参考链接
https://github.com/pjreddie/darknet/issues/658
在data.c文件中所有有关"jpg"部分,以"jpg"部分相同的格式添加"jpeg"。
- void fill_truth_swag函数:
添加find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - void fill_truth_region函数:
find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - void fill_truth_iseg函数:
find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - void fill_truth_mask函数:
find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - void fill_truth_detection函数:
find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - matrix load_tags_paths函数:
find_replace(label, “.jpeg”, “.txt”, label); - image get_segmentation_image函数:
find_replace(labelpath, “.jpeg”, “.txt”, labelpath); - data load_data_compare函数:
find_replace(imlabel1, “jpeg”, “txt”, imlabel1);
find_replace(imlabel2, “jpeg”, “txt”, imlabel2);
avg全是nan
原因:https://blog.csdn.net/yapifeitu/article/details/105979735
cfg文件中的testing部分需要注释掉,training部分需要解除注释。
.data文件中的valid文件一定是val.txt,否则后续计算mAP会遇到文件不能对应的问题。
yolov3训练自己的数据集命令:
./darknet detector train cfg/car_person_infrared.data cfg/yolov3.cfg darknet53.conv.74