shackenberg / Minimal-Bag-of-Visual-Words-Image-Classifier

Implementation of a content based image classifier using the bag of visual words approach in Python together with Lowe's SIFT and Libsvm.
236 stars 94 forks source link

IOError: decoder jpeg not available #18

Closed buzzo123 closed 7 years ago

buzzo123 commented 7 years ago

i have this error:

---------------------
## loading the images and extracting the sift features
searching for folders at trainingset/
found following folders / categories:
['cat', 'dog']
---------------------
extracting Sift features
calculating sift features for trainingset/cat/1405833138202356734_cats.jpg
working on  trainingset/cat/1405833138202356734_cats.jpg
Traceback (most recent call last):
  File "learn.py", line 119, in <module>
    cat_features = extractSift(cat_files)
  File "learn.py", line 50, in extractSift
    sift.process_image(fname, features_fname)
  File "/home/buzzo/Desktop/Minimal-Bag-of-Visual-Words-Image-Classifier-master/sift.py", line 30, in process_image
    im = Image.open(imagename).convert('L')
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 679, in convert
    self.load()
  File "/usr/local/lib/python2.7/dist-packages/PIL/ImageFile.py", line 189, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 385, in _getdecoder
    raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
shackenberg commented 7 years ago

Something went wrong with your PIL/Pillow installation. Try: http://stackoverflow.com/questions/8915296/python-image-library-fails-with-message-decoder-jpeg-not-available-pil

buzzo123 commented 7 years ago

thanks! now it's works!