Closed STAR-811 closed 11 months ago
@frank-xwang
Hi! MaskCut should be able to separate disconnected masks as separate instances. Could you experiment with larger fixed_size parameters and varying tau values to assess whether this adjustment improves its performance?
In case you still have troubles on separating all the disconnected masks, you can consider using this package to identify these isolated masks as individual objects within a binary mask. Following is the sample codes. You can add it after this line
from scipy.ndimage import label
labeled_array, num_objects = label(binary_pseudo_mask)
# sample results (1: object 1; 2: object 2, ..., n: object n):
# array([[0, 0, 1, 1, 0, 0],
[0, 0, 0, 1, 0, 0],
[2, 2, 0, 0, 3, 0],
[0, 0, 0, 4, 0, 0]])
Hope it helps.
hi! when i I use the demo images command in readme, the Maskcut can classify different instances:![image](https://github.com/facebookresearch/CutLER/assets/53425563/65f7a3aa-6ecc-430e-a686-c669c66e22a9)
Following the instructions, I typed in following command: python demo.py --img-path imgs/00000.jpg --N 6 --tau 0.2 --vit-arch base --patch-size 8 and change parameters. however, the Maskcut always treat different mice as the same instance. What can I do to solve the problem?![image](https://github.com/facebookresearch/CutLER/assets/53425563/580b6c3c-bc7b-4e4d-aaaf-d5bc0e79784e)