Spaces:
Sleeping
Sleeping
Commit
·
78c19da
1
Parent(s):
fecade2
modification de demo.py
Browse files
demo.py
CHANGED
@@ -17,15 +17,15 @@ def compare_face(frame1, frame2):
|
|
17 |
|
18 |
html = ("<table>"
|
19 |
"<tr>"
|
20 |
-
"<th>
|
21 |
-
"<th>
|
22 |
"</tr>"
|
23 |
"<tr>"
|
24 |
-
"<td>
|
25 |
"<td>{compare_result}</td>"
|
26 |
"</tr>"
|
27 |
"<tr>"
|
28 |
-
"<td>
|
29 |
"<td>{compare_similarity}</td>"
|
30 |
"</tr>"
|
31 |
"</table>".format(compare_result=compare_result, compare_similarity=compare_similarity))
|
@@ -108,38 +108,29 @@ def compare_face(frame1, frame2):
|
|
108 |
with gr.Blocks() as demo:
|
109 |
gr.Markdown(
|
110 |
"""
|
111 |
-
#
|
112 |
-
We offer SDKs for face recognition, liveness detection(anti-spoofing) and ID card recognition.
|
113 |
-
We also specialize in providing outsourcing services with a variety of technical stacks like AI(Computer Vision/Machine Learning), Mobile apps, and web apps.
|
114 |
|
115 |
-
|
116 |
-
|
117 |
-
#####
|
|
|
118 |
"""
|
119 |
)
|
120 |
-
with gr.TabItem("
|
121 |
-
|
122 |
-
"""
|
123 |
-
##### Docker Hub - https://hub.docker.com/r/kbyai/face-recognition
|
124 |
-
```bash
|
125 |
-
sudo docker pull kbyai/face-recognition:latest
|
126 |
-
sudo docker run -e LICENSE="xxxxx" -p 8081:8080 -p 9001:9000 kbyai/face-recognition:latest
|
127 |
-
```
|
128 |
-
"""
|
129 |
-
)
|
130 |
with gr.Row():
|
131 |
with gr.Column():
|
132 |
compare_face_input1 = gr.Image(type='filepath')
|
133 |
gr.Examples(['face_examples/1.jpg', 'face_examples/3.jpg', 'face_examples/5.jpg', 'face_examples/7.jpg', 'face_examples/9.jpg'],
|
134 |
inputs=compare_face_input1)
|
135 |
-
compare_face_button = gr.Button("
|
136 |
with gr.Column():
|
137 |
compare_face_input2 = gr.Image(type='filepath')
|
138 |
gr.Examples(['face_examples/2.jpg', 'face_examples/4.jpg', 'face_examples/6.jpg', 'face_examples/8.jpg', 'face_examples/10.jpg'],
|
139 |
inputs=compare_face_input2)
|
140 |
with gr.Column():
|
141 |
compare_face_output = gr.Image(type="pil").style(height=150)
|
142 |
-
compare_result_output = gr.HTML(label='
|
143 |
|
144 |
compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[compare_face_output, compare_result_output])
|
145 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition&countColor=%23263759" /></a>')
|
|
|
17 |
|
18 |
html = ("<table>"
|
19 |
"<tr>"
|
20 |
+
"<th>Résultat de la comparaison</th>"
|
21 |
+
"<th>Valeur</th>"
|
22 |
"</tr>"
|
23 |
"<tr>"
|
24 |
+
"<td>Résultat</td>"
|
25 |
"<td>{compare_result}</td>"
|
26 |
"</tr>"
|
27 |
"<tr>"
|
28 |
+
"<td>Similarité</td>"
|
29 |
"<td>{compare_similarity}</td>"
|
30 |
"</tr>"
|
31 |
"</table>".format(compare_result=compare_result, compare_similarity=compare_similarity))
|
|
|
108 |
with gr.Blocks() as demo:
|
109 |
gr.Markdown(
|
110 |
"""
|
111 |
+
# Ronaldodev - Détection de visage
|
|
|
|
|
112 |
|
113 |
+
Développeur FullStack & IA Enginneer !
|
114 |
+
|
115 |
+
##### Whatsap : +229 99653843
|
116 |
+
##### Explicit is better than implicit !
|
117 |
"""
|
118 |
)
|
119 |
+
with gr.TabItem("Reconnaissance Faciale"):
|
120 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
with gr.Row():
|
122 |
with gr.Column():
|
123 |
compare_face_input1 = gr.Image(type='filepath')
|
124 |
gr.Examples(['face_examples/1.jpg', 'face_examples/3.jpg', 'face_examples/5.jpg', 'face_examples/7.jpg', 'face_examples/9.jpg'],
|
125 |
inputs=compare_face_input1)
|
126 |
+
compare_face_button = gr.Button("Comparer les visages")
|
127 |
with gr.Column():
|
128 |
compare_face_input2 = gr.Image(type='filepath')
|
129 |
gr.Examples(['face_examples/2.jpg', 'face_examples/4.jpg', 'face_examples/6.jpg', 'face_examples/8.jpg', 'face_examples/10.jpg'],
|
130 |
inputs=compare_face_input2)
|
131 |
with gr.Column():
|
132 |
compare_face_output = gr.Image(type="pil").style(height=150)
|
133 |
+
compare_result_output = gr.HTML(label='Résultat')
|
134 |
|
135 |
compare_face_button.click(compare_face, inputs=[compare_face_input1, compare_face_input2], outputs=[compare_face_output, compare_result_output])
|
136 |
gr.HTML('<a href="https://visitorbadge.io/status?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition"><img src="https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fkby-ai%2FFaceRecognition&countColor=%23263759" /></a>')
|