albumentations-team / albumentations

Fast and flexible image augmentation library. Paper about the library: https://www.mdpi.com/2078-2489/11/2/125
https://albumentations.ai
MIT License
14.32k stars 1.65k forks source link

min_visibility parameter works for bounding boxes but not for Masks, also want to know how to convert (augmented['bboxes'],augmented['mask']) into coco format #819

Open monster1616 opened 3 years ago

monster1616 commented 3 years ago

Additional context

import albumentations as A transform = A.Compose( [A.RandomCrop(1024,1024)], bbox_params=A.BboxParams(format='coco', label_fields=['category_ids'], min_visibility=0.4) ) transformed = transform(image=image, bboxes=bboxes, mask=mask category_ids=category_ids)

Due to 'min_visibility' parameter bounding box results are fine(skipping the boxes with visibility < 0.4) but in mask image (transformed['mask']) it is not skipping masks with visibility < 0.4

I also need the output in coco format.

Thanks in advance

Dipet commented 3 years ago

If you provide bboxes to Compose in coco format, they must be returned in that format. If not, please provide a minimal example to reproduce the problem.

monster1616 commented 3 years ago

How to use 'min_visibility' parameter for mask ?

Dipet commented 3 years ago

Unfortunately, the library does not have this functionality right now.

monster1616 commented 3 years ago

Thanks for reply, I also want to know that by using Albumentations API how much accuracy we can increase in faster RCNN and mask RCNN model(just give me rough idea like 5%,10% etc).

Dipet commented 3 years ago

It is based on your pipeline, tasks and augmentations. There you can find benchmark results for our auto augmentation tool https://github.com/albumentations-team/autoalbument-benchmarks