AI-Powered Facial Mask Removal Is Not Suitable For Identification
Authors/Creators
Description
This repository contains the images and analysis code associated with the manuscript:
AI-Powered Facial Mask Removal Is Not Suitable For Identification
Emily A. Cooper & Hany Farid
Images are organized in a set of folders:
imagesSource: This folder consists of 400 images of faces of distinct identities sampled from the FFHQ dataset (https://github.com/NVlabs/ffhq-dataset). These are the same 400 images used in Nightingale & Farid. AI-synthesized faces are indistinguishable from real faces and more trustworthy. Proc Nat Acad of Sci, 119(8):e2120481119, 2022.
imagesMasked: This folder contains the "masked" versions of the images in imagesSource.
imagesGrokAI / imagesChatGPT / imagesGemini: These folders contain the AI-unmasked versions of the images in imagesMasked.
imagesVGG2: Images from the VGGFace2 dataset were used to assess typical biometric similarity scores for pairs of images of the same person under different lighting and pose. VGG2 images are disseminated via download URLs rather than image files (https://github.com/ox-vgg/vgg_face2). This folder contains a text file with the unique identifiers of the VGG2 images used in this study.
imagesSenators: The URLs of websites from which we obtained the masked images of 91 Senators are included in a text file (senatorURLs). In some cases, the images may no longer be posted. Unmasked photos of each Senator in this analysis were obtained from their official portraits hosted at https://www.govinfo.gov/app/details/GPO-PICTDIR-116/context. These images are contained in the imagesReference and imagesWithNames subfolders. imagesWithNames includes filenames with each Senator's last name; imagesReference includes the same files, but with filenames containing numeric identifiers. AI unmasked images for this dataset are not included.
Code:
faceBiometrics.py: this Python script can be used to compute biometric similarity between pairs of images. This script requires installation of ArcFace and/or AdaFace.
out-arcface_all.txt / out-adaface_all.txt: These files contain the biometric similarity scores associated with each analysis reported in the paper. Rows start with a code indicating the analysis as follows:
1: same identity (computed from imagesVGG2)
2: different identity (same race/gender) (computed from imagesSource)
3: chatGPT unmasked (computed from imagesSource / imagesChatGPT)
4: chatGPT unmasked US Senators (computed from imagesSenators)
5: Grok unmasked (computed from imagesSource / imagesGrokAI)
6: Gemini unmasked (computed from imagesSource / imagesGemini)
7: Gemini unmasked US Senators (computed from imagesSenators)
This code is followed by a string indicating the image pairs and the biometric similarity score.
faceBiometricStats.m: This script loads either of the two text files described above and performs the analyses reported in the paper.