Icevision: VGG image annotator parser

Created on 4 Dec 2020  路  6Comments  路  Source: airctic/icevision

馃殌 Feature

Add a parser for the VGG Image Annotator format described here

Suggestion: Create the file icevision/parsers/vgg_parser.py. Use the other two implemented parsers as a structure guide.

The hardest part will be adding tests, for that we'll need to add some images and annotations under samples/vgg and follow similar tests to tests/parsers/test_voc_parsers.py

enhancement help wanted

Most helpful comment

Hey! I guess this one is for me! Happy to take it on. :)

All 6 comments

Hey! I guess this one is for me! Happy to take it on. :)

Hey @jerbly ,

In IceVision version 0.2.0, we unified parsers.SizeMixin functions image_widthand image_heightinto a single function image_width_height. So, we need to make the following change in the ViaParser class:

We need to replace this:

    def height(self, o) -> int:
        return open_img(self.source/o[1]['filename']).shape[0]

    def width(self, o) -> int:
        return open_img(self.source/o[1]['filename']).shape[1]

with this:

    def image_width_height(self, o) -> Tuple[int, int]:
        return get_image_size(self.filepath(o))

We need to test the Parser against the latest IceVision version. Could you please double check on your end that everything works properly with the new API.

Also I was wondering what is the most intuitive class name we should use. Either the ViaParser or VIAParser. If we follow both the COCO and the VOC Parsers convention, I would go with VIAParser

@lgvaz any thoughts on the naming?

Hey, I saw that image_width_height change already. That won't be an issue - I had my project frozen on 0.1.4 while I was working on a bunch of other stuff. And, I'll use VIAParser for consistency. I'm starting to put this together now but I have a super-busy week IRL so it'll be a few days.

@ai-fast-track , @lgvaz - I found the time to get this done after all, the PR is in... The 3.6 build is failing though and I don't think that's to do with me??

@jerbly

The 3.6 build is failing though and I don't think that's to do with me??

Yeah, this is related to the latest numpy version which doesn't support 3.6 anymore

closed with #578

Was this page helpful?
0 / 5 - 0 ratings