hzwer / hzwer/Practical-RIFE

PNG export sudden slow down

Open
#27 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1k
Forks
131
PR merge metrics
No merged PRs in 30d

Description

I encountered a big slowdown when exporting pngs using inference_video.py.
The export process starts fast (30it/s) but after a few hundreds of frames it slow down to (6it/s). No gpu, cpu, disk or memory bottlenecks are observed. Trying adding [cv2.IMWRITE_PNG_COMPRESSION, 0] to cv2.imwrite('vid_out/{:0>7d}.png'.format(cnt), item[:, :, ::-1]) as cv2.imwrite('vid_out/{:0>7d}.png'.format(cnt), item[:, :, ::-1], [cv2.IMWRITE_PNG_COMPRESSION, 0]) barely made a difference.
I'm not experienced with python and opencv, my goal is to export lossless content.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PNG-writing path in inference_video.py and reproduce the slowdown across several hundred frames while keeping the output lossless. Compare the sustained export rate with the current cv2.imwrite call and inspect whether the slowdown is caused by the export path rather than GPU, CPU, disk, or memory limits. Done means PNG export remains acceptably consistent without reducing image fidelity.

Written by the indexing model from the issue text.

Assessment

Tech stack
opencv, python
Domain
computer-vision, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.