aminaB9 commited on
Commit
7df08f2
Β·
1 Parent(s): 664094c

Initial commit

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +25 -4
README.md CHANGED
@@ -1,13 +1,13 @@
1
  ---
2
  title: Face Recognition FHE
3
- emoji: πŸ§‘ πŸ“Έ πŸ”
4
  colorFrom: red
5
  colorTo: blue
6
  sdk: gradio
7
  sdk_version: 5.22.0
8
  app_file: app.py
9
  pinned: false
10
- short_description: Face Recognition (1:1 matching) Using FHE
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: Face Recognition FHE
3
+ emoji: πŸ§‘
4
  colorFrom: red
5
  colorTo: blue
6
  sdk: gradio
7
  sdk_version: 5.22.0
8
  app_file: app.py
9
  pinned: false
10
+ short_description: Face Recognition (1:1 matching) using FHE
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -40,7 +40,7 @@ FRMODELS = ["gaunernst/vit_tiny_patch8_112.arcface_ms1mv3",
40
  def runBinFile(*args):
41
  binary_path = args[0]
42
  if not os.path.isfile(binary_path):
43
- return "Error: Compiled binary not found."
44
  try:
45
  os.chmod(binary_path, 0o755)
46
  start = time.time()
@@ -125,7 +125,28 @@ def styled_output(result):
125
 
126
 
127
  with gr.Blocks() as demo:
128
- gr.Markdown("# Biometric Recognition (1:1 matching) Using Fully Homomorphic Encryption (FHE)")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  with gr.Row():
130
  gr.Markdown("## Phase 1: Enrollment")
131
  with gr.Row():
@@ -157,7 +178,7 @@ with gr.Blocks() as demo:
157
 
158
 
159
  with gr.Row():
160
- gr.HTML("<h3>Facial embeddings are <span style='color:red; font-weight:bold'>INVERTIBLE</span> and lead to the <span style='color:red; font-weight:bold'>RECONSTRUCTION</span> of their raw facial images.</h3>")
161
  with gr.Row():
162
  gr.Markdown("### Example:")
163
  with gr.Row():
@@ -169,7 +190,7 @@ with gr.Blocks() as demo:
169
  Reconstructed_image = gr.Image(label="Reconstructed")
170
  btn.click(fn=load_rec_image, outputs=Reconstructed_image)
171
  with gr.Row():
172
- gr.HTML("<h3>Facial embeddings protection is a <span style='color:red; font-weight:bold'>MUST!</span> At Suraksh.AI, we protect facial embeddings using FHE.</h3>")
173
 
174
 
175
 
 
40
  def runBinFile(*args):
41
  binary_path = args[0]
42
  if not os.path.isfile(binary_path):
43
+ return "Error: Compiled binary not Match."
44
  try:
45
  os.chmod(binary_path, 0o755)
46
  start = time.time()
 
125
 
126
 
127
  with gr.Blocks() as demo:
128
+ gr.HTML(
129
+ """
130
+ <h1 align="center">Suraksh.AI</h1>
131
+ <p align="center">
132
+ <a href="https://suraksh-ai.vercel.app/"> https://suraksh-ai.vercel.app/</a>
133
+ </p>
134
+ """
135
+ )
136
+ gr.Markdown("# Biometric verification (1:1 matching) Using Fully Homomorphic Encryption (FHE)")
137
+
138
+ gr.HTML(
139
+ """
140
+ <p>This demo shows <strong>Suraksh.AI's</strong> biometric verification solution under <strong>FHE</strong>.</p>
141
+ <ul>
142
+ <li><strong>Scenario 1</strong>: Verifying an enrolled subject. For this scenario, the reference and probe should be from the same subject. Expected outcome: <span style='color: green; font-weight: bold;'>βœ”οΈ Match</span></li>
143
+ <li><strong>Scenario 2</strong>: Verifying an enrolled subject with high recognition threshold. For this scenario, the reference and probe should be from the same subject and increase the recognition threshold. Expected outcome: <span style='color: red; font-weight: bold;'>❌ No Match</span></li>
144
+ <li><strong>Scenario 3</strong>: Verifying a non-enrolled subject. For this scenario, choose a probe not enrolled. Expected outcome: <span style='color: red; font-weight: bold;'>❌ No Match</span></li>
145
+ <li><strong>Scenario 4</strong>: Verifying a non-enrolled subject with low recognition threshold. For this scenario, choose a probe not enrolled and lower the recognition threshold. Expected outcome: <span style='color: green; font-weight: bold;'>βœ”οΈ Match</span></li>
146
+ </ul>
147
+ """
148
+ )
149
+
150
  with gr.Row():
151
  gr.Markdown("## Phase 1: Enrollment")
152
  with gr.Row():
 
178
 
179
 
180
  with gr.Row():
181
+ gr.Markdown("""Facial embeddings are **INVERTIBLE** and lead to the **RECONSTRUCTION** of their raw facial images.""")
182
  with gr.Row():
183
  gr.Markdown("### Example:")
184
  with gr.Row():
 
190
  Reconstructed_image = gr.Image(label="Reconstructed")
191
  btn.click(fn=load_rec_image, outputs=Reconstructed_image)
192
  with gr.Row():
193
+ gr.Markdown("""Facial embeddings protection is a must! At **Suraksh.AI**, we protect facial embeddings using FHE.""")
194
 
195
 
196