joheras / CLoDSA

122 stars 33 forks source link

The None-Type #85

Open uxhao-o opened 11 months ago

uxhao-o commented 11 months ago

Hi, I am using clodsa to achieve data augmentation for semantic segmentation. And now I meet the error "None-Type". I am trying the debug in pycharm and found the error point in folderLinearSemanticSegmentationAugmentor.py. There is a problem with the logic of the code when processing the path of an input image path into the path of its label. When I set the input path('E:/datasets/Vessels-Datasets/DRIVE/train'), the debug show the path of the input image is E:/datasets/Vessels-Datasets/DRIVE/train/images/32.jpg, but its label path is '/labels/E:/datasets/Vessels-Datasets/DRIVE/train/images/32.jpg'. You can see the error point in the screenshot.

image

uxhao-o commented 11 months ago

I am using clodsa in Windows 11, maybe os.path.sep caused this error. I found os.path.sep is "\" in Win11, os.path.sep is "/" in Linux. And the example in the colab maybe has some error. INPUT_PATH should not end with /. (INPUT_PATH = "nuclei/" in your colab example).
When I append / in the end of the INPUT_PATH will be appeared '//'.

image