waspinator / pycococreator

Helper functions to create COCO datasets
Apache License 2.0
765 stars 179 forks source link

Update function #15

Open Shanlans opened 5 years ago

Shanlans commented 5 years ago

If one mask file contain several same class area. This modification can fix the problem

Shanlans commented 5 years ago

I think if we generate the single class annotation files from mask file of each image, it will have some problem. I need to calculate the distance and any other information to apart each item which belongs to the same class from the current class layer ( the mask already was one hot operation). I think this case your code doesn't support. So I did some little change. Please check it, I am so glad to get some feedback from you.

solauky commented 4 years ago

Hello, there is a problem with this update: when an uncommented image appears, the error is "TypeError: 'NoneType' object is not iterable".Annotation_info, segmentation_id = create_annotation_info(segmentation_id, image_id, category_info, binary_mask, image.size, tolerance=2), none will be returned to annotation_info, segmentation_id at the same time.

solauky commented 4 years ago

Another problem is area. The same class shares a total area

solauky commented 4 years ago

Another problem is area. The same class shares a total area