Hey, yes you are right it’s more related to OpenCV than Pytorch. I can’t remember the error message anymore because I found the solution myself:
cv2.findContours(pred, ...) --> cv2.findContours(np.uint8(pred), ...)