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
Please check this error
Traceback (most recent call last):
File "test.py", line 263, in
main()
File "test.py", line 86, in main
main_worker(args.train_gpu, args.ngpus_per_node, args)
File "test.py", line 144, in main_worker
loss_val, mIoU_val, mAcc_val, allAcc_val, class_miou = validate(val_loader, model, criterion)
File "test.py", line 237, in validate
allAcc = sum(intersection_meter.sum) / (sum(target_meter.sum) + 1e-10)
TypeError: 'int' object is not iterable
The text was updated successfully, but these errors were encountered:
I am facing the same error actually. It turned out to be because the val_loader was empty it wasn't able to load any images. If you change this line in utils/dataset.py to use Image.open() instead of cv2.imread() when reading the labels it will work. For some reason cv2.imread is returning weird values for the labels probably sth related to the types being read. But Image.open doesn't have this issue.
Please check this error
Traceback (most recent call last):
File "test.py", line 263, in
main()
File "test.py", line 86, in main
main_worker(args.train_gpu, args.ngpus_per_node, args)
File "test.py", line 144, in main_worker
loss_val, mIoU_val, mAcc_val, allAcc_val, class_miou = validate(val_loader, model, criterion)
File "test.py", line 237, in validate
allAcc = sum(intersection_meter.sum) / (sum(target_meter.sum) + 1e-10)
TypeError: 'int' object is not iterable
The text was updated successfully, but these errors were encountered: