This repository has been archived by the owner on Oct 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Binary Mask with transparent SementationMask interface (#473)
* support RLE and binary mask * do not convert to numpy * be consistent with Detectron * delete wrong comment * [WIP] add tests for segmentation_mask * update tests * minor change * Refactored segmentation_mask.py * Add unit test for segmentation_mask.py * Add RLE support for BinaryMaskList * PEP8 black formatting * Minor patch * Use internal that handles 0 channels * Fix polygon slicing
- Loading branch information
Showing
4 changed files
with
478 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b4d5465
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @botcs
will this modification slow down the speed for training and testing?
b4d5465
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @zimenglan-sysu-512
My short answer is: no, it will not slow down training.
If you have managed to feed polygons before into your training script than it will be completely the same (apart from the few assertions for sanity checking the input and operations on your polygons but again, if your original polygon script was working this will work as well).
In general it depends on how are you going to use it: if you are using binary mask representation, than probably the training speed will decrease significantly because in the segmentation loss all the instances are cropped and resized sequentially. You can use the updated interface to convert masks to polygons but be careful because it may distort the mask.