How to crop multi images use list bounding box position in the file (python)?
问题 I have a dataset of images.jpg and a file csv has values bounding box position is top, left, right, bottom. I use ubuntu OS and the python language. 回答1: Something like this should work. It assumes a few things: that the separator in your CSV is a semi-colon, i.e. ; that your CSV file is called images.csv that you want the cropped images output to a sub-directory called output that you have PIL/Pillow installed, though it could easily be adapted to use pyvips , OpenCV , skimage #!/usr/bin/env