Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ async def full_detection_pipeline(image: UploadFile = File(...)):
|
|
114 |
content={"error": "Could not detect exactly two eyes. Please try another photo."}
|
115 |
)
|
116 |
|
117 |
-
|
118 |
|
119 |
# Prepare to store all our results
|
120 |
flags = {}
|
|
|
114 |
content={"error": "Could not detect exactly two eyes. Please try another photo."}
|
115 |
)
|
116 |
|
117 |
+
eye_crops.sort(key=lambda c: cv2.boundingRect(cv2.cvtColor(c, cv2.COLOR_BGR2GRAY))[0])
|
118 |
|
119 |
# Prepare to store all our results
|
120 |
flags = {}
|