[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80798":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":5,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":14,"stars7d":14,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":11,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":8,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":13,"starSnapshotCount":13,"syncStatus":12,"lastSyncTime":24,"discoverSource":25},80798,"tinyfacematch","yuvrajraina\u002Ftinyfacematch","yuvrajraina",null,"Python",39,3,2,0,1,1.81,"MIT License",false,"main",true,[],"2026-06-12 02:04:07","# TinyFaceMatch\n\nTinyFaceMatch is an open-source, **AI powered** face verification model for\ncomparing two aligned face images and returning a match decision with similarity\nscores.\n\nThe recommended production model is:\n\n```text\ntinyfacematch-128-pretrained.onnx\n```\n\nDefault threshold:\n\n```text\n0.2856\n```\n\nLicense: MIT. No separate commercial license needs to be acquired to use this\nrepository.\n\n## Model Performance\n\n| Metric | Value |\n| --- | ---: |\n| Accuracy | 99.72% |\n| ROC AUC | 0.9983 |\n| Balanced accuracy | 0.9902 |\n| True accept rate | 0.9830 |\n| False accept rate | 0.0025 |\n| False reject rate | 0.0170 |\n| Model size | 13.238 MB |\n| Embedding size | 128-D |\n\nInput contract:\n\n```text\nRGB image -> 112x112 -> (pixel - 127.5) \u002F 128.0 -> NCHW float32\n```\n\nOutput contract:\n\n```text\nL2-normalized 128-D embedding\n```\n\n## Install\n\nInstall directly from GitHub:\n\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fyuvrajraina\u002Ftinyfacematch.git\n```\n\nOr install from a local clone:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fyuvrajraina\u002Ftinyfacematch.git\ncd tinyfacematch\npip install -e \".[onnx]\"\n```\n\n## Unified Backend\n\nThe Django backend is the single Render service for both products:\n\n```text\nGET  \u002Fapi\u002Fmodel\u002F\nPOST \u002Fapi\u002Fverify\u002F\nGET  \u002Fapi\u002Fliveness\u002Fmodel\u002F\nPOST \u002Fapi\u002Fliveness\u002Fpredict\u002F\n```\n\nKeep the TinyFaceMatch and TinyLiveness frontends deployed as separate static\nsites. Point both frontends at the same Render backend, using `\u002Fapi\u002Fverify\u002F` for\nface matching and `\u002Fapi\u002Fliveness\u002Fpredict\u002F` for liveness.\n\nThe backend installs TinyLiveness from its separate release repo\u002Ftag, so the\nTinyLiveness source folder should stay out of this repo.\n\n## Download The Model\n\n```bash\ncurl -L -o tinyfacematch-128-pretrained.onnx \\\n  https:\u002F\u002Fgithub.com\u002Fyuvrajraina\u002Ftinyfacematch\u002Freleases\u002Flatest\u002Fdownload\u002Ftinyfacematch-128-pretrained.onnx\n```\n\nOptional smaller INT8 model:\n\n```bash\ncurl -L -o tinyfacematch-128-pretrained-int8.onnx \\\n  https:\u002F\u002Fgithub.com\u002Fyuvrajraina\u002Ftinyfacematch\u002Freleases\u002Flatest\u002Fdownload\u002Ftinyfacematch-128-pretrained-int8.onnx\n```\n\nRecommended SHA-256 for the FP32 model:\n\n```text\n6d8588c1dc1f91fab930be355d33d4b6be0b74d70c46ae0f9c65d89be2865aa4\n```\n\n## Python Usage\n\n```python\nfrom tinyfacematch import OnnxFaceEmbedder\n\nembedder = OnnxFaceEmbedder(\"tinyfacematch-128-pretrained.onnx\")\n\nresult = embedder.verify_images(\n    left_rgb,\n    right_rgb,\n    threshold=0.2856,\n)\n\nprint(result.is_match)\nprint(result.similarity)\nprint(result.distance)\n```\n\n`left_rgb` and `right_rgb` should be RGB NumPy arrays. For best accuracy in\nproduction, run face detection and alignment before calling the embedder.\n\n## Embedding Usage\n\nIf you already have normalized face crops or want to store\u002Fsearch embeddings:\n\n```python\nfrom tinyfacematch import OnnxFaceEmbedder, verify_embeddings\n\nembedder = OnnxFaceEmbedder(\"tinyfacematch-128-pretrained.onnx\")\n\nleft_embedding = embedder.embed_image(left_rgb)\nright_embedding = embedder.embed_image(right_rgb)\n\nresult = verify_embeddings(left_embedding, right_embedding, threshold=0.2856)\n```\n\n## Production Checklist\n\n- Detect and align faces before verification.\n- Keep raw face images out of logs.\n- Treat embeddings as sensitive biometric-derived data.\n- Version the model file and threshold together.\n- Monitor false accepts, false rejects, latency, and no-face rates.\n- Provide user consent, deletion, and fallback flows.\n- Do not use face verification as the only signal for high-impact decisions.\n\n## Comparison\n\n| Model | Public benchmark | Size | TinyFaceMatch comparison |\n| --- | ---: | ---: | --- |\n| TinyFaceMatch | 99.72% accuracy, AUC 0.9983 | 13.238 MB | Excellent accuracy-to-size balance |\n| OpenCV SFace | LFW 99.60% | 36.9 MB | +0.12 percentage points and about 64% smaller |\n| dlib face recognition ResNet | LFW around 99.38% | 21.4 MB | +0.34 percentage points and about 38% smaller |\n| FaceNet PyTorch VGGFace2 | LFW 99.65% | 107 MB | Slightly higher accuracy and about 88% smaller |\n\nAlways review upstream model and dataset licenses before using third-party\nweights commercially.\n","TinyFaceMatch 是一个开源的人脸验证模型，用于比较两张对齐的人脸图像并返回匹配决策及相似度分数。项目采用AI技术构建，核心功能包括高效准确地识别人脸特征并计算相似度，使用ONNX格式的预训练模型进行部署，支持128维嵌入向量输出。该模型具有高精度（99.72%）、低误报率（0.0025）等性能优势，并且模型大小仅为13.238MB，便于在资源受限环境中应用。适用于需要进行人脸比对的各种场景，如身份认证、安全监控等。通过简单的Python接口即可轻松集成到现有系统中。","2026-06-11 04:02:23","CREATED_QUERY"]