HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.48k stars 6.26k forks source link

How to create label text file for image without any object? #659

Closed witignite closed 3 years ago

witignite commented 3 years ago

I notice that the "Save" button is grayed out when no bounding box is selected on the image. How to create a label text file (with empty content) for images without any objects? I'm trying to look into the code but kind of getting lost. Could anyone point me to the code where I should modify to "ungray" the Save button?

5588-jmc commented 3 years ago

You can try to skip this one and rearrange after the file is generated.

witignite commented 3 years ago

@5588-jmc As you said, we could skip an image that doesn't contain objects. Once we finished labeling, we would have a folder containing label text files for each image that we labelled, and we could generate empty label text files (for image without any object) if the label text file is not present in that folder. However, this assumes that we label all images in that folder that contains objects. But in practice, I want to skip some images because they look just the same, or they provide no new information. So I think being able to explicitly save the label file would be helpful.

kinoute commented 3 years ago

@witignite Did you find a solution? I'm looking for something similar. Since the absence of an annotation file could mean two things: either there is nothing to detect on the image, either the image wasn't labelled yet, it's hard to track what we analysed already and what we didn't.

sevgiserra commented 3 years ago

@kinoute When the image is opened in labelImg, you can create an unnecessary bounding box and select a random class and then delete the bounding box. This way the save button is usable and it saves an empty txt file for that image.

kinoute commented 3 years ago

@sevgiserra Unfortunately, this is not really a scalable solution (I have to work on 10k+ images). For the moment, I forked labelImg to force the creation/save of the annotation file no matter what, it seems to work.

I'm going to try to plug a pre-trained model I made on a few samples of my dateset to generate the bounding boxes coordinates, that way I will just have to verify the predictions instead of annotate.

sevgiserra commented 3 years ago

Thank you very much this helped me a lot.

agrawalsourav98 commented 2 years ago

You can also use Verify which automatically creates empty files