There are many libraries in Python that have many uses, one of the most popular libraries is OpenCV.
As you can see in the file, you only need to choose the image that you want to crop (see "example.jpg"), then determine the measurements of the part you want, then you will get the cropped image with high accuracy and efficiency (see "The result.jpg").