rezazad68 / BCDU-Net

BCDU-Net : Medical Image Segmentation
712 stars 264 forks source link

Assertion Error #6

Closed MaleehaKhan closed 4 years ago

MaleehaKhan commented 4 years ago

imgs max: 0.0 imgs min: 0.0 Traceback (most recent call last): File "prepare_datasets_DRIVE.py", line 82, in imgs_train, groundTruth_train, border_masks_train = get_datasets(original_imgs_train,groundTruth_imgs_train,borderMasks_imgs_train,"train") File "prepare_datasets_DRIVE.py", line 67, in get_datasets assert(np.max(groundTruth)==255 and np.max(border_masks)==255) AssertionError kindly tell me how to resolve this? just tried to run prepare_datasets_DRIVE.py

rezazad68 commented 4 years ago

Dear, The assertion error shows that the data value is not in the original range 0-255 (which we use for drive data set), if you are using other data set or modified the code, try to use the original setting. to solve the above problem, check the max value of your groundTruth and border_masks data wherever they used in code, they should be 255 before normalization, if they are in range 0-1 then multiply them with 255 to pass the assertion error. Best

MaleehaKhan commented 4 years ago

Thanks for your reply I am using Drive dataset, will try making some changes and will share if error gets resolved.

Get Outlook for Androidhttps://aka.ms/ghei36


From: Reza Azad notifications@github.com Sent: Wednesday, December 11, 2019 10:21:13 AM To: rezazad68/BCDU-Net BCDU-Net@noreply.github.com Cc: MaleehaKhan maleehakhalidkhan@hotmail.com; Author author@noreply.github.com Subject: Re: [rezazad68/BCDU-Net] Assertion Error (#6)

Dear, The assertion error shows that the data value is not in the original range 0-255 (which we use for drive data set), if you are using other data set or modified the code, try to use the original setting. to solve the above problem, check the max value of your groundTruth and border_masks data wherever they used in code, they should be 255 before normalization, if they are in range 0-1 then multiply them with 255 to pass the assertion error. Best

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rezazad68/BCDU-Net/issues/6?email_source=notifications&email_token=AGU6FFWRGF5XORGOQ6LTIV3QYB2ETA5CNFSM4JY5VQS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGR5H2Q#issuecomment-564384746, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGU6FFSDBDM32LSJBZIZJVLQYB2ETANCNFSM4JY5VQSQ.