The dumb reason your fancy Computer Vision app isn’t working: Exif Orientation


24 bookmarks. First posted by rogerhsueh 14 days ago.


Ahahahaha, this is amazing.

"The dumb reason your fancy Computer Vision app isn’t working: Exif Orientation"
from twitter_favs
9 days ago by enne
This means that when you load an image with almost any Python library, you get the original, unrotated image data. And guess what happens when you try to feed a sideways or upside-down image into a face detection or object detection model? The detector fails because you gave it bad data.
opencv  exif  photography  machinelearning  python  sideway 
9 days ago by yorksranter
tl;dr newer PIL has `exif_transpose(img)`
python  exif 
10 days ago by davewsmith
This made me think of it recently
from twitter
10 days ago by libbymiller
Adam Geitgey:
<p>Exif metadata is not a native part of the Jpeg file format. It was an afterthought taken from the TIFF file format and tacked onto the Jpeg file format much later. This maintained backwards compatibility with old image viewers, but it meant that some programs never bothered to parse Exif data.

Most Python libraries for working with image data like numpy, scipy, TensorFlow, Keras, etc, think of themselves as scientific tools for serious people who work with generic arrays of data. They don’t concern themselves with consumer-level problems like automatic image rotation — even though basically every image in the world captured with a modern camera needs it.

This means that when you load an image with almost any Python library, you get the original, unrotated image data. And guess what happens when you try to feed a sideways or upside-down image into a face detection or object detection model? The detector fails because you gave it bad data.

You might think this problem is limited to Python scripts written by beginners and students, but that’s not the case! Even Google’s flagship Vision API demo doesn’t handle Exif orientation correctly.</p>


Turns out there is code that can do it. But you have to know that you need it.
ai  python  vision 
13 days ago by charlesarthur
I’ve written about lots of computer vision and machine learning projects like object recognition systems and face recognition projects. I also have an open source Python face recognition library…
14 days ago by jackpinboard
Adam Geitgey Oct 9 · 6 min read I’ve written about lots of computer vision and machine learning projects like object recognition systems and face recognition…
from instapaper
14 days ago by rogerhsueh