PNG export sudden slow down
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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