Semantic-Segment-Anything icon indicating copy to clipboard operation
Semantic-Segment-Anything copied to clipboard

Human class

Open alvarofdzg opened this issue 1 year ago • 1 comments

Can we get the mask only showing a human body? Not with all the other elements in the image/video

alvarofdzg avatar Apr 12 '23 01:04 alvarofdzg

You can achieve this by using SSA and making some modifications. We have released a new close-set segmentation model based on SAM. If you want to segment a single class e.g., 'human body', there are two ways: (1) you can find an existing model or use your previously trained single class segmentor as the semantic branch in SSA (https://github.com/fudan-zvg/Semantic-Segment-Anything/blob/main/scripts/main_ssa.py#L48); (2) you can use a multi-category segmentation semantic segmentation model as the semantic branch and add a post-processing step to classify other categories as background.

We have open-sourced the close-set version SSA code. Please refer to the readme and try running one of them with some modifications.

Jiaqi-Chen-00 avatar Apr 14 '23 10:04 Jiaqi-Chen-00