Skip to content
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

Increase Video Processing from 1 Frame to Multi Frames in Parallel #1

Open
hollowaykeanho opened this issue Apr 30, 2023 · 21 comments
Open
Assignees
Labels
Enhancement Case is about improving an existing feature/aspect. In Progress Development is in progress.

Comments

@hollowaykeanho
Copy link
Owner

Description

Please provide a short description of what feature you're looking forward to
enhance below. Please include the story behind your idea as well to give a
better visualization of your idea.

Basically to speed things up.

Expected Behavior

Please specify the expected behavior of your requested enhancement. Some great
and helpful pointers are your expected interface (e.g. command patterns,
simple sketches of the user interface, etc).

Upscaler can work a lot faster via work.

Current Behavior

Please specify the current behavior (e.g. workaround, blockage, etc).

Upscaler only work on 1 frame at a time.

Attachment

Please drag and drop the necessary data files (e.g. screenshot, logs, etc)
below.
@hollowaykeanho hollowaykeanho added Enhancement Case is about improving an existing feature/aspect. Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck. labels Apr 30, 2023
@hollowaykeanho
Copy link
Owner Author

Help needed as I do not have a better graphics card. Limited to only NVIDIA GeForce MX150 from a laptop to test its working capability on consumer products.

@hollowaykeanho
Copy link
Owner Author

Not possible with POSIX and Powershell. Neither of them provides some kind of sync mechanism like mutex lock or channels. Closing this issue as won't fix.

@hollowaykeanho hollowaykeanho added Will Not Fix/Implement Decided not to pursue further. and removed Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck. labels May 2, 2023
Repository owner locked as resolved and limited conversation to collaborators May 2, 2023
Repository owner unlocked this conversation Jun 25, 2023
@hollowaykeanho
Copy link
Owner Author

Re-open as now we have a possibility to process frame upscaling concurrently using scoring system.

@hollowaykeanho hollowaykeanho removed the Will Not Fix/Implement Decided not to pursue further. label Jun 25, 2023
@hollowaykeanho
Copy link
Owner Author

@Joly0, @JeanShuralyov , can I acquire --parallel argument name for experimenting this feature ya?

like --parallel 2 for 2 images simultenously.

@Joly0
Copy link
Collaborator

Joly0 commented Jun 27, 2023

Sounds good for me, i´d have to adjust the powershell side of this when you are done

@hollowaykeanho
Copy link
Owner Author

TQ & noted. I'll begin the enhancement work after clearing some works at hand.

@JeanShuralyov
Copy link
Contributor

@hollowaykeanho , fine by me. Will you be using my fork repo for this enhancement?

@hollowaykeanho
Copy link
Owner Author

yes. Please keep it.

@hollowaykeanho hollowaykeanho changed the title Increase Video Processing from 1 Frame to Multi Frames Intelligently Increase Video Processing from 1 Frame to Multi Frames in Parallel Jun 28, 2023
@hollowaykeanho hollowaykeanho added the In Progress Development is in progress. label Jul 11, 2023
@hollowaykeanho
Copy link
Owner Author

@Joly0 , I might need help with your graphics card. =x

Appearently, I completed my prototyping codes but same like my previous attempt, I blew my vRAM when parallel is set to 2. (It demands 2400MB I believe).

2023-07-13-19-50-28

I will complete the commit and push to Jean's forked repo for easier referencing.

@hollowaykeanho hollowaykeanho added the Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck. label Jul 13, 2023
@hollowaykeanho hollowaykeanho self-assigned this Jul 13, 2023
@Joly0
Copy link
Collaborator

Joly0 commented Jul 13, 2023

Sure, how can i help?

@hollowaykeanho
Copy link
Owner Author

hollowaykeanho commented Jul 13, 2023

Okay. I just pushed in parallel processing capability for init/unix.sh side of things. Diff: aa4fabb

You can try it out with --parallel 2 (I can't get through due to the hardware limitation). Once translated to the PowerShell side, this issue can be marked completed. =)


Heads up: the unix.sh hits the 1000 lines warning limit already, anything beyond will need a proper progrmaming language which also means: Issue #34.

Growing beyond 1000 lines for shell scripts are nightmare to maintain in near future.

@JeanShuralyov
Copy link
Contributor

@hollowaykeanho , there is no way my Iris can operate --parallel 2 if your Nvidia failed. Passed. Otherwise, great job.

@hollowaykeanho
Copy link
Owner Author

noted. In that case I won't increase its parallelism for benchmark testing then since we do not have proper hardware to test it iteratively.

@hollowaykeanho
Copy link
Owner Author

@Joly0 , is it possible to translate the current outcome ya? It will be the last one since I'll drilling into Tencent NCNN framework for the next step.

@Joly0
Copy link
Collaborator

Joly0 commented Jul 23, 2023

Hey, yes, i am on it getting this done in powershell, but i dont have that much time currently, so i cant tell, when i am finished. I will try my best to get this done asap.

@hollowaykeanho
Copy link
Owner Author

Haha.. no problem. It's open-source so no deadline. Take your time.

In that case I will begin the work on the source codes now. Let me know when you're ready for release.

@hollowaykeanho hollowaykeanho removed their assignment Jul 23, 2023
@hollowaykeanho
Copy link
Owner Author

hollowaykeanho commented Jul 23, 2023

Just in case: please note that you're not required to create directory for each frames that I used.

I only did that because mkdir can behave safely in Linux side for concurrency application. You might need to find out is PowerShell has a similar command that has a safe concurrent mechanism.

@Joly0
Copy link
Collaborator

Joly0 commented Sep 8, 2023

Btw, in powershell this is a hell of a ride, but i am getting quite close i guess, but i have to set powershell 7 as a requirement for this to work. Powershell 5 has a few techniques to make parallel execution working (jobs, runspaces, workflows), but none of them are easy to work with.
I could try to get it working with jobs or workflows, but its such a pain to work with functions and variables outside of a job or workflow scope.
Powershell 7 has the "foreach-object -parallel " function, which works atleast better. Still having issues with variables and functions, but its atleast not too difficult to work with.

So if its ok, i will get this working with powershell 7, otherwise if you want, i´ll adjust it to powershell 5

But just so you see it, its working
image
(running the benchmark here with --parallel 2)

I´ll let this run through and will try with some other files aswell and i have to get the control file working again, because it is borked now XD
image

Other than that, it looks like it is working

@hollowaykeanho
Copy link
Owner Author

hollowaykeanho commented Sep 8, 2023

Powershell 5 has a few techniques to make parallel execution working (jobs, runspaces, workflows), but none of them are easy to work with.

Hahaha.. completely agree with you. I'm currently working on a PowerShell + POSIX compliant Shell CI infra at https://github.com/ChewKeanHo/AutomataCI/tree/experimental. Currently working on the Docker image packaging job development.

Once I completed the AutomataCI to a stable release, I will port it here and there will be various released packages (for sure having .deb, .rpm, .flatpak, .tar.xz, and .zip.

You can make use of my newly developed shell-based libraries here (e.g. you might be interested in io): https://github.com/ChewKeanHo/AutomataCI/tree/experimental/automataCI/services

(running the benchmark here with --parallel 2)

Good luck! I couldn't run here.

I´ll let this run through and will try with some other files aswell and i have to get the control file working again, because it is borked now XD

Haha. Yeap. Some changes done because the execution is different now.

@Joly0
Copy link
Collaborator

Joly0 commented Feb 2, 2024

Btw, just to give a quick update. I havent had any time in the past few months to look into this at all, which i am quite sorry for. But i think i´ll might have some time now to get this a all fixed, finish it up and push it out, so it can be merged :D

@corygalyna
Copy link
Contributor

@Joly0 , I had cleaned up the project dashboard into a road-map kanban style already. This should further the repository development with a more directional approach.

Yawn. Enjoy. Oh by the way, @hollowaykeanho , did something mad in this project: https://github.com/ChewKeanHo/AutomataCI/tree/main/automataCI/services

I believe controlled multi-threading is available in there io/sync.*

@hollowaykeanho hollowaykeanho removed the Help Wanted Blocked because all known proposals where tested and ran out of idea. Is stuck. label Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Case is about improving an existing feature/aspect. In Progress Development is in progress.
Projects
Status: v0.8.0
Development

No branches or pull requests

4 participants