Skip to content

An example of how to use the multiprocessing package along with PyTorch.

License

Notifications You must be signed in to change notification settings

hexiaoyi95/concurrent_inference

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

concurrent_inference

An example of how to use the multiprocessing package along with PyTorch.

Code pertaining to this Medium post.


What does it do?

Data flow diagram

  • A processes [R] reads images from a folder [Fo] and multiple detection processes [D#] are used to obtain the class wise count of objects in the images and write it to a file [Fi].
  • It uses torch.multiprocessing for multiprocessing, PIL.Image to read the images and tqdm to keep track of the queue.
    processing

Usage

  • Basic usage : $ python count_objects.py -f input_folder -o output_file.log
  • For other options : $ python count_objects.py -h

About

An example of how to use the multiprocessing package along with PyTorch.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%