Last week I followed the instructions found at this codelab course on TensorFlow and image classification found here. In the tutorial you build a basic image classifier that you then train on a training set of supplied flower images sourced from the ImageNet database. I am currently interested in CNN’s and other methods of autonomous machine vision and the overwhelming affect they have upon us. Currently these system’s are being developed and deployed all over the world in various forms, some of the most popularized being Facebook’s DeepFace/DeepMask and what I’m more familiar with Google’s TensorFlow platform and their Inception models.
The model that I retrained as part of the codelab course was the ‘MobileNet’ model which is slightly less accurate than the Inception V3 model but it’s a little quicker to work with and as I’m just fiddling with these concepts as they may relate to or apply within critical artistic discourse, I sacrificed performance in this case. Everything came together relatively quickly, first the bottlenecks are generated for the final layer before image classification occurs. I have already ‘trained’ and ‘retrained’ this model so it has a cache of bottlenecks that it was able to reuse when I went through this process again. The term bottleneck is used to describe points in the network where the information is much more condensed (closer to an answer/output) than previously in the network.
During training, at each step chooses 10 images at random from the data set and finds their bottlenecks from the cache. At this point they are then fed to the final layer to get predictions which are then compared to actual labels which help update the weights of the final layer through back-propagation. Much of this is very difficult for me to understand, but I can at times grasp a little of the way the network is being trained / making choices. Much of what I’ve been talking about can be made more visible through the use of tensorboard which is a monitoring program used to assist in the training of tensorflow models. In it graphs are recorded relating to the final layers accuracy, cross-entropy, etc.
After training you should have a model that is capable of running the script label_image.py. This script will attempt to classify an image that you specify. In the supplied repo an image of a daisy is stored for use since the training in the tutorial utilizes a flower data set. Of course, you have the ability at this point to retrain this network on a different data set for the classification of different imagery. I haven’t retrained my network but I plan on doing so using a few new data sets that I’ve created through some image scraping I’ve done for the keyword ‘daemon’. I thought it would be humorous to utilize the current training of this classifier which is aimed at ‘flowers’ and see what it could find in one of my daemon compilations. These compilations are generated using the coreimage library, the program nodebox, and my lengthy folder of ‘daemons’ scraped from the net.
So the network concluded given the following image:
That it’s flowery consistency was as follows:
While this is obviously a poorly trained network given what it was intended to analyze, I still can’t help but be concerned by the methodology in which this training occurs with models deployed on the public. How are we aligning these datasets and training styles with the goals of racial and gender equality? Unfortunately at this point in time it doesn’t seem extremely evident to me that people are working actively towards this alignment. Trevor Paglen writes at length about these concerns and others in an article published by The New Inquiry here. Perhaps most concerning is how many of these systems will be used in conjunction with the hyper-capitalist and consumer societies of today. Allowing more companies and governments to access personal data in more efficient ways without your control, all of this relinquishes more of the dwindling powers of citizens in a global climate where the powerful few are consolidating and profiting from the suffering of the rest.