facebookresearch / Mask2Former

Code release for "Masked-attention Mask Transformer for Universal Image Segmentation"
MIT License
2.46k stars 372 forks source link

How to generate prediction of instance segmentation without bounding box, class, edge and probability? #157

Open aihcyllop opened 1 year ago

aihcyllop commented 1 year ago

When I finish training for instance segmentation and use demo.py to generate masks, I get the result of the first image.

First image includes box and class(0 in this case) and probability.

Also, the segment object has edge with different colors.

I want to ask how to generate the mask like the second image.

I want to generate image without edge, box, probability and class.

Hope someone can help and thank you so much.

11

Jxzde commented 1 year ago

Why am I the opposite of you, I need boxs, but only mask

Jxzde commented 1 year ago

@aihcyllop How did you go about training with your own example segmentation dataset? Do you have any reference material? Thank you very much!

pratyush-1 commented 1 year ago

@aihcyllop @Jxzde any work up you guys did, I am also in a situation where I would like to get the prediction of instance segmentation given the masks alone and without boxes, classes, edge and probability

gauraviisc12 commented 7 months ago

can u show how did u generate mask using demo.py @aihcyllop

aihcyllop commented 7 months ago

can u show how did u generate mask using demo.py @aihcyllop

do u mean this ? python demo/demo.py --config-file configs/coco/instance-segmentation/dinat/maskformer2_dinat_large_IN21k_384_bs16_100ep.yaml --input datasets/"yourdatasetfolder"/*.png --output demo/"foldertoputresult" --opts MODEL.WEIGHTS output/model_final.pth