Read Image Directory or Image List simultaneously with multi-processing
Project description
Concurrent-Image-Read
Concurrent-Image-Read is a python module to read Image Files or Image List Concurrently with multi-threading
Installation
Dependencies
- Python (>= 3.7)
- cv2 (>= 4.5)
- NumPy (>= 1.17)
- glob (>= 0.7)
- future (>= 0.18.2)
User installation
pip install ConcurrentImageRead
Source code
You can check the latest sources with the command:git clone https://github.com/adityamangal1998/Concurrent-Image-Read.git
Usage
Default Parameters
- read function
- image_list = List or Numpy array or Single Path of image
- num_threads = Number of threads (default 3) (optional)
- channel_type = BGR or RBG (default BGR) (optional)
- root_path = String, Parent path for all files (optional)
- grayscale = True or False (optional)
- resize = List or Tuple resize scale in (width,height) (optional)
- normalisation = True or False, Image array divide by 255 (optional)
- read_dir function
- dir_path = String, Path of Image Directory
- file_type = 'all' or 'PNG','JPG',...etc or ['JPG','PNG',...] (case sensitive) (default png) (optional)
- num_threads = Number of threads (default 3) (optional)
- channel_type = BGR or RBG (default BGR) (optional)
- sub_dir = Bool, Find all Images in all child directory also (default False) (optional)
- grayscale = True or False (optional)
- normalisation = True or False, Image array divide by 255 (optional)
With Image List
You can check the latest sources with the command:import ConcurrentImageRead as CIR
image_list = ['1.png','2.png','3.png']
images = CIR.read(image_list,num_threads=3, channel_type='BGR')
With Image Path
import ConcurrentImageRead as CIR
image_list = '1.png'
images = CIR.read(image_list,num_threads=3, channel_type='BGR')
With Directory Path
import ConcurrentImageRead as CIR
dir_path = 'data/images'
images = CIR.read_dir(dir_path,file_type='png', num_threads=3, channel_type='BGR', sub_dir=False)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for ConcurrentImageRead-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f90d11ee5c62d3c447fb3ed15b60221b69663f9e205a6fa6651dc292fe36e9 |
|
MD5 | 765fa4739c5b47fb00c3c9bb2aed8831 |
|
BLAKE2b-256 | 1eb9e3accc2166ace84d38aac0588536b4bde8caafa462805210ccb8ee4335e5 |
Close
Hashes for ConcurrentImageRead-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7007af1da2c785a737cd10866ec019e4b79b26f883f534916dae06fc2683f9b2 |
|
MD5 | 7e83cc87ec585a0d0bb981b6d1fca311 |
|
BLAKE2b-256 | 765808904f49cf5c72b52722fdaebfe86bdb5c721e389778c0e45ee6c43beacb |