Update app.py
Browse files
app.py
CHANGED
|
@@ -80,10 +80,10 @@ def process_video(video_path, target, progress=gr.Progress()):
|
|
| 80 |
annotation = f"{object_label}: {confidence}"
|
| 81 |
|
| 82 |
# Increase line width for the bounding box
|
| 83 |
-
draw.rectangle(box, outline="red", width=
|
| 84 |
|
| 85 |
# Increase font size and change color to red
|
| 86 |
-
font_size =
|
| 87 |
try:
|
| 88 |
font = ImageFont.truetype("arial.ttf", font_size)
|
| 89 |
except IOError:
|
|
@@ -122,7 +122,7 @@ def create_heatmap(frame_scores, current_frame):
|
|
| 122 |
num_frames = len(frame_scores)
|
| 123 |
step = max(1, num_frames // 20)
|
| 124 |
frame_numbers = range(0, num_frames, step)
|
| 125 |
-
plt.xticks(frame_numbers, [str(i) for i in frame_numbers], rotation=
|
| 126 |
|
| 127 |
plt.axvline(x=current_frame, color='blue', linestyle='--', linewidth=2)
|
| 128 |
|
|
|
|
| 80 |
annotation = f"{object_label}: {confidence}"
|
| 81 |
|
| 82 |
# Increase line width for the bounding box
|
| 83 |
+
draw.rectangle(box, outline="red", width=3)
|
| 84 |
|
| 85 |
# Increase font size and change color to red
|
| 86 |
+
font_size = 100
|
| 87 |
try:
|
| 88 |
font = ImageFont.truetype("arial.ttf", font_size)
|
| 89 |
except IOError:
|
|
|
|
| 122 |
num_frames = len(frame_scores)
|
| 123 |
step = max(1, num_frames // 20)
|
| 124 |
frame_numbers = range(0, num_frames, step)
|
| 125 |
+
plt.xticks(frame_numbers, [str(i) for i in frame_numbers], rotation=90, ha='right')
|
| 126 |
|
| 127 |
plt.axvline(x=current_frame, color='blue', linestyle='--', linewidth=2)
|
| 128 |
|