Does computer vision apprehend the world through a specific lens? And if so, which one? In this project I set out to design a deep learning classifier that is purposefully blind to what photographs are of; a type of machine vision that cares nothing about recognising objects, people or scenes, and is instead programmed to learn only about how photographs were made, more specifically the lenses used in their making.

This project uses Flickr IDs from the Visual Genome dataset (used in Made by Machine), and extracts their EXIF metadata through Flickr’s API. The model was trained using a PyTorch implementation of a vanilla VGGNet. This is how EXIF info looks on Flickr:

This is an (abbreviated) example of Flickr’s API response:

 { 'label': 'Make',
    'raw': {'_content': 'Canon'},
    'tag': 'Make',
    'tagspace': 'IFD0',
    'tagspaceid': 0},
  { 'label': 'Model',
    'raw': {'_content': 'Canon EOS REBEL T5i'},
    'tag': 'Model',
    'tagspace': 'IFD0',
    'tagspaceid': 0},
  { 'clean': {'_content': '50 mm'},
    'label': 'Focal Length',
    'raw': {'_content': '50.0 mm'},
    'tag': 'FocalLength',
    'tagspace': 'ExifIFD',
    'tagspaceid': 0},
  { 'label': 'Lens Model',
    'raw': {'_content': 'EF50mm f/1.8 II'},
    'tag': 'LensModel',
    'tagspace': 'ExifIFD',
    'tagspaceid': 0},

And this is an example of the resulting dataframe:

Camera manufacturerCamera modelExposureApertureFocal Length
CanonCanon PowerShot S2 IS1/640f472mm
CanonCanon EOS 20D1/1200f11560mm
NikonNIKON D501/250f5125mm
CanonCanon PowerShot SD6001/800f2.85.8mm

This proof of concept was published as part of the article On Machine Vision and Photographic Imagination (with Tobias Blanke) in the journal AI & Society. See my publications for more.

🖥️ Code and 💾 data for this project are available in this repository.