Skip to content

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