HypoX64 / DeepMosaics

Automatically remove the mosaics in images and videos, or add mosaics to them.
GNU General Public License v3.0
2k stars 419 forks source link

Is multi-threaded video processing possible? #19

Open Warsen opened 4 years ago

Warsen commented 4 years ago

I see that processing a video is two loops with loop size depending on the number of frames in a video clip. The process to find mosaics and clean mosaics for 1 frame is completely independent of any other frames. Completion of the loops would be much faster if they were processed with multiple threads. For example, if I use waifu2x to upscale a video, I have the option to specify the number of threads. I choose 5 so when the frames of the video are being looped, 5 of them will be processed at a time.

Are you able to do it? I have bare minimum knowledge of Python so I don't know if it is possible. I would have forked this project and done it myself if it was C++ or C#. What are your thoughts or plans?

HypoX64 commented 3 years ago

It is completely feasible to use multiple-processes to processe frames, but it request your pc have a large RAM/Video Memory. eg. When runnig video_HD model ON CPU, it request 8G RAM. I will consider to add this feature in the future.

BroNils commented 3 years ago

Looks very useful, really looking forward to this feature

skyzombie89 commented 3 years ago

in v0.5.1 do i have to put command to use multi - processing? or it just automatically works?

Carbonlif3form commented 2 years ago

in v0.5.1 do i have to put command to use multi - processing? or it just automatically works?

Did you figure this out?