{"id":30939232,"url":"https://github.com/wraient/face-detection","last_synced_at":"2025-09-10T19:11:53.209Z","repository":{"id":311564811,"uuid":"1044039697","full_name":"Wraient/face-detection","owner":"Wraient","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-25T07:03:48.000Z","size":10367,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-25T09:49:04.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Wraient.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-08-25T05:16:45.000Z","updated_at":"2025-08-25T07:03:52.000Z","dependencies_parsed_at":"2025-08-25T09:59:18.830Z","dependency_job_id":null,"html_url":"https://github.com/Wraient/face-detection","commit_stats":null,"previous_names":["wraient/face-detection"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Wraient/face-detection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wraient%2Fface-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wraient%2Fface-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wraient%2Fface-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wraient%2Fface-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wraient","download_url":"https://codeload.github.com/Wraient/face-detection/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wraient%2Fface-detection/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274510102,"owners_count":25299073,"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-09-10T02:00:12.551Z","response_time":83,"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":[],"created_at":"2025-09-10T19:11:48.082Z","updated_at":"2025-09-10T19:11:53.200Z","avatar_url":"https://github.com/Wraient.png","language":"JavaScript","readme":"# Face Detection System\n\nA modern, web-based face detection and recognition system built with JavaScript and Face-API.js. This system can detect faces in real-time, recognize known individuals, and display facial expressions with confidence levels.\n\n## Features\n\n### Core Functionality\n- **Real-time Face Detection**: Detects faces in the camera feed with bounding boxes and corner markers\n- **Face Recognition**: Recognizes known individuals from a local database\n- **Expression Detection**: Shows the dominant facial expression (happy, sad, angry, surprised, etc.)\n- **Confidence Display**: Shows system confidence levels for recognition and detection\n\n### User Interface\n- **Modern UI**: Clean, responsive design with gradient backgrounds and smooth animations\n- **Status Display**: Green status box shows \"Known Person Name\" or \"Unknown\" \n- **Camera Controls**: Toggle camera on/off functionality\n- **Settings Panel**: Adjust recognition confidence threshold and toggle features\n\n### Database Management\n- **Add New Faces**: Capture and save unknown faces to the database with names\n- **Local Storage**: All face data is stored locally in the browser\n- **Database Management**: Clear all stored face data when needed\n\n## Setup Instructions\n\n### Prerequisites\n- Modern web browser with camera access support\n- HTTPS connection (required for camera access)\n\n### Installation\n1. Clone or download this project to your local machine\n2. Serve the files using a local web server (required for camera access)\n\n#### Option 1: Using Python\n```bash\n# For Python 3\npython -m http.server 8000\n\n# For Python 2\npython -m SimpleHTTPServer 8000\n```\n\n#### Option 2: Using Node.js\n```bash\nnpm install -g http-server\nhttp-server\n```\n\n#### Option 3: Using PHP\n```bash\nphp -S localhost:8000\n```\n\n3. Open your browser and navigate to `http://localhost:8000`\n4. Allow camera permissions when prompted\n\n## How to Use\n\n### Initial Setup\n1. **Camera Access**: Grant camera permissions when prompted\n2. **Model Loading**: Wait for the face detection models to load (shown with loading screen)\n3. **Position Yourself**: Ensure your face is clearly visible in the camera frame\n\n### Adding New Faces\n1. **Position Unknown Person**: Have the person position their face in the camera\n2. **Click \"Add New Face\"**: The system will capture the current face detection\n3. **Enter Name**: Type the person's name in the modal dialog\n4. **Save**: Click \"Save Face\" to add them to the database\n\n### Recognition Process\n- **Known Faces**: Shows the person's name in a green status box\n- **Unknown Faces**: Shows \"Unknown\" in an orange status box\n- **No Face**: Shows \"No face detected\" when no face is visible\n\n### Settings\n- **Recognition Confidence**: Adjust how strict the recognition system is (0.3 = lenient, 0.9 = strict)\n- **Show Expressions**: Toggle facial expression detection on/off\n- **Clear Database**: Remove all stored face data\n\n### Information Display\n- **Expression**: Shows the dominant facial expression detected\n- **Confidence**: Shows the system's confidence level as a percentage\n\n## Technical Details\n\n### Libraries Used\n- **Face-API.js**: Main face detection and recognition library\n- **Font Awesome**: Icons for the user interface\n- **Google Fonts (Inter)**: Modern typography\n\n### Models Loaded\n- SSD MobileNet v1: Face detection\n- Face Landmark 68 Point: Facial landmark detection\n- Face Recognition Net: Face descriptor extraction\n- Face Expression Net: Emotion/expression detection\n\n### Browser Compatibility\n- Chrome 60+\n- Firefox 55+\n- Safari 11+\n- Edge 79+\n\n### Storage\n- Face data is stored in browser's localStorage\n- Face descriptors are saved as 128-dimensional vectors\n- No data is sent to external servers\n\n## Troubleshooting\n\n### Camera Issues\n- **Camera not working**: Ensure you're accessing via HTTPS or localhost\n- **Permissions denied**: Check browser settings and allow camera access\n- **No video feed**: Try refreshing the page and granting permissions again\n\n### Performance Issues\n- **Slow detection**: Close other browser tabs and applications\n- **High CPU usage**: This is normal for real-time face detection\n- **Memory issues**: Clear the face database if it becomes too large\n\n### Recognition Issues\n- **Poor recognition**: Adjust confidence threshold in settings\n- **False positives**: Increase confidence threshold\n- **Not recognizing**: Ensure good lighting and face is clearly visible when adding\n\n## Privacy \u0026 Security\n\n- All face data is stored locally in your browser\n- No images or face data is transmitted to external servers\n- Face database can be cleared at any time\n- Camera feed is not recorded or saved\n\n## Browser Requirements\n\n- WebRTC support for camera access\n- Canvas API support for image processing\n- ES6+ JavaScript support\n- localStorage support for data persistence\n\n## File Structure\n\n```\n/\n├── index.html          # Main HTML structure\n├── style.css          # CSS styles and responsive design\n├── script.js          # JavaScript functionality\n└── README.md          # This file\n```\n\n## Customization\n\n### Styling\n- Modify `style.css` to change colors, fonts, and layout\n- CSS custom properties can be adjusted for quick theme changes\n\n### Functionality\n- Adjust detection parameters in `script.js`\n- Modify confidence thresholds and model settings\n- Add new features or modify existing ones\n\n## Support\n\nFor issues or questions:\n1. Check browser console for error messages\n2. Ensure camera permissions are granted\n3. Try different browsers if issues persist\n4. Clear browser cache and localStorage if needed\n\n## License\n\nThis project is open source and available under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwraient%2Fface-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwraient%2Fface-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwraient%2Fface-detection/lists"}