Detecting shapes in an image

Ok, @Micka understood. Commenting the resizing code helped check the mask image.

Finding ways to get the masked image working for contour detection. Current error:

cv2.error: OpenCV(4.5.4) :-1: error: (-5:Bad argument) in function 'findContours'
> Overload resolution failed:
>  - image data type = 0 is not supported
>  - Expected Ptr<cv::UMat> for argument 'image'

Edit: Resolved. This was a data type issue.