Closed levan92 closed 2 years ago
@levan92 Do you want to define a new data processing pipeline or just modify gt_mask? To speed up training, we recommend PolygonMasks.
Thanks for your prompt reply! I am implementing a new augmentation pipeline, in which I will need to add new masks and modify the gt_masks, before returning the results in __call__
To speed up training, we recommend PolygonMasks.
From what I understand, LoadAnnotations
converts it to BitmapMasks by default right? Since poly2mask
of LoadAnnotation
is True
by default.
Edit: Okay, I noticed that in common/mstrain-poly_3x_coco_instance.py
, poly2mask
is flagged to False. However, in my custom augmentation pipeline, I require to do certain mask operations in bitmap/ndarray format. Would you recommend to convert it back to PolygonMasks using extra conversion steps similar to this or would you say I'm better off leaving it in Bitmap format?
Thanks for your prompt reply! I am implementing a new augmentation pipeline, in which I will need to add new masks and modify the gt_masks, before returning the results in
__call__
To speed up training, we recommend PolygonMasks.
From what I understand,
LoadAnnotations
converts it to BitmapMasks by default right? Sincepoly2mask
ofLoadAnnotation
isTrue
by default.Edit: Okay, I noticed that in
common/mstrain-poly_3x_coco_instance.py
,poly2mask
is flagged to False. However, in my custom augmentation pipeline, I require to do certain mask operations in bitmap/ndarray format. Would you recommend to convert it back to PolygonMasks using extra conversion steps similar to this or would you say I'm better off leaving it in Bitmap format?
The config is just an example, it uses polymask because sometimes it is faster. You can simply set poly2mask
to True and process the bitmap masks in your pipeline.
Hi! I'm implementing a custom pipeline that will require me to modify the gt_masks. I have some implementation questions that I'll need some advice for.
In order to append to the existing set of masks, is the best way to convert the current gt_masks to ndarray, concatenate the new masks, then reinstantiate a new BitmapMasks object with the resulting matrix?