wjf5203 commited on
Commit
d565de0
1 Parent(s): 8468984

add video func support

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -611,7 +611,7 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
611
  color=(255,255,255),
612
  )
613
 
614
- ourput_frames.append(ret)
615
  # ret = ret.astype('uint8')
616
  size = (ori_width,ori_height)
617
  print('writing video...')
@@ -733,7 +733,7 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
733
  # cv2.imwrite('00020_inst.jpg', cv2.cvtColor(ret, cv2.COLOR_BGR2RGB))
734
 
735
  output_vos_results = []
736
- output_vos_results.append(ret[:,:,::-1])
737
 
738
 
739
 
@@ -839,7 +839,7 @@ def segment_video(video, prompt_mode, categoryname, custom_category, expressiong
839
  copyed_img = frame_list[frame_idx]
840
  ret = copyed_img*mask_image_mix_ration
841
  ret = ret.astype('uint8')
842
- output_vos_results.append(ret)
843
 
844
  size = (ori_width,ori_height)
845
  output_file = "test.mp4"
 
611
  color=(255,255,255),
612
  )
613
 
614
+ ourput_frames.append(ret[:,:,::-1])
615
  # ret = ret.astype('uint8')
616
  size = (ori_width,ori_height)
617
  print('writing video...')
 
733
  # cv2.imwrite('00020_inst.jpg', cv2.cvtColor(ret, cv2.COLOR_BGR2RGB))
734
 
735
  output_vos_results = []
736
+ output_vos_results.append(ret)
737
 
738
 
739
 
 
839
  copyed_img = frame_list[frame_idx]
840
  ret = copyed_img*mask_image_mix_ration
841
  ret = ret.astype('uint8')
842
+ output_vos_results.append(ret[:,:,::-1])
843
 
844
  size = (ori_width,ori_height)
845
  output_file = "test.mp4"