Spaces:
Running
on
A10G
Running
on
A10G
PeiqingYang
commited on
Commit
β’
0d1d760
1
Parent(s):
2f89268
debug code
Browse files- requirements.txt +0 -1
- web-demos/hugging_face/app.py +1 -1
requirements.txt
CHANGED
@@ -4,7 +4,6 @@ einops
|
|
4 |
future
|
5 |
numpy
|
6 |
scipy
|
7 |
-
opencv-python
|
8 |
matplotlib
|
9 |
scikit-image
|
10 |
torch>=1.7.1
|
|
|
4 |
future
|
5 |
numpy
|
6 |
scipy
|
|
|
7 |
matplotlib
|
8 |
scikit-image
|
9 |
torch>=1.7.1
|
web-demos/hugging_face/app.py
CHANGED
@@ -95,7 +95,7 @@ def get_frames_from_video(video_input, video_state):
|
|
95 |
original_h, original_w = frame.shape[:2]
|
96 |
scale_factor = min(1, 1280/max(original_h, original_w))
|
97 |
target_h, target_w = int(original_h*scale_factor), int(original_w*scale_factor)
|
98 |
-
frame = cv2.resize(frame, (target_w, target_h))
|
99 |
frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
|
100 |
else:
|
101 |
break
|
|
|
95 |
original_h, original_w = frame.shape[:2]
|
96 |
scale_factor = min(1, 1280/max(original_h, original_w))
|
97 |
target_h, target_w = int(original_h*scale_factor), int(original_w*scale_factor)
|
98 |
+
# frame = cv2.resize(frame, (target_w, target_h))
|
99 |
frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
|
100 |
else:
|
101 |
break
|