MhLiao / TextBoxes_plusplus

TextBoxes++: A Single-Shot Oriented Scene Text Detector
Other
954 stars 279 forks source link

Tile cannot extend outside image #116

Closed CLT29 closed 5 years ago

CLT29 commented 5 years ago

File "/opt/caffe/examples/text/crop_image.py", line 165, in crop_image crop=Image.fromarray(crop) File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 2482, in fromarray return frombuffer(mode, size, obj, "raw", rawmode, 0, 1) File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 2435, in frombuffer return frombytes(mode, size, data, decoder_name, args) File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 2368, in frombytes im.frombytes(data, decoder_name, args) File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 795, in frombytes d.setimage(self.im) ValueError: tile cannot extend outside image

NicoLivesey commented 5 years ago

Hi @CLT29 have you find the solution to your problem ? Most people get this issue on the Pillow crop() function but in my case I crop the image as an array.

crop = image[a:b, c:d]
crop_pil = Image.fromarray(crop)
CLT29 commented 5 years ago

I never figured it out. It was one image causing the problem.