-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add multiprocessing to speed up analysis #33
Comments
This will be great feature to have - thanks for proposing. This pipeline will run on ubuntu, mac, jetson nano (initially) and windows (potentially). So let's find a multi-threading library that works across them. Also, I think we should wait to implement multi-processing until a single pipeline with modules for robust spot detection, background estimation, and OD calculation is established (#23), and those modules are refactored for readability (#29) |
It was @bryantChhun s initial suggestion hidden as a comment in the code, I just moved it to be an issue instead. I've used python's concurrent.futures a lot before so I can add that later. Hopefully it will work across platforms if the same versions are used but I can only test on a mac. |
i implemented this on a local branch a while ago using multiprocessing.Pool. It's very doable! I'm concerned a jetson nano would break however. The only technical difficulty is that the OD .xlsx file requires input from every image. My approach was to have each process submit the OD results to a multiprocessing.Queue that is managed by a multiprocessing.Manager. After everything is finished, you can pull from Queue, sort, then write. |
Yes, I'm not worried about sorting the returned results from each image for the xlsx file. |
They're more powerful raspberry pi's that have a GPU. |
An straightforward division would be to split jobs into individual images.
The text was updated successfully, but these errors were encountered: