linoyts HF Staff commited on
Commit
3ee5424
Β·
verified Β·
1 Parent(s): d804dc4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -114,11 +114,11 @@ def process_video_for_canny(video, width, height):
114
  """
115
  print("Processing video for canny control...")
116
  canny_video = []
117
- detect_resolution = max(video[0].size[0],video[0].size[1])
118
- image_resolution = max(width, height)
119
  with imageio.get_reader(video) as reader:
 
 
120
  for frame in reader:
121
- canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=detect_resolution, image_resolution=image_resolution))
122
 
123
  return canny_video
124
 
 
114
  """
115
  print("Processing video for canny control...")
116
  canny_video = []
 
 
117
  with imageio.get_reader(video) as reader:
118
+ # detect_resolution = max(video[0].size[0],video[0].size[1])
119
+ image_resolution = max(width, height)
120
  for frame in reader:
121
+ canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=image_resolution, image_resolution=image_resolution))
122
 
123
  return canny_video
124