We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
while cap.isOpened(): ret, frame = cap.read() if not ret: break frame_rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) frame_argb, mask = rembg.remove_with_mask(frame_rgb, session=session, both_mask=True) # 将抠图结果转换为带 Alpha 通道的图像 outMask = cv2.cvtColor(mask, cv2.COLOR_RGBA2BGRA) outFrame = cv2.cvtColor(frame_argb, cv2.COLOR_RGBA2BGRA) mask_count += 1 mask_name = f'{temp_mask_dir}/mask_{mask_count:04d}.png' frame_name = f'{temp_frame_dir}/frame_{mask_count:04d}.png' total_elapse = datetime.datetime.now() - handle_startTime if mask_count % 25 == 0: log.info(f"handle frameNums:{mask_count}, total_elapse:{total_elapse}") cv2.imwrite(frame_name, outFrame) cv2.imwrite(mask_name, outMask) cap.release() log.info(f'total handle counts:{mask_count}')
The text was updated successfully, but these errors were encountered:
This issue is stale because it has been open for 30 days with no activity.
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: