mhamilton723 / STEGO

Unsupervised Semantic Segmentation by Distilling Feature Correspondences
MIT License
712 stars 143 forks source link

Loss function issue #19

Closed HeyGazz closed 2 years ago

HeyGazz commented 2 years ago

Hi @mhamilton723, i'm trying to implement your paper on Matlab, using your pipeline but with different net architectures and types of images.

When i compute the correlation loss (eq 4, page 5) i get very big number (for example -4000 ). Equation The problem is when i sum all the elements of my 384x384x5 tensor even if every cells has a value between 0 and 1 the global sum tends to a big number.

My question is, can you suggest me a way to resolve this issue?

mhamilton723 commented 2 years ago

Hey @HeyGazz, we take the mean in most examples, I probably just forgot to add other 1/HWIJ factor in that equation