jveitchmichaelis / deeplabel

A cross-platform desktop image annotation tool for machine learning
205 stars 39 forks source link

Support imports of common project formats #6

Open jveitchmichaelis opened 4 years ago

jveitchmichaelis commented 4 years ago

Minimally should be able to import arbitrary projects in the following formats:

harshalgajjar commented 4 years ago

I'm unable to export to Darknet properly, all the .txt files are empty (0 bytes). Can you please provide an example (support I have two classes created in the software - cat & dog)? Also, thanks a ton, this is such a wonderful tool!

jveitchmichaelis commented 4 years ago

Sure, I'll take a look. Can you try exporting to another format to see if you get any labels out?

Bit odd that you're getting empty text files, that's normally the case when you have unlabelled images. So it's exporting the images OK?

harshalgajjar commented 4 years ago

COCO works fine. YOLO's name (which file doesn't work):

cat
dog
jveitchmichaelis commented 4 years ago

OK, just to check - are you importing or exporting?

If import can you show me a label file too? (or even upload a zip of your project with some examples and I can try running it myself)

harshalgajjar commented 4 years ago

Apologies, I assumed that setting the .names file for a detector makes use of it while exporting. There isn't a bug in the code. :)

jveitchmichaelis commented 4 years ago

@harshalgajjar actually this should be the case, see here for example: https://github.com/jveitchmichaelis/deeplabel/blob/ecc24c5d6c36818f6ab29c4817a4b045dc25c5c8/src/darknetexporter.cpp#L3 that code takes the names file and generates the output ID numbers.

Setting the names file determines which labels get exported - it's important for the case when e.g. you label some images, and so does your friend, but you in your deeplabel project you didn't create the classes in the same order (say you have cat=1, dog=2 and they have dog=1, cat=2).

That's only the case for darknet currently - though you've highlighted a good point. This should probably be the same for all the exporters that explicitly use class IDs; GCP for example uses the class name [string] so it's not an issue.