Hello b3059651,
Thank you for sending the data.
The script really works not so fast, due to only one CPU core used by Python, so the working time depend on the number of images, number of polygons and number of steps (just four corners or intermediate positions).
However, on our side the script has finished in five minutes.
The only change I've made was fixing the indent for loops and conditions - just one "tab" instead of two somehow appeared in your script version. And also corrected the dimensions of image for "steps": steps=[(0,0), (3648-1,0), (3648-1,2736-1), (0,2736-1)]
I think that the main problem is in fact that you are writing "result" into Console - it slows down the process as the print operation is performed for every polygon of the model multiple times!
Also I can suggest to put file.flush() line after the information is written to the file.