lukemelas / deep-spectral-segmentation

[CVPR 2022] Deep Spectral Methods: A Surprisingly Strong Baseline for Unsupervised Semantic Segmentation and Localization
227 stars 41 forks source link

CRF Segmentations are entirely black #23

Closed KahaanS closed 8 months ago

KahaanS commented 9 months ago

I have been following the instructions for object segmentation and output is as expected until the CRF segmentation step at which point the output images are entirely black. The masks produced in the previous step are correct, and the upscaling the mask also works, however the output from the denseCRF function is a completely black image.

KahaanS commented 8 months ago

Adding this bit of code after calculating the CRF segmap before applying it to the image fixes this. Closing the issue now.

if np.max(segmap_crf) == 1:
        segmap_crf = segmap_crf * 255