tryolabs / luminoth

Deep Learning toolkit for Computer Vision.
https://tryolabs.com
BSD 3-Clause "New" or "Revised" License
2.4k stars 399 forks source link

How can I convert a VOC style data base into a COCO style database #203

Closed EthanReid closed 5 years ago

dekked commented 6 years ago

Hello Ethan!

Can you expand? Are you trying to get those datasets in a format that can be ingested by Luminoth? For that, you must transform the dataset into TFrecords format. You can read this page in the docs for how to do that.

EthanReid commented 6 years ago

Thanks for the reply,

I ran this lumi dataset transform \ --type pascal \ --data-dir DataOut \ --output-dir datasets/pascal/tf/ \ --split train --split val

and I get this File "/home/parallels/.virtualenvs/cv/lib/python3.5/site-packages/luminoth/tools/dataset/readers/object_detection/pascalvoc.py", line 46, in _validate_structure raise InvalidDataDirectory('Labels path is missing') luminoth.tools.dataset.readers.base_reader.InvalidDataDirectory: Labels path is missing

I am using a custom data set, but it should be in the format of Pascal Voc. Do you know what is going on?

dekked commented 6 years ago

This error is when it cannot find ImageSets/Main folder. Are you sure your dataset is in the exact same format as expected from Pascal VOC?:

ImageSets/Main
JPEGImages
Annotations
EthanReid commented 6 years ago

Sorry, I'm still pretty new to this

I'm not 100% sure. My database goes images/image1.jpg

Can I use what I have?

screen shot 2018-08-17 at 5 11 08 pm screen shot 2018-08-17 at 5 09 30 pm screen shot 2018-08-17 at 5 09 18 pm

Not sure if this was the right path to take, but I added a ImageSets folder and put train.txt and labels.txt in there.

dekked commented 6 years ago

Hi @EthanReid!

There seems to be no dataset reader in Luminoth that supports this format.

For reading a dataset, the folder structure and format of the annotation must be supported by Luminoth (Pascal VOC, COCO, etc).

Where did you get this dataset from? Is it open and public? If so, we could take a look and try to build a reader that works for this.