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

COCO json annotation format? #2

Closed
ahundt opened this issue Mar 22, 2017 · 7 comments
Closed

COCO json annotation format? #2

ahundt opened this issue Mar 22, 2017 · 7 comments

Comments

@ahundt
Copy link

ahundt commented Mar 22, 2017

Is cocostuff available in the coco json annotation format?

@nightrome
Copy link
Owner

Unfortunately not yet. In fact we are currently working on annotating all images in COCO and the final dataset will be provided in JSON format. Could you tell me what use-case you have in mind?

@ahundt
Copy link
Author

ahundt commented Mar 23, 2017

I have python code that can load the COCO dataset and train a segmentation classifier, so with the same json format I could train on these new annotations simply by changing which annotation file I load. Thanks for the consideration!

@nightrome
Copy link
Owner

Okay, I'll look into it. Only problem is that we don't have a notion of instances, as for the COCO things (1 car = 1 instance). So I guess I'll go with individual superpixels or connected components for now.

@ahundt
Copy link
Author

ahundt commented Mar 23, 2017

Cool! That will actually make this better than the original COCO for my use cases. I'm not using instances at the moment so I didn't consider that difference. Perhaps there is a clean way to handle that that would keep most existing code using upstream coco working correctly?

Some possibilities:

  1. Mark everything as a single instance and clearly explain this discrepancy up front in the docs/comments for the dataset
  2. Provide a patched fork of pycocotools that handles non-instance segmentations
    • Perhaps the upstream coco would also accept such a pull request if no breaking changes are introduced.
  3. Actually add instance annotations
    • This is super complicated and time intensive so I understand this is likely impractical.

Thanks again for considering this feedback!

@nightrome
Copy link
Owner

Now I have created the JSON annotations. The solution I took was to create one annotation (in JSON) per label that is present in an image (not superpixels or connected components). To avoid overlap with the COCO thing labels I mapped the stuff labels to the range 92-182. For more information see https://github.com/nightrome/cocostuff#json-format.

I would appreciate if you could test the JSON format with your code and see if it behaves the same way as COCO.

@ahundt
Copy link
Author

ahundt commented Mar 31, 2017

Fantastic! With these, should I be able to use the images from the original COCO dataset or should I download your version linked on the readme separately?

@nightrome
Copy link
Owner

Hi, the images are just copied and therefore the original is at least as good. Note that our JSON is just the stuff and no thing annotations, so you'll still need:http://msvocds.blob.core.windows.net/coco2014/train2014.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants