-
Notifications
You must be signed in to change notification settings - Fork 28
Allow parallel executions of CLI #46
New issue
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for your contribution! A parallel execution of the CLI tool I did not have in my mind until now and the code was also not designed for this so far. |
1966140 to
23d09d0
Compare
|
@timminator thanks for the feedback! I have done the suggested changes and tested it thoroughly. The only issue is that, now if I ctrl+c out of it - the folders are not deleted anymore (they were before). This is not a big deal though. In case anyone is interested, this is how I parallelize videocr on linux. |
|
Hm, on windows they were also not deleted when pressing ctrl + c in its current state. But I also think thats not a big issue because they are deleted on the next run and are also not consuming a lot of space. |
|
Looks good to me now! When I find some time I will try it out and if I don't find any problems, which I do not expect, this will be merged. |
|
Hi, first of all, a big thank you to both of you for putting together very useful tools. I just wanted to give you some feedback how it worked for me. I also had several files to process and installed the current linux GPU binary VideOCR-GPU-v1.3.2-CUDA-11.8-Linux.7z as I have 1080TI. I first had to separate the videos into folders by resolution - as the box for the OCR is in absolute coordinates - relative ones in relation to overall size would make this potentially work for any size. When I ran this with a folder with a bunch files with this command ./ocr-parallel.sh --crops '0,500,1024,76' --max 5, I had errors for every file like as follows: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/videocr_temp_16fveuoz/frame_000120_zone0.jpg' I could not figure out what was the problem, maybe permissions ? Then just went on to put |
|
@ph-Os The FileNotFoundError is exactly what this PR addresses. The current release is not able to run in parallel. |
|
Thx for the feedback, looking forward to the PR being implemented. Keep up the good work, Cheers! |
|
@ph-Os This PR allows multiple/parallel executions of the cli tool - that's all. You still need to provide the correct crop values (the easiest is to just copy them from the GUI). Parallel OCR processing, the way I do it personally (I created a repo for my tools), is only useful when processing multiple video files from the same TV show (where crop values usually do not change between episodes). If you intend to OCR episodes from completely different shows (with vastly diferent crop values) - my tools will not help you, sorry. |
I used to have a big pain with the CLI tool. Only one execution of the cli tool could be made at the same time. I wanted to parallelize my workflow (as I have the hardware to work on several files at the same time), so I did this modification to the
video.pytemporary folder cleanup.Now, I am able to run several instances on the cli tool in separate terminals and parallelize with GNU Parallel as well.