Facechain

FaceChain finds matching social profiles from a photo and verifies the evidence on blockchain.

Facechain

Created At

ETHGlobal Mumbai

Project Description

FaceChain is a face discovery and evidence verification platform by Linux Labs. It takes a photo, searches for matching publicly available social media content, compares faces locally, and records a fingerprint of the matching evidence on Ethereum.

The pipeline uses YuNet to detect the face and SFace to create an in-memory face representation. It prepares a search crop, retrieves Google Lens results through SerpApi, and compares faces in candidate images against the original photo. It also discovers associated social profiles using available search and identity metadata.

The frontend makes this process visible through a live event feed, showing candidate images, face similarity scores, discovered profiles, processing times, and blockchain receipts. SHA-256 hashes link the selected content and discovery metadata to an evidence record. The backend writes that record to a local Ethereum chain or the Sepolia testnet, then reads it back to verify its integrity.

Images and face embeddings are never stored on-chain. Blockchain verification establishes the integrity of the recorded evidence; it does not prove someone’s identity or ownership of a social account. FaceChain is designed for consent-based exploration, with results presented as supporting evidence for human review.

How it's Made

We built FaceChain as a Python processing pipeline with a FastAPI backend and a Next.js frontend using React, TypeScript, and Tailwind CSS. The backend handles image processing, search, face comparison, and blockchain verification, while the frontend displays the intermediate results through a live server-sent event stream.

YuNet detects the largest face in the uploaded image, and SFace generates a feature vector for local comparison. Rather than sending the entire original image directly to search, we crop the detected face with surrounding context and compress the search image below 500 KB. SerpApi provides access to Google Lens reverse-image search, helping us discover real indexed content without building our own image search engine.

The backend downloads candidate images, detects their faces, and compares them against the input using cosine similarity. A separate resolution stage uses search metadata and Google Knowledge Graph identifiers, when available, to discover associated social profiles. The interface distinguishes locally confirmed face matches from profile associations supported by search metadata.

For evidence integrity, we hash the matched image bytes and deterministic discovery metadata with SHA-256. Web3.py writes a compact evidence record into Ethereum transaction calldata, then reads it back and checks for exact equality. Using calldata was a useful shortcut: it lets us demonstrate blockchain anchoring without deploying a custom smart contract. A local Ethereum test chain makes the pipeline runnable without a wallet or faucet, while Sepolia supports persistent public testnet records.

The frontend shows actual backend events rather than simulated progress timers, including search candidates, comparison scores, discovered profiles, and transaction receipts. We deployed it on Vercel using a native Next.js build. Images and face embeddings stay off-chain, and embeddings remain in memory.

background image mobile

Join the mailing list

Get the latest news and updates