wuhp commited on
Commit
b32a064
Β·
verified Β·
1 Parent(s): 38d7187

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +59 -88
README.md CHANGED
@@ -1,4 +1,5 @@
1
  ---
 
2
  title: Facerec
3
  emoji: πŸ“š
4
  colorFrom: purple
@@ -7,101 +8,71 @@ sdk: gradio
7
  sdk_version: 5.13.2
8
  app_file: app.py
9
  pinned: false
10
- ---
11
-
12
- # Facerec πŸ“š
13
-
14
- ![Facerec Banner](https://your-image-url.com/banner.png)
15
-
16
- **Facerec** is a comprehensive single-image face recognition system built with Gradio. Leveraging powerful technologies like YOLO for face detection, DeepSort for tracking, FaceNet for recognition, and Mediapipe for advanced functionalities such as blink detection, face mesh, eye color detection, and hand tracking, Facerec offers a robust solution for facial analysis and recognition tasks.
17
-
18
- ## πŸš€ Features
19
-
20
- - **Face Detection with YOLO:** High-precision face detection using the YOLO model.
21
- - **Face Tracking with DeepSort:** Efficient tracking of detected faces across multiple images.
22
- - **Face Recognition with FaceNet:** Accurate face recognition using deep learning embeddings.
23
- - **Anti-Spoofing:** Detects potential spoofing attempts by analyzing image sharpness.
24
- - **Blink Detection:** Identifies blinks using Eye Aspect Ratio (EAR) calculations.
25
- - **Face Mesh & Iris Detection:** Visualizes facial landmarks, contours, tesselation, and irises.
26
- - **Eye Color Detection:** Determines the dominant eye color from the iris region.
27
- - **Hand Tracking with Mediapipe Hands:** Detects and tracks hands, displaying landmarks and connections.
28
- - **Database Management:**
29
- - **Enroll Users:** Add multiple images per user for recognition.
30
- - **Search Users:** Search by name or image to find matching users.
31
- - **Remove Users:** Delete user data from the database.
32
- - **List Users:** View all enrolled users.
33
- - **Customizable Configuration:** Toggle features, adjust thresholds, and customize colors via an intuitive interface.
34
 
35
- ## πŸ“₯ Installation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
- 1. **Clone the Repository**
38
- ```bash
39
- git clone https://github.com/yourusername/facerec.git
40
- cd facerec
41
- ```
42
-
43
- 2. **Create a Virtual Environment (Optional but Recommended)**
44
- ```bash
45
- python3 -m venv venv
46
- source venv/bin/activate # On Windows: venv\Scripts\activate
47
- ```
48
-
49
- 3. **Install Dependencies**
50
- ```bash
51
- pip install -r requirements.txt
52
- ```
53
-
54
- 4. **Download YOLO Model**
55
- The application automatically downloads the YOLO face detection model (`face2.pt`) if it's not present.
56
-
57
- ## βš™οΈ Setup
58
-
59
- 1. **Initial Configuration**
60
- Customize settings via the **Configuration** tab in the Gradio interface.
61
 
62
- 2. **Database Initialization**
63
- The face embeddings database is stored at `~/.face_pipeline/known_faces.pkl`.
 
 
 
 
 
 
64
 
65
- ## πŸ› οΈ Usage
 
 
 
66
 
67
- Launch the Gradio app by running:
68
  ```bash
69
  python app.py
70
  ```
71
- Access it at `http://localhost:7860/`.
72
-
73
- ### Image Test
74
-
75
- 1. **Upload an Image**
76
- 2. **Process Image**
77
- 3. **View Results**
78
-
79
- ### Configuration
80
-
81
- Customize the application's behavior:
82
- - **Feature Toggles:** Enable/disable specific features.
83
- - **Thresholds:** Adjust confidence thresholds.
84
- - **Color Customization:** Define colors for bounding boxes and overlays.
85
-
86
- ### Database Management
87
-
88
- Manage users via the **Database Management** tab:
89
- - **Enroll Users:** Upload images for recognition.
90
- - **Search Users:** Search by name or image.
91
- - **Remove Users:** Delete user data.
92
-
93
- ## πŸ“‚ Database Management
94
-
95
- Facerec maintains a database at `~/.face_pipeline/known_faces.pkl`.
96
-
97
- ## πŸ“ License
98
-
99
- Distributed under the [MIT License](LICENSE).
100
 
101
- ## πŸ™ Acknowledgements
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
- - [Gradio](https://gradio.app/)
104
- - [YOLO](https://github.com/ultralytics/yolov5)
105
- - [FaceNet](https://github.com/timesler/facenet-pytorch)
106
- - [DeepSort](https://github.com/theAIGuysCode/deep_sort_realtime)
107
- - [Mediapipe](https://mediapipe.dev/)
 
1
  ---
2
+
3
  title: Facerec
4
  emoji: πŸ“š
5
  colorFrom: purple
 
8
  sdk_version: 5.13.2
9
  app_file: app.py
10
  pinned: false
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ tags:
13
+ - Computer Vision
14
+ - Image Classification
15
+ - Object Detection
16
+ - Image Segmentation
17
+ - Image-to-Text
18
+ - Image Feature Extraction
19
+ - Keypoint Detection
20
+ - Zero-Shot Object Detection
21
+ - Feature Extraction
22
+ - Face Recognition
23
+ - Identity Verification
24
+ - Image Processing
25
+ - Security
26
+ - Biometrics
27
+ - Deep Learning
28
+ - AI
29
+ - Machine Learning
30
+ - Neural Networks
31
+ - Image Recognition
32
+ - YOLO
33
+ - MediaPipe
34
+ - Face Detection
35
+ - Hand Tracking
36
+ - Eye Color Detection
37
+ - Blink Detection
38
 
39
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
+ ## πŸš€ Features:
42
+ - **Face Detection & Recognition** (YOLO + FaceNet)
43
+ - **Anti-Spoofing** (Laplacian Variance)
44
+ - **Hand Tracking** (MediaPipe Hands)
45
+ - **Blink Detection** (MediaPipe FaceMesh)
46
+ - **Eye Color Detection** (Dominant Color Analysis)
47
+ - **Customizable Confidence Thresholds**
48
+ - **User Enrollment & Database Management**
49
 
50
+ ## πŸ›  Installation:
51
+ ```bash
52
+ pip install -r requirements.txt
53
+ ```
54
 
55
+ ## ▢️ Usage:
56
  ```bash
57
  python app.py
58
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ ## πŸ–Ό Upload Images:
61
+ The system only supports **image uploads** (no live video) for efficiency.
62
+
63
+ ## πŸ’‘ Technologies Used:
64
+ - **Gradio** (UI)
65
+ - **YOLO** (Face Detection)
66
+ - **DeepSORT** (Face Tracking)
67
+ - **FaceNet** (Embedding & Recognition)
68
+ - **MediaPipe** (Hand & Face Analysis)
69
+ - **OpenCV** (Image Processing)
70
+ - **Torch** (Deep Learning)
71
+
72
+ ## 🎯 Applications:
73
+ - **Identity Verification**
74
+ - **Biometric Security**
75
+ - **Real-Time Image Analysis**
76
+ - **User Authentication Systems**
77
+ - **Human-Computer Interaction**
78