{"skill":{"slug":"xfyun-face-compare","displayName":"iFLYTEK Face Compare","summary":"Compare two face images and return similarity score using iFlytek Face Recognition API.","description":"---\r\nname: face-compare\r\ndescription: Compare two face images and return similarity score using iFlytek Face Recognition API.\r\nhomepage: https://www.xfyun.cn/doc/face/xf-silent-in-vivo-detection/API.html\r\nmetadata:\r\n  {\r\n    \"openclaw\":\r\n      {\r\n        \"emoji\": \"👤\",\r\n        \"requires\": {\r\n          \"bins\": [\"python3\"],\r\n          \"env\": [\"XF_FACE_APP_ID\", \"XF_FACE_API_KEY\", \"XF_FACE_API_SECRET\"]\r\n        },\r\n        \"primaryEnv\": \"XF_FACE_APP_ID\"\r\n      }\r\n  }\r\n---\r\n\r\n# 👤 Face Compare\r\n\r\nCompare two face images and calculate their similarity score using iFlytek's advanced face recognition technology.\r\n\r\nDesigned for identity verification, face matching, and security authentication scenarios.\r\n\r\n---\r\n\r\n## ✨ Features\r\n\r\n- High-accuracy face comparison\r\n- Base64 image encoding support\r\n- Multiple image format support (jpg, png, bmp)\r\n- Detailed similarity scoring\r\n- One-command execution\r\n\r\n---\r\n\r\n## 🚀 Usage\r\n\r\n```bash\r\npython {baseDir}/scripts/index.py \"<image1_path>\" \"<image2_path>\"\r\n```\r\n\r\nExample:\r\n\r\n```\r\npython {baseDir}/scripts/index.py \"/path/to/face1.jpg\" \"/path/to/face2.jpg\"\r\n```\r\n\r\n## 📋 Input Specification\r\n\r\n### Image Requirements\r\n\r\n- Supported formats: JPG, PNG, BMP\r\n- File size: < 4MB recommended\r\n- Image should contain clear, frontal face\r\n- One face per image for best results\r\n\r\n---\r\n\r\n## ⚠ Constraints\r\n\r\n- Both image paths must be valid and accessible\r\n- Images must contain detectable faces\r\n- API credentials must be configured\r\n- Network connection required\r\n\r\n---\r\n\r\n## 🔧 Environment Setup\r\n\r\nRequired:\r\n\r\n- Python available in PATH\r\n- Environment variables configured:\r\n\r\n```bash\r\nexport XF_FACE_APP_ID=your_app_id\r\nexport XF_FACE_API_KEY=your_api_key\r\nexport XF_FACE_API_SECRET=your_api_secret\r\n```\r\n\r\nOr configure it in `~/.openclaw/openclaw.json`:\r\n\r\n```json\r\n{\r\n\t\"env\": {\r\n\t\t\"XF_FACE_APP_ID\": \"your_app_id\",\r\n\t\t\"XF_FACE_API_KEY\": \"your_api_key\",\r\n\t\t\"XF_FACE_API_SECRET\": \"your_api_secret\"\r\n\t}\r\n}\r\n```\r\n\r\n---\r\n\r\n## 📦 Output\r\n\r\nReturns JSON response with:\r\n- Similarity score (0-100)\r\n- Comparison result (same person or not)\r\n- Confidence level\r\n- Face detection status\r\n\r\n---\r\n\r\n## 🎯 Target Use Cases\r\n\r\n- Identity verification\r\n- Access control systems\r\n- Duplicate account detection\r\n- Photo matching services\r\n- Security authentication\r\n- Attendance systems\r\n\r\n---\r\n\r\n## 🛠 Extensibility\r\n\r\nFuture enhancements may include:\r\n\r\n- Batch face comparison\r\n- Face quality assessment\r\n- Multiple face detection\r\n- Liveness detection integration\r\n- Custom threshold configuration\r\n\r\n---\r\n\r\nBuilt for automation workflows and AI-driven identity verification.\r\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":503,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772776597553,"updatedAt":1778491745273},"latestVersion":{"version":"1.0.0","createdAt":1772776597553,"changelog":"Initial release of xfyun-face-compare.\n\n- Supports comparing two face images using iFlytek Face Recognition API.\n- Provides high-accuracy similarity score and comparison result (same person or not).\n- Compatible with JPG, PNG, BMP formats under 4MB.\n- Requires Python and environment variables for API credentials.\n- Outputs detailed JSON including similarity, confidence, and face detection status.\n- Designed for identity verification, authentication, and security scenarios.","license":null},"metadata":{"setup":[{"key":"XF_FACE_APP_ID","required":true},{"key":"XF_FACE_API_KEY","required":true},{"key":"XF_FACE_API_SECRET","required":true}],"os":null,"systems":null},"owner":{"handle":"dzy-1026","userId":"s177exwzb4jc8skfhjrfxg8nph84g58y","displayName":"Dzy-1026","image":"https://avatars.githubusercontent.com/u/71968943?v=4"},"moderation":null}