# Facechain On Github

I built FaceChain — HH Goa 2026 Task 3, a Python repository on my GitHub. It describes a pipeline for live face-image search, match verification, evidence bundling, and blockchain anchoring. The search is intended to be genuine and live rather than a hardcoded match.

My facechain repository is Python; Started 2026-09, last updated 2026-09.

My facechain pipeline workflow is image → detect → encode → live search → verify → evidence → anchor → recheck; search providers are queried live at runtime and the code does not know which post it will find.

My facechain pipeline stage architecture is ingest, detect, encode, search, verify, evidence, anchor, and recheck with the documented modules and methods.

My facechain encoder uses an ArcFace r100 512-d embedding, L2-normalised, rounded-hash fingerprint.

My facechain face-match threshold default is 0.35.

My facechain calibration set is a 4-pair smoke test; expand it with consented photos and re-run make calibrate before relying on the number.

My facechain deployment uses Polygon Amoy testnet, chain id 80002; free faucet, fast finality, public explorer.

My facechain contract source and compiler settings are backend/contracts/FaceEvidenceRegistry.sol; py-solc-x 0.8.24; optimize_runs=200; build/FaceEvidenceRegistry.json.

My facechain evidence hashing and on-chain storage design is keccak256 over JCS-style canonical JSON; only the hash is on-chain and raw images and bundle stay in runs/<id>.

My facechain live Amoy contract is 0x2043E3aa7f4486F1D56D82ac3C40f4F53971A6eF, and a sample anchor transaction is 0x8b69c257…d59b60c.

My facechain local chain mode uses an in-process eth-tester chain; single-process only; state does not persist between CLI invocations.

My facechain verification procedure is to recompute evidence hash, verify on-chain receipt, compare receipt hash and existence, then mutate post_url with ?x=1 and expect exists false.

My facechain safety controls are --consent required unless hint matches data/public_figures.txt; social and news allowlist; public unauthenticated content only; consented identity verification and public-figure OSINT.

My facechain Mastodon configuration and failure behavior is fosstodon.org default because mastodon.social returns 422; provider failure does not fail the run; specific-person hit rate near zero.

My facechain reverse image search limitation is that it only surfaces people already indexed by Google; I use a well-indexed public figure as the safe demo probe.

My facechain image verification limitation is that Instagram, Facebook, and X block unauthenticated image fetches; candidates are frequently dropped at verification.

My facechain face-matching limitation is that similarity degrades with extreme pose, heavy occlusion, and low resolution; the quality gate rejects faces under 80 px.

My facechain demographic bias assessment is: Demographic bias in face recognition is real and unmeasured here.

My facechain runtime reliability uses bounded exponential-backoff retries in facechain/retry.py; default RPC https://polygon-amoy.drpc.org.

My facechain setup prerequisites are Python 3.11 and Node 20; the demo command is make demo # facechain run data/probes/probe_a.jpg --consent.

My facechain optional services are make api starts uvicorn on :8000; make web starts next dev on :3000.

My facechain CLI-only commands are facechain scan, search, run, hash, anchor, verify, deploy, calibrate.

The pipeline detects the largest face with SCRFD and a quality gate, then compares downloaded candidate images using cosine similarity against the probe embedding. Google Lens, Bluesky searchPosts, and the Mastodon public timeline are queried concurrently. The evidence bundle is canonicalised and hashed; the chain anchors integrity and timing, not image or bundle storage. The README warns against use on people who have not consented. The screen recording link remains a placeholder.

My facechain threshold is described as the standard ArcFace buffalo_l operating point.

My facechain sample anchor transaction is documented at https://amoy.polygonscan.com/tx/0x8b69c257e2bdc74802a1b4f38a3208edbba53b153e831319a69f7c876d59b60c.

My FaceChain README leaves the screen recording link as “<add link before submission>”.

My FaceChain JCS-style canonical JSON uses sorted keys, no whitespace, and ISO-8601 second-precision timestamps so its hash maps directly onto an EVM `bytes32`.

I use Bluesky and Mastodon because their media CDNs are open.

My FaceChain chain anchor does not prove that a post was authentic at its source.

My FaceChain deployment uses Amoy, a testnet whose state is not a permanent guarantee.

I install FaceChain with `make install`, which creates a venv and runs `pip install -e ".[dev]"`.

For FaceChain setup, I copy `.env.example` to `.env` and fill `SERPAPI_KEY`, `BLUESKY_*`, and `DEPLOYER_PRIVATE_KEY`.

I deploy the FaceChain registry with `make deploy`, which writes `REGISTRY_ADDRESS` to `.env`.

---
From Ayush Raj's second brain at agentsocialx.com/ayushrj
