orobix / retina-unet

Retina blood vessel segmentation with a convolutional neural network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assertion Error

MaleehaKhan opened this issue · comments

Traceback (most recent call last):
File "prepare_datasets_DRIVE.py", line 81, 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 66, in get_datasets
assert(np.max(groundTruth)==255 and np.max(border_masks)==255)
AssertionError
.........kindly tell me solution ............

Traceback (most recent call last):
File "prepare_datasets_DRIVE.py", line 81, 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 66, in get_datasets
assert(np.max(groundTruth)==255 and np.max(border_masks)==255)
AssertionError
.........kindly tell me solution ............

Has anybody found a fix for this issue?

AssertionError Traceback (most recent call last)
/tmp/ipykernel_129/2441715887.py in
78
79 #getting the training datasets
---> 80 imgs_train, groundTruth_train, border_masks_train = get_datasets(original_imgs_train,groundTruth_imgs_train,borderMasks_imgs_train,"train")
81 print ("saving train datasets")
82 write_hdf5(imgs_train, dataset_path + "DRIVE_dataset_imgs_train.hdf5")

/tmp/ipykernel_129/2441715887.py in get_datasets(imgs_dir, groundTruth_dir, borderMasks_dir, train_test)
64 print (("imgs max: " +str(np.max(imgs))))
65 print ("imgs min: " +str(np.min(imgs)))
---> 66 assert(np.max(groundTruth)==255 and np.max(border_masks)==255)
67 assert(np.min(groundTruth)==0 and np.min(border_masks)==0)
68 print ("ground truth and border masks are correctly withih pixel value range 0-255 (black-white)")