{"id":19646019,"url":"https://github.com/rabbicse/face-app","last_synced_at":"2026-04-10T04:43:52.584Z","repository":{"id":77671536,"uuid":"390945224","full_name":"rabbicse/face-app","owner":"rabbicse","description":"A Face recognition system using TensorFlow.js for in-browser image processing and backend services powered by PyTorch, Qdrant, RetinaFace, ArcFace, and OpenCV for detection, embedding, and similarity matching. This setup ensures efficient, secure, and accurate facial recognition.","archived":false,"fork":false,"pushed_at":"2025-01-07T17:49:39.000Z","size":40439,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-26T23:58:31.033Z","etag":null,"topics":["arcface","deep-neural-networks","docker","docker-compose","face-detection","face-recognition","machine-learning","nextjs","numpy","opencv","python","pytorch","react","retinaface","tensorflowjs","typescript","typescript-react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rabbicse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-30T05:43:02.000Z","updated_at":"2025-01-07T17:49:43.000Z","dependencies_parsed_at":"2025-02-26T23:58:56.049Z","dependency_job_id":null,"html_url":"https://github.com/rabbicse/face-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rabbicse/face-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbicse%2Fface-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbicse%2Fface-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbicse%2Fface-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbicse%2Fface-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabbicse","download_url":"https://codeload.github.com/rabbicse/face-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabbicse%2Fface-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267585843,"owners_count":24111577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arcface","deep-neural-networks","docker","docker-compose","face-detection","face-recognition","machine-learning","nextjs","numpy","opencv","python","pytorch","react","retinaface","tensorflowjs","typescript","typescript-react"],"created_at":"2024-11-11T14:36:25.290Z","updated_at":"2025-12-30T19:54:27.751Z","avatar_url":"https://github.com/rabbicse.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Recognition Application\n\n[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-Backend-blue)](https://hub.docker.com/r/meheditech/frs-backend)\n\n## Overview\n\n**Face Recognition Application** is a cutting-edge facial recognition application built with modern technologies. It supports face detection, keypoint extraction and embedding generation. The app is optimized for high performance and accuracy, designed for use in identity verification, security and other facial recognition applications.\n\n## Features\n\n- **Face Detection**: Detect faces in real-time or static images.\n- **Facial Landmarks Extraction**: Identify key facial points for advanced facial analysis.\n- **Embedding Generation**: Generate facial embeddings for comparison and recognition.\n- **API Support**: Provides RESTful APIs for integration.\n\n## Technologies Used\n\n- **Frontend**: React.js, Nextjs\n- **Backend**: Python (FastAPI)\n- **Face Detection - Backend**: PyTorch, RetinaFace\n- **Face Recognition - Backend**: PyTorch, ArcFace\n- **Face Detection - Frontend**: Tensorflowjs, Mediapipe\n- **Database**: Qdrant (Vector Database), PostgreSQL (Optional for storage)\n- **Containerization**: Docker\n\n## Installation\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- Node.js (v22 or higher)\n- Python (v3.12 or higher)\n- Docker (Optional, for containerized setup)\n- CUDA Toolkit (Optional, for GPU acceleration)\n\n### Steps\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/rabbicse/face-app.git\n    cd face-app\n    ```\n\n2. Install dependencies for the frontend:\n\n    ```bash\n    cd frontend/frs_react\n    npm install\n    ```\n\n3. Set up the backend:\n\n    ```bash\n    cd backend/frs\n    pip install -r requirements.txt\n    ```\n\n4. Configure environment variables:\n\n    - Create a `.env` file in the root directory.\n    - Add the following variables:\n\n      ```env\n      NEXT_PUBLIC_API_HOST=http://localhost\n      NEXT_PUBLIC_API_PORT=5000\n      ```\n\n5. Start the services:\n\n    - Frontend:\n\n      ```bash\n      cd frontend/frs_react\n      npm run dev\n      ```\n\n    - Backend:\n\n      ```bash\n      cd backend/frs\n      uvicorn api.server:app --reload --host 0.0.0.0 --port 5000\n      ```\n\n6. Access the application:\n\n    Open your browser and navigate to `http://localhost:3000`.\n\n## Screenshots\n\n### Login Page\n\n![Login Page](./screenshots/user-login.png)\n\n### Login with Face Recognition\n\n![Webcam Access](./screenshots/webcam-access.png)\n\n## API Endpoints\n\n### 1. Detect Faces\n\n**Endpoint:** `/api/v1/dnn/detect`\n\n- **Method:** `POST`\n- **Body:** `multipart/form-data`\n  - `photo`: The image file for detection.\n- **Response:**\n\n  ```json\n  {\n    \"status\": \"success\",\n    \"faces\": [\n      {\n        \"bbox\": {\n          \"x_min\": 0.2697347104549408,\n          \"y_min\": 0.1822991967201233,\n          \"x_max\": 0.7142632007598877,\n          \"y_max\": 0.7912323474884033,\n          \"score\": 0.9963470101356506\n        },\n        \"landmarks\": {\n          \"left_eye\": {\n            \"x\": 0.3953465223312378,\n            \"y\": 0.413769394159317\n          },\n          \"right_eye\": {\n            \"x\": 0.5912481546401978,\n            \"y\": 0.4187081754207611\n          },\n          \"nose\": {\n            \"x\": 0.49022188782691956,\n            \"y\": 0.5452162623405457\n          },\n          \"left_lip\": {\n            \"x\": 0.4161381721496582,\n            \"y\": 0.6275689005851746\n          },\n          \"right_lip\": {\n            \"x\": 0.5787203907966614,\n            \"y\": 0.6303802132606506\n          }\n        }\n      }\n    ]\n  }\n  ```\n\n### 2. Extract Embeddings\n\n**Endpoint:** `/api/v1/dnn/extract-embedding`\n\n- **Method:** `POST`\n- **Body:** `multipart/form-data`\n  - `photo`: The image file for embedding extraction.\n- **Response:**\n\n  ```json\n    {\n      \"status\": 0,\n      \"embedding\": \"MQoaPfbAZ73Kape9Rpw...fhs=\"\n  }\n  ```\n\n## Docker Setup\n\nTo run the application in Docker, follow these steps:\n\n1. Build and start the containers:\n\n    ```bash\n    docker-compose up --build\n    ```\n\n2. Access the application at `http://localhost:3000`.\n\n## Contribution\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch: `git checkout -b feature/your-feature-name`.\n3. Commit your changes: `git commit -m 'Add some feature'`.\n4. Push to the branch: `git push origin feature/your-feature-name`.\n5. Open a pull request.\n\n## License\n\nThis project is licensed under the GNU GENERAL PUBLIC License. See the [LICENSE](LICENSE) file for details.\n\n## References\n- [InsightFace](https://github.com/deepinsight/insightface)\n- [tfjs-models](https://github.com/tensorflow/tfjs-models)\n\n---\n\nMade with ❤️ by [Mehedi Hasan](https://github.com/rabbicse)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbicse%2Fface-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabbicse%2Fface-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabbicse%2Fface-app/lists"}