Skip to main content

Customized library for preprocessing images

Project description

img-preprocess-pipeline

Description:

The package img-preprocess-pipeline is used to:

  • Load images
  • Display images
  • Preprocess images to input in machine learning projects
    • Reshape images
    • Normalize images
    • Augument images

Installation

Use the package manager pip to install img-preprocess-pipeline

pip install img-preprocess-pipeline

Usage

Preprocessing

from img-preprocess-pipeline.preprocessing import tools, pipeline


tools.reshape_image(image) #Reshapes a image and returns a dictionary with the title "Reshaped" and the resulting image

tools.scale_image(image) #Scales a image (with range 0 to 1) and returns a dictionary with the title "Scaled" and the resulting image

tools.scale_image(image) #Scales a image (with range 0 to 1) and returns a dictionary with the title "Scaled" and the resulting image


tools.random_augumentation(image) #Create a new image modifying the saturation, brightness and rotation (in a random approach) of the original image and returns a dictionary with the title "Augumented image" and the resulting image.


tools.pipeline(image) #Create a new image using all the other functions in "tools" in combined into a pipeline. Returns a dictionary with the title "Preprocessed" and the resulting image.

Utils

from img-preprocess-pipeline.utils import io, display_images

image_path = "your_image.png"

io.load_image(image_path,grayscale=False) #Load the image from the directory in scale RGB (with grayscale=False) and returns a tensor array.

io.save_image(image,save_path) #Saves a image converting from tensorinto a numpy array.

io.display_images(image,image1,...,image_x) #Displays the images and the respective labels of the images (Scaled,Preprocessed...) in a matrix of images with shape of (1,X) images.

Author

Pablo Francisco

License

MIT

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

img-preprocess-pipeline-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

img_preprocess_pipeline-0.0.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file img-preprocess-pipeline-0.0.1.tar.gz.

File metadata

  • Download URL: img-preprocess-pipeline-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for img-preprocess-pipeline-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e76df4176b639ad03a0718e36b0f2e69e6f7031e7a4a2dc498e30021e5ed6390
MD5 55f5a563dcca219865a944cd9fdbe8d6
BLAKE2b-256 d87f737e88cedf3a96e502cae732e756a34fdfc32eb0d0026e68e2f0a7ecfd14

See more details on using hashes here.

File details

Details for the file img_preprocess_pipeline-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for img_preprocess_pipeline-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5e98caee0dd635559b8eaa0f6a61399174e8f1e04fb6359a52ad360e1b1d463
MD5 15637aa382f1664f118a7b4f67ea304e
BLAKE2b-256 2078c4497fc06f967e763c235e6b9f728f3e939b01005a62f22dcb2bfb695d9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page