linoyts HF Staff commited on
Commit
f826940
Β·
verified Β·
1 Parent(s): 5347643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -117,11 +117,11 @@ def process_video_for_canny(video, width, height):
117
  """
118
  print("Processing video for canny control...")
119
  canny_video = []
120
- detect_resolution = video[0].size
 
121
 
122
  for frame in video:
123
- # TODO: change resolution logic
124
- canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=detect_resolution, image_resolution=(width, height)))
125
 
126
  return canny_video
127
 
 
117
  """
118
  print("Processing video for canny control...")
119
  canny_video = []
120
+ detect_resolution = max(video[0].size[0],video[0].size[1])
121
+ image_resolution = max(width, height)
122
 
123
  for frame in video:
124
+ canny_video.append(canny_processor(frame, low_threshold=50, high_threshold=200, detect_resolution=detect_resolution, image_resolution=image_resolution))
 
125
 
126
  return canny_video
127