keras-yolo3 icon indicating copy to clipboard operation
keras-yolo3 copied to clipboard

转换成yolo的txt里,有些只有图片路径,没有坐标信息?

Open CherishineNi opened this issue 5 years ago • 6 comments

多个目标检测,xml文件是用labelimg标注,运行voc_annotation.py将xml文件转换成yolo的txt,生成的txt 里面有些只有图片路径,没有对应的坐标信息?如何解决?

CherishineNi avatar Mar 29 '19 01:03 CherishineNi

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"]

bluesy7585 avatar Mar 29 '19 05:03 bluesy7585

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 avatar Mar 29 '19 05:03 CherishineNi

@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)

bluesy7585 avatar Mar 29 '19 07:03 bluesy7585

@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字段是
捕获1

CherishineNi avatar Mar 29 '19 08:03 CherishineNi

@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



fourth-archive avatar Apr 11 '19 17:04 fourth-archive

检查一下类名大小写,我标注的时候用的是大写的字母,在xml文件里边是大写,在voc_annotation里面class那里也要大写。之前用小写不显示坐标,改成大写之后就有了。虽然最后检测出来框上是小写

parajean avatar May 07 '21 17:05 parajean