xuebinqin / DIS

This is the repo for our new project Highly Accurate Dichotomous Image Segmentation
Apache License 2.0
2.19k stars 254 forks source link

GT_Encoder f1_score always 0 #53

Open kashyappiyush1998 opened 1 year ago

kashyappiyush1998 commented 1 year ago

I tried overfitting on fewer images [24] to see if issue is real, f1 error array and hence np.amax(f1) both are coming out to be 0. Any solutions?

kashyappiyush1998 commented 1 year ago

I believe there is a correction to be made:

pre,rec,f1,mae = f1_mae_torch(pred_val*255, gt, valid_dataset, i_test, mybins, hypar)

should be

pre,rec,f1,mae = f1_mae_torch(pred_val 255, gt 255, valid_dataset, i_test, mybins, hypar)

ogladkov commented 1 year ago

I have the same issue. F1 is 0 always.

kashyappiyush1998 commented 1 year ago

Multiplying gt by 255 solved it for me

PiggyJerry commented 1 year ago

I tried overfitting on fewer images [24] to see if issue is real, f1 error array and hence np.amax(f1) both are coming out to be 0. Any solutions?

The code has been updated, please try to use that to see whether the error still happens?