PREVIOUS   NEXT   CONTENTS   SUMMARY   ISSUE   HOME 

4. Building an Image Classifier

Building an image classifier via transfer learning is no longer a difficult feat. We have written a tutorial ourselves that may be viewed online. It is our walk-through of Pete Warden's original Tensorflow for Poets tutorial, but with more of the 'gotchas' or tacit pieces of knowledge made explicit. A version is also hosted by Google. Our version may be run in a virtual computer accessed through a browser via the Binder service (with supporting materials on Github). If running the tutorial via Binder, once the machine is running open the 'Building an archaeological image classifier with tensorflow.ipynb' Jupyter notebook. Then read and run each cell in turn from top to bottom. Please wait when a code block is running; a running block is denoted by [*] at the left hand side of the block. After a block has run, the square brackets will change to [1], [2], [3], etc. showing the order in which the blocks have been run.

Figure 5
Figure 5: Screenshot of the Image Classifier App running on a smartphone. The model has been trained against images from the Portable Antiquities Scheme database, finds.org.uk. Here the classifier is 97% certain that it is seeing a fibula (displayed on the website; Graham is holding the phone in front of the monitor). The label 'brooch finds' is the same label as the folder containing the original training images, where 'finds' means it was sourced from finds.org.uk. The scale bars in the image are probably to blame for the classifier's confusion

When this classifier is run on one's own machine, the resulting model (the classifier) can be packaged to become an Android or iOS app. (Google provides a tutorial on building a trained classifier into an Android application) The 'developer settings' have to be set for one's phone model to permit such sideloading ('sideloading' means to install from anywhere other than the official App store for one's operating system). Immediately, when opened, the image classifier app will begin to classify whatever the camera is currently focused on, providing an estimate of the probability that the classification is correct. But, more prosaically, once a device starts reporting that the thing in the picture is a Roman brooch (Figure 5), we will have performed an act of authentication. If archaeologists or law enforcement are going to use this technology, we need to consider how such seemingly 'scientific' tools convey authority and certainty, and how they are likely to be misused (see also Bethard et al. 2018; Charette 2019). By showing how easy it is to build apps that misclassify, we point to the ways our authority as archaeologists gets transmitted and transmuted into algorithmic certainty: that all of our caveats and careful hedges in our publications get lost in the violence that the machine permits.


 PREVIOUS   NEXT   CONTENTS   SUMMARY   ISSUE   HOME 

Internet Archaeology is an open access journal based in the Department of Archaeology, University of York. Except where otherwise noted, content from this work may be used under the terms of the Creative Commons Attribution 3.0 (CC BY) Unported licence, which permits unrestricted use, distribution, and reproduction in any medium, provided that attribution to the author(s), the title of the work, the Internet Archaeology journal and the relevant URL/DOI are given.

Terms and Conditions | Legal Statements | Privacy Policy | Cookies Policy | Citing Internet Archaeology

Internet Archaeology content is preserved for the long term with the Archaeology Data Service. Help sustain and support open access publication by donating to our Open Access Archaeology Fund.