There was a bug in the previous validation logic: it checked the quad in the mask against the dimensions of the original image.
There was a bug in the previous validation logic: it checked the quad in the mask against the dimensions of the original image.