UNET-ZOO
UNET-ZOO copied to clipboard
u and v need to have the same number of columns
Hi, I try and try but always get this, could you give me some guidance?
File "main.py", line 268, in <module> train(model, criterion, optimizer, train_dataloaders,val_dataloaders, args) File "main.py", line 175, in train best_iou,aver_iou,aver_dice,aver_hd = val(model,best_iou,val_dataloader) File "main.py", line 112, in val hd_total += get_hd(mask[0], img_y) File "/content/UNET/metrics.py", line 148, in get_hd hd1 = directed_hausdorff(mask, predict)[0] File "/usr/local/lib/python3.7/dist-packages/scipy/spatial/distance.py", line 454, in directed_hausdorff raise ValueError('u and v need to have the same ' ValueError: u and v need to have the same number of columns
With appreciation
I had the same problem,Have you solved it?
I've had the same problem, but I've solved it and it might inspire you. I resize the size of the picture during training, so in get _ iou(), get _ had(), get _ dice(), mask picture need to be resized in the same size, hoping to help you.
I also need to resize the size of the picture during trainning ,could you tell me in which section to perform this operation ?