Spaces:
Runtime error
Runtime error
Update services/shadow_detection.py
Browse files
services/shadow_detection.py
CHANGED
@@ -1,8 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
def detect_shadow_coverage(image_path):
|
5 |
-
image = cv2.imread(image_path)
|
6 |
-
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
7 |
-
shadow_ratio = (grayscale < 50).sum() / grayscale.size
|
8 |
-
return shadow_ratio > 0.3 # Simulated threshold: >30% shadowed
|
|
|
1 |
+
def detect_objects(image_path):
|
2 |
+
# Simulate detection (always return fake person)
|
3 |
+
return [{"label": "person", "score": 0.95}]
|
|
|
|
|
|
|
|
|
|