jveitchmichaelis / deeplabel

A cross-platform desktop image annotation tool for machine learning
207 stars 40 forks source link

COCO Python API is expecting different labels #4

Closed laibe closed 4 years ago

laibe commented 4 years ago

Hi @jveitchmichaelis thanks for your great work!

I gave the experimental COCO export functionality a try and found that the COCO Python API is expecting high-level labels to be defined as images and annotations. Otherwise image ids are not loaded by the API.

So I suggest changing

https://github.com/jveitchmichaelis/deeplabel/blob/2506147a751a936c5cef45dfe0678f73c48a5091/src/cocoexporter.cpp#L182-L183

to

label_file["images"] = image_array; 
label_file["annotations"] = annotations_array; 
jveitchmichaelis commented 4 years ago

Yep this sounds sensible, good catch. I've also seen multiple datasets that don't respect the standard (FLIR ADAS, for example), but I'd rather not be responsible for creating more ;)

http://cocodataset.org/#format-data

jveitchmichaelis commented 4 years ago

Should be fixed in https://github.com/jveitchmichaelis/deeplabel/commit/51d2c4cbaae34bd182d2a7dd6c95d96928060cf5, will wait for Travis to complete before closing.

laibe commented 4 years ago

perfect, thanks for the quick fix!

jveitchmichaelis commented 4 years ago

No worries. I have some other updates I'm working on before I upload a new binary, but let me know if you need one for Windows.