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

Added Multiprocessing support to speed up preprocessing #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

the-lego-batman
Copy link

Added the multiprocessing module to leverage available CPU cores for a faster execution. Tested on a 16 core 12th Gen i5 processor with the base preprocess.py script and the multiprocessing enabled script for 3758 images.

  • Base preprocess.py script took more than 400 minutes with around 10% CPU utilization.
  • The multiprocessing enabled script took around 42 minutes with almost 100% CPU utilization.

Added a command line argument to control CPU core utilization. Inputting a value between 0.1 to 1.0 would allow control over the number of cores used. Default value is 0.5 (50% of the CPU cores).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant