shenyunhang / APE

[CVPR 2024] Aligning and Prompting Everything All at Once for Universal Visual Perception
https://arxiv.org/abs/2312.02153
Apache License 2.0
478 stars 29 forks source link

How to reduce the jagged edge #37

Open shippingwang opened 5 months ago

shippingwang commented 5 months ago

After testing with_mask in default demo_lazy.py There are jagged edges around the body that cannot be ignored, Is it not good enough? or should I adjust some args to improve, like resolution? in addition, how to merge stuff areas? APE doesn't tell the diff between stuff and thing? wecom-temp-470919-6c84d801994da6df6e82b06964d0f595

shenyunhang commented 4 months ago

It is indeed not good enough. APE only uses a simple segmentation module.

We have used Grabcut to improve results, which will take more time in inference.

To enable Grabcut in the demo, the following line should be uncommented:

https://github.com/shenyunhang/APE/blob/main/demo/predictor_lazy.py#L233

This line should remove and False: https://github.com/shenyunhang/APE/blob/main/demo/predictor_lazy.py#L245

shenyunhang commented 4 months ago

APE does not distinguish things and stuff. We can merge all segmentation of the same classes by passing the --with_sseg option to the demo. The merge operation is at https://github.com/shenyunhang/APE/blob/main/ape/modeling/ape_deta/deformable_detr_segm_vl.py#L875.