quantumxiaol / yolov8-small-target-detection

基于yolov8实现小目标检测,在NWPU VHR-10和DOTA上测试
2 stars 0 forks source link

Data set processing #1

Open ly1035327995 opened 1 week ago

ly1035327995 commented 1 week ago

Hello, there is no label information in the negative image set of NWPU data set. May I ask what to do when it is converted into yolo format data set?

quantumxiaol commented 1 week ago

For YOLO, if an image has no objects, you should create an empty label file for it. This way, YOLO will understand that there are no objects in the image.

In the NWPU dataset, the negative image set contains 150 images without any objects. You can name them as 651.jpg and create an empty label file 651.txt. When YOLO receives an empty label file, it will know that there are no objects inside.

quantumxiaol commented 1 week ago

ALL images are used during training. If no labels are found then the image simply has no labels.

'missing' labels mean that no labels.txt file is found, which is fine, the image simply has no objects. 'empty' means an empty labels.txt file was found. They both have the same result.

https://github.com/ultralytics/yolov5/discussions/7148

ly1035327995 commented 1 week ago

What that means is that images that don't have labels create an empty.txt for them

ly1035327995 commented 1 week ago

If I want to run nwpu on yolo, untagged pictures don't participate in training, right?

quantumxiaol commented 1 week ago

Yes, if you want to run the NWPU dataset on YOLO and ensure that untagged images (images without any objects) do not participate in training, you need to follow a specific process. Here’s how you can handle it:

No Label File: If an image does not contain any objects, you can omit the corresponding label file. YOLO will skip these images during the training process. This means the image will not be used in training if there is no .txt file associated with it.

Empty Label File: Alternatively, you can create an empty label file for each image without objects. YOLO will recognize the empty file and understand that there are no objects in that image. However, this will still include the image in the training dataset but with no targets to learn from.