Spaces:
Running
Running
resized to 64x64
Browse files
app.py
CHANGED
@@ -124,7 +124,7 @@ def caption_frame(frame, size, model_file, clip_file, interval_ms, sys_prompt, u
|
|
124 |
debug_msgs.append(f"[{timestamp}] Using CLIP weights: {clip_file}")
|
125 |
|
126 |
t_resize = time.time()
|
127 |
-
img = cv2.resize(frame.copy(), (
|
128 |
elapsed = (time.time() - t_resize) * 1000
|
129 |
timestamp = time.strftime('%H:%M:%S')
|
130 |
debug_msgs.append(f"[{timestamp}] Resized to 384x384 in {elapsed:.1f} ms")
|
@@ -134,7 +134,7 @@ def caption_frame(frame, size, model_file, clip_file, interval_ms, sys_prompt, u
|
|
134 |
time.sleep(interval_ms / 1000)
|
135 |
|
136 |
t_enc = time.time()
|
137 |
-
params = [int(cv2.IMWRITE_JPEG_QUALITY),
|
138 |
success, jpeg = cv2.imencode('.jpg', img, params)
|
139 |
elapsed = (time.time() - t_enc) * 1000
|
140 |
timestamp = time.strftime('%H:%M:%S')
|
|
|
124 |
debug_msgs.append(f"[{timestamp}] Using CLIP weights: {clip_file}")
|
125 |
|
126 |
t_resize = time.time()
|
127 |
+
img = cv2.resize(frame.copy(), (64, 64))
|
128 |
elapsed = (time.time() - t_resize) * 1000
|
129 |
timestamp = time.strftime('%H:%M:%S')
|
130 |
debug_msgs.append(f"[{timestamp}] Resized to 384x384 in {elapsed:.1f} ms")
|
|
|
134 |
time.sleep(interval_ms / 1000)
|
135 |
|
136 |
t_enc = time.time()
|
137 |
+
params = [int(cv2.IMWRITE_JPEG_QUALITY), 25]
|
138 |
success, jpeg = cv2.imencode('.jpg', img, params)
|
139 |
elapsed = (time.time() - t_enc) * 1000
|
140 |
timestamp = time.strftime('%H:%M:%S')
|