-
Notifications
You must be signed in to change notification settings - Fork 149
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
Tutorial on COCO and VOC parsers #187
Comments
@lgvaz , you think it is a good idea to have mantisshrimp automatically create the classes dictionary mapping IDs to labelnames? The annotations.json have both a category_id and a category_name. I was trying to create a tutorial for COCO Object Detection, but then realized, I might need to parse the JSON myself to get this info out, which seems redundant. I would do something like this (code from fastai's get_annotations):
|
This is a topic that we've been internally discussing in the past weeks. It's very hard to write an automated extractor of classes that safely works for all use cases (all Parsers). But we might be able to design something specific for COCO.
The solution we came for now, is to let the user figure out how to create But maybe we can provide some helper functions so the standard use case is facilidated... I'm open to ideas =) |
The standard COCO JSON will already contain the category_ids and category_names.
So, it is matter of reading the JSON which is already being done with the COCO parser. But, you have already implemented a Helper function which now makes this simpler. I agree that the user needs to understand the model they want to use and the requirements thereof. |
I just merged this helper function, you can now do: class_map = datasets.coco.class_map("path_to_annotations_file", background=0) This assumes that background is not already present in your categories, if it's (or you don't need a background id), you can do |
Done! See tutorials on the docs =) |
📓 New Tutorial
COCO and VOC are the two most common annotation formats, we need a tutorial (or two, one for each) that shows how to use them.
mentioned in #79
Don't remove
Main issue for examples: #39
The text was updated successfully, but these errors were encountered: