YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

How to set background image in training ?

Open sz2three opened this issue 1 year ago • 3 comments

I have two classes ( classA:1, classB:2) in my custom images. Now there are some other images without any bboxes, should I use these images as background images? And How to do the settings (For example, how to define the class index ? should it be 0 ? )

Thank you.

sz2three avatar Sep 20 '23 05:09 sz2three

In coco format, json files have the following dictionaries dict_keys(['images', 'type', 'annotations', 'categories']) . For background images without any target objects in them, you can define the image properties in images dictionary and leave the annotations part empty for that image id. You don't need to set a new class id for background images.

hcmea avatar Sep 21 '23 18:09 hcmea

@hcmea Thank you so much for your reply. Will YOLOX use these images withou any bboxes in training for some operations?

le02146 avatar Sep 22 '23 01:09 le02146

@le02146 In my application I added background images to my training data as well to help model discriminate background images from target objects. In my case there was only one target object.

hcmea avatar Sep 22 '23 20:09 hcmea