EduardoPacheco commited on
Commit
350d5de
1 Parent(s): 479b6c3
Files changed (2) hide show
  1. app.py +1 -1
  2. utils.py +1 -4
app.py CHANGED
@@ -53,7 +53,7 @@ if __name__ == "__main__":
53
  )
54
  examples = gr.Examples(
55
  examples=[
56
- ["assets/dog-running.mp4", 30, 0.5, 40, True, False],
57
  ],
58
  inputs=[source_video, batch_size, threshold, n_patches, is_larger, interpolate],
59
  outputs=[output_video],
 
53
  )
54
  examples = gr.Examples(
55
  examples=[
56
+ ["assets/dog-running.mp4", 30, 0.5, 40, True, True],
57
  ],
58
  inputs=[source_video, batch_size, threshold, n_patches, is_larger, interpolate],
59
  outputs=[output_video],
utils.py CHANGED
@@ -129,11 +129,8 @@ def create_video_from_frames_rgb(
129
  out = cv2.VideoWriter(output_filename, fourcc, fps, (frame_width, frame_height))
130
 
131
  for frame in frame_list:
132
- # Convert the frame from RGB to BGR
133
- bgr_frame = cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)
134
-
135
  # Write the frame to the video file
136
- out.write(bgr_frame)
137
 
138
  # Release the VideoWriter object
139
  out.release()
 
129
  out = cv2.VideoWriter(output_filename, fourcc, fps, (frame_width, frame_height))
130
 
131
  for frame in frame_list:
 
 
 
132
  # Write the frame to the video file
133
+ out.write(np.uint8(frame*255))
134
 
135
  # Release the VideoWriter object
136
  out.release()