Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keep images without annotation #56

Closed
vincentlux opened this issue May 16, 2022 · 3 comments
Closed

keep images without annotation #56

vincentlux opened this issue May 16, 2022 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@vincentlux
Copy link

Hi, thanks for opensourcing this great tool! It's quite helpful. Do you know if there is a walk-around that I can use to keep the image information for images that do not have annotations? For example, if one image does not have any annotation, ideally it will be kept in the "images" field when exported to the coco format.

@alexheat
Copy link
Contributor

alexheat commented May 16, 2022

Hello I understand your requirement @vincentlux . I have done some special work to handle images that don't have any annotations but it sounds like it is not working perfectly yet. Including a reference to the image in the coco file output sounds like the ideal behavior to me too.

Could you possibly share the dataset that you are using for testing (and your code as well) so that I can make sure it works for that type of dataset?

@alexheat alexheat added the enhancement New feature or request label May 16, 2022
@alexheat alexheat self-assigned this May 16, 2022
@vincentlux
Copy link
Author

Thanks for the quick reply! I currently don't have a public dataset with background images in hand... I want to add images without annotations because I am trying to add background images to object detection models to reduce False Positive cases. Adding this to YOLOv5 dataset is easy (just copy/paste images to the ./images folder), but then I got the problem I mentioned when converting to coco data format...

@alexheat
Copy link
Contributor

Hello @vincentlux. I think this will work if you create an empty annotation files for each of the images. For example if you add background1.jpg create an annotation file called background1.txt. The file can be empty, with no labels.

Can you try that?

I read that link that you provided above and I think that even the yolo models will require the empty annotation files in order to include the background images when training. I saw a comment that said "No labels are required for background images." I think that means that no labels are required within the annotation files but the annotation files are still required.

@alexheat alexheat added question Further information is requested and removed enhancement New feature or request labels May 23, 2022
@alexheat alexheat closed this as completed Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants