Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -343,7 +343,7 @@ def get_random_face_sample(organized_faces_folder, largest_cluster, output_folde
|
|
| 343 |
|
| 344 |
# Read the image and resize it to be smaller
|
| 345 |
face_img = cv2.imread(face_path)
|
| 346 |
-
small_face = cv2.resize(face_img, (
|
| 347 |
cv2.imwrite(output_path, small_face)
|
| 348 |
|
| 349 |
return output_path
|
|
@@ -440,8 +440,8 @@ iface = gr.Interface(
|
|
| 440 |
gr.Slider(minimum=1, maximum=64, step=1, value=16, label="Batch Size")
|
| 441 |
],
|
| 442 |
outputs=[
|
| 443 |
-
gr.Textbox(label="Anomaly Detection Results"),
|
| 444 |
gr.Image(type="filepath", label="Random Face Sample of Most Frequent Person"),
|
|
|
|
| 445 |
gr.Plot(label="Anomaly Scores (All Features)"),
|
| 446 |
gr.Plot(label="Anomaly Scores (Components Only)"),
|
| 447 |
gr.Plot(label="Fear Anomalies"),
|
|
|
|
| 343 |
|
| 344 |
# Read the image and resize it to be smaller
|
| 345 |
face_img = cv2.imread(face_path)
|
| 346 |
+
small_face = cv2.resize(face_img, (100, 100)) # Resize to NxN pixels
|
| 347 |
cv2.imwrite(output_path, small_face)
|
| 348 |
|
| 349 |
return output_path
|
|
|
|
| 440 |
gr.Slider(minimum=1, maximum=64, step=1, value=16, label="Batch Size")
|
| 441 |
],
|
| 442 |
outputs=[
|
|
|
|
| 443 |
gr.Image(type="filepath", label="Random Face Sample of Most Frequent Person"),
|
| 444 |
+
gr.Textbox(label="Anomaly Detection Results"),
|
| 445 |
gr.Plot(label="Anomaly Scores (All Features)"),
|
| 446 |
gr.Plot(label="Anomaly Scores (Components Only)"),
|
| 447 |
gr.Plot(label="Fear Anomalies"),
|