Anti Spoofing
See on github

Project Overview

The core challenge of this project is accurately classifying objects or scenes as either 2D or 3D based on depth measurements. The goal is to distinguish between a flat image of a face and an actual 3D face, which Mediapipe's current API cannot do. This enhancement will improve face detection accuracy and prevent spoofing.

Solution Approach

To address this challenge, a Time of Flight (ToF) sensor connected to an ESP32 microcontroller captures depth data over a 64-point grid (8x8). The ESP32 then calculates the variance among these depth points: a high variance suggests a 3D surface due to depth fluctuations, while a low variance points to a flat, 2D surface with more uniform depth. This processed data is sent to a computer running a face detection program, which uses depth variance thresholds to assess whether the detected face is 2D or 3D.

ESP32 Pinout Map

To interface the ESP32 with the ToF sensor, the following pinout map is used:

Pin ESP32
VIN 3.3V
GND GND
SCL G22
SDA G21
INT G17
Lpin G16

Future Directions

Future work could focus on refining the assessment by leveraging probabilistic models based on variance in depth measurements, enhancing the accuracy and robustness of 2D versus 3D face classification.