CV Dazzle

Camouflage from face-detection

Posted 2011-09-01 in prototypes tagged #fashion #counter-surveillance #face-detection #computer-vision
Project is under active development. Sign up for product launch notification at newsletter.ahprojects.com
CV Dazzle Look 5. Commission for the New York Times Op-Art. 2014.
CV Dazzle Look 5. Commission for the New York Times Op-Art. 2014.

Project page: cvdazzle.com

CV Dazzle is a type of camouflage from computer vision. It uses bold patterning to break apart the expected features targeted by computer vision algorithms.

The following is an overview of the project concepts, background, and initial tests. More technical information about reverse engineering and visualizing the vulnerabilities in computer vision algorithms will be continue to be published here.

How It Works

CV Dazzle works by altering the expected dark and light areas of a face (or object) according to the vulnerabilities of a specific computer vision algorithm. In the image above (Look #5), the design targets the Viola-Jones face detection algorithm, a popular and open source face detector that is included with the OpenCV computer vision framework.

CV Dazzle aims to introduce low-cost methods for breaking computer vision algorithms. Here, the design are created using only hair styling, makeup, and fashion accessories, which could be customized to any wearer's style.

Because computer vision is always based on probabilistic thresholds, these can be exploited by altering the key visual features to appear one step below the threshold of detection.

And since face detection is the first step in any automated facial recognition system, blocking the detection stage also blocks any subsequent facial analysis including recognition and emotional analysis. Therefore, CV Dazzle could be used to block facial recognition by blocking face detection using only hair styling and makeup.

Look Book

The first design (Look #1) was created in 2010 as a proof of concept for my masters thesis at ITP NYU. The subsequent 5 looks were created in collaboration with DIS Magazine (Looks 2-4) and for a commission for the New York Times (Looks 5-6). The goal of of these test looks was to investigate the potential for a style that was functional but still within the margins of conceptual fashion.

CV Dazzle Look 1. 2010. Hair by <a href='https://hairfriend.tumblr.com/'>Pia Vivas</a>. Model: <a href='https://www.instagram.com/jen_jaffe/'>Jen Jaffe</a>. Photo: ©Adam Harvey
CV Dazzle Look 1. 2010. Hair by Pia Vivas. Model: Jen Jaffe. Photo: ©Adam Harvey
CV Dazzle Look 2. For DIS Magazine Creative direction by Lauren Boyle and Marco Roso. Model: Irina. 2010. Hair by <a href='https://hairfriend.tumblr.com/'>Pia Vivas</a>. Photo: ©Adam Harvey
CV Dazzle Look 2. For DIS Magazine Creative direction by Lauren Boyle and Marco Roso. Model: Irina. 2010. Hair by Pia Vivas. Photo: ©Adam Harvey
CV Dazzle Look 3. For DIS Magazine. Creative direction by Lauren Boyle and Marco Roso. Model: Jude. 2010. Hair by <a href='https://hairfriend.tumblr.com/'>Pia Vivas</a>. Photo: ©Adam Harvey
CV Dazzle Look 3. For DIS Magazine. Creative direction by Lauren Boyle and Marco Roso. Model: Jude. 2010. Hair by Pia Vivas. Photo: ©Adam Harvey
CV Dazzle Look 4. For DIS Magazine Creative direction by Lauren Boyle and Marco Roso. 2010. Hair by <a href='https://hairfriend.tumblr.com/'>Pia Vivas</a>. Photo: ©Adam Harvey
CV Dazzle Look 4. For DIS Magazine Creative direction by Lauren Boyle and Marco Roso. 2010. Hair by Pia Vivas. Photo: ©Adam Harvey
CV Dazzle Look 5 test from New York Times Op-Art. 2014.

Evaluation

To verify the results below, the images can be tested against each of the OpenCV haarcascade profiles to demonstrate their effectiveness. Use the code below to verify the results in the table.

import cv2 as cv
im = cv.imread(filepath)
im_gray = cv.cvtColor(im, cv.COLOR_BGR2GRAY)
cascade = cv.data + "haarcascade_frontalface_default.xml"
classifier = cv.CascadeClassifier(cascade)

faces = classifier.detectMultiScale(
    im_gray,
    scaleFactor=1.05,
    minNeighbors=3,
    minSize=(50, 50)
)

print("Found {} face candidates".format(len(faces))

# Draw rectangles over faces
for (x, y, w, h) in faces:
    cv.rectangle(im, (x, y), (x+w, y+h), (0, 255, 0), 3)

cv.imshow("Result" ,im)
cv.waitKey(0)
cv.destroyAllWindows()

Results for haarcascade_frontalface_default.xml, haarcascade_frontalface_alt.xml, haarcascade_frontalface_alt2.xml, and haarcascade_frontalface_profileface.xml:

Look # Frontal Alt Alt2 Profile
Look 1 Blocked Blocked Blocked Not blocked
Look 2 Blocked Blocked Blocked Blocked
Look 3 Blocked Blocked Blocked Blocked
Look 4 Blocked Blocked Blocked Blocked
Look 5 Blocked Blocked Blocked Blocked

Another way to visualize the effectiveness is to use a saliency (heat) map to show which areas of the facial region are missed or activated by the face detection algorithm.

Saliency map for Look 5. Model: Bre. Saliency evaluation from New York Times Op-Art photoshoot. 2014.
Saliency map for Look 5. Model: Bre. Saliency evaluation from New York Times Op-Art photoshoot. 2014.
Saliency map for CV Dazzle Look 6. Model: Jason. Saliency evaluation from New York Times Op-Art photoshoot. 2014.
Saliency map for CV Dazzle Look 6. Model: Jason. Saliency evaluation from New York Times Op-Art photoshoot. 2014.

The results illustrate that hair and makeup alone can be used to lower the wearer’s probability below the threshold of detection for most of the OpenCV Haarcascade detection profiles. However, there are important limitations to keep in mind.

First, these looks were designed to work against the Viola-Jones Haarcascade face detector in 2D still-images in the visible light spectrum with the pretrained Haarcascade detection profiles. Other face detection algorithms including Lineary Binary Pattern (LBP), Histogram of Oriented Gradients (HOG), Covolutional Neural Networks (CNN), multi-camera 3D-based systems, and multi-spectral imaging systems would require a different strategy. These looks are solely based on the Viola-Jones Haarcacade classifiers.

Second, lighting conditions will cause the results to vary. The pose and illumination in these photos is similar to a biometric enrollment (passport style) photo. Overhead or more direct lighting will change the intensity and location of shadows which will change the detection outcome.

For the best performance a CV Dazzle look is highly specific to the situation, unique to the wearer, and never replicated.

Style Tips

  1. Makeup Avoid enhancers. They amplify key facial features. This makes your face easier to detect. Instead apply makeup that contrasts with your skin tone in unusual tones and directions: light colors on dark skin, dark colors on light skin.
  2. Nose Bridge Partially obscure the nose-bridge area. The region where the nose, eyes, and forehead intersect is a key facial feature. This is especially effective against OpenCV’s face detection algorithm.
  3. Eyes Partially obscure one or both of the ocular regions. The symmetrical position and darkness of eyes is a key facial feature.
  4. Masks Avoid wearing masks as they are illegal in some cities. Instead of concealing your face, modify the contrast, tonal gradients, and spatial relationship of dark and light areas using hair, makeup, and/or unique fashion accessories.
  5. Head Research from Ranran Feng and Balakrishnan Prabhakaran at University of Texas, shows that obscuring the elliptical shape of a head can also improve your ability to block face detection. Link: Facilitating fashion camouflage art. Use hair, turtlenecks, or fashion accessories to alter the expected elliptical shape.
  6. Asymmetry Face detection algorithms expect symmetry between the left and right sides of the face. By developing an asymmetrical look, you can decrease your probability of being detected.

These tips apply only to the Viola-Jones haarcascade method for face detection.

Commissions

In December 2013 the New York Times commissioned a new look (Look #5) for an Op-Art feature about facial recognition.

Produced by John Niedermeyer and James Thomas. Photo By Adam Harvey, Modeling By Bre Lembitz, Hair By Pia Vivas, Makeup By Giana DeYoung
Produced by John Niedermeyer and James Thomas. Photo By Adam Harvey, Modeling By Bre Lembitz, Hair By Pia Vivas, Makeup By Giana DeYoung

Background

This project began in 2010 as my masters thesis at NYU ITP as a challenge to the growing power asymmetries in computer vision and, in particular, widespread facial recognition technology.

The name of the project was inspired by WWI ship camouflage called Dazzle that used cubist-inspired designs to break apart the visual continuity of a battleship in order to conceal its orientation and size. Similarily, CV Dazzle, short for Computer Vision Dazzle, uses bold, graphic designs that break apart the visual continuity of a face. While the end result is still visible to human observers, CV Dazzle degrades the visual comprehension of computer vision systems.

This ongoing project is motivated by a need to reclaim privacy in a world of increased visual surveillance and data collection. Computer vision poses new challenges that otherwise do not exist in human observation; it is low-cost, scalable, passive, remote, networked, and superhuman in its capabilities to recognize and understand faces, emotions, social relationships, health indicators, indentity, socio-economic status (by analyzing clothing), and even intent.

Ideally, there would be a way to appear visible to human observers but less visible to computer vision surveillance systems. This is the goal of CV Dazzle; to mitigate the risks of remote and computational visual information capture and analsyis under the guise of fashion. Since beginning this project in 2010, the concerns of a widespread facial recognition have only become more urgent and apparent and hopefully this project will continue to develop.