keras-yolo3
keras-yolo3 copied to clipboard
转换成yolo的txt里,有些只有图片路径,没有坐标信息?
多个目标检测,xml文件是用labelimg标注,运行voc_annotation.py将xml文件转换成yolo的txt,生成的txt 里面有些只有图片路径,没有对应的坐标信息?如何解决?
if you are training custom data. make sure your class name is in list "classes"
classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]
if you are training custom data. make sure your class name is in list "classes"
classes = ["aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", "pottedplant", "sheep", "sofa", "train", "tvmonitor"]
我要检测的目标就4类,并且添加到了上面的classes中,但是生成的txt文件中部分行没有坐标和类别数据,只有图片路径数据,这是为什么?
@CherishineNi check "convert_annotation" method in voc_annotation.py
if cls not in classes or int(difficult)==1:
continue
maybe your annotation marks object as "difficult"? (difficult == 1)
@CherishineNi check "convert_annotation" method in voc_annotation.py
if cls not in classes or int(difficult)==1: continue
maybe your annotation marks object as "difficult"? (difficult == 1)
在我的标注文件xml里面 difficult字段是
@CherishineNi @bluesy7585 this YOLOv3 tutorial may help you: https://github.com/ultralytics/yolov3/wiki/Train-Custom-Data
The accompanying repository works on MacOS, Windows and Linux, includes multigpu and multithreading, performs inference on images, videos, webcams, and an iOS app. It also tests to slightly higher mAPs than darknet, including on the latest YOLOv3-SPP.weights
(60.7 COCO mAP), and offers the ability to train custom datasets from scratch to darknet performance, all using PyTorch :)
https://github.com/ultralytics/yolov3
![]() |
![]() |
---|
检查一下类名大小写,我标注的时候用的是大写的字母,在xml文件里边是大写,在voc_annotation里面class那里也要大写。之前用小写不显示坐标,改成大写之后就有了。虽然最后检测出来框上是小写