You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im trying to do some binary segmentation and am receiving values that I should on validation and test data. After 3 iterations it says that the IOU is perfect. when it shouldn't be. its just black and white masks with shape (512,512). Im following this git repo for mae_unet https://github.com/implus/mae_segmentation.
I cant figure out how im supposed to make it work.
greyscale transform acts as a normalization function also:
@PIPELINES.register_module()
class ConvertToGrayScaleMask(object):
"""Converts a segmentation map to a binary mask rather than the color coded one."""
def __init__(self):
pass
def __call__(self, results):
"""Call function to convert seg map to binary mask."""
for key in results.get("seg_fields", []):
if len(results[key].shape) == 3 and results[key].shape[2] == 3:
results[key] = cv2.cvtColor(results[key], cv2.COLOR_BGR2GRAY)
results[key] = cv2.normalize(results[key], None, alpha=0, beta=255, norm_type=cv2.NORM_MINMAX)
results[key] = np.where(results[key] > 0, 1, 0).astype(np.float32)#allows for test.py to work
return results
def __repr__(self):
return self.__class__.__name__
The text was updated successfully, but these errors were encountered:
Hi
Im trying to do some binary segmentation and am receiving values that I should on validation and test data. After 3 iterations it says that the IOU is perfect. when it shouldn't be. its just black and white masks with shape (512,512). Im following this git repo for mae_unet https://github.com/implus/mae_segmentation.
I cant figure out how im supposed to make it work.
Test data:
validation:
Custom Dataloader:
config:
greyscale transform acts as a normalization function also:
The text was updated successfully, but these errors were encountered: