Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -79,7 +79,7 @@ def process_image(input_image):
|
|
79 |
|
80 |
# Draw direction arrow
|
81 |
center_x, center_y = (x1 + x2) // 2, (y1 + y2) // 2
|
82 |
-
arrow_length = 50
|
83 |
direction = class_labels[direction_class]
|
84 |
|
85 |
# Calculate arrow endpoint
|
@@ -94,7 +94,7 @@ def process_image(input_image):
|
|
94 |
end_x = center_x + arrow_length
|
95 |
|
96 |
cv2.arrowedLine(image, (center_x, center_y), (end_x, end_y),
|
97 |
-
(
|
98 |
|
99 |
return image
|
100 |
|
|
|
79 |
|
80 |
# Draw direction arrow
|
81 |
center_x, center_y = (x1 + x2) // 2, (y1 + y2) // 2
|
82 |
+
arrow_length = 80 # Increased from 50 to 80
|
83 |
direction = class_labels[direction_class]
|
84 |
|
85 |
# Calculate arrow endpoint
|
|
|
94 |
end_x = center_x + arrow_length
|
95 |
|
96 |
cv2.arrowedLine(image, (center_x, center_y), (end_x, end_y),
|
97 |
+
(255, 0, 0), 4, tipLength=0.4)
|
98 |
|
99 |
return image
|
100 |
|