Skip to main content

Minimalistic library designed to be an interface for the model input with a lightweight `Image` class.

Project description

pytorch-image

Minimalistic library designed to be an interface for the model input with a lightweight Image class.

from my_model import MyModel, Image

image = Image.from_numpy(numpy_image)
predictions = model(image)

It also offers a simple interface for essential image operations such as loading, resizing, augmenting, and saving.

Installation

pip install pytorch-image
poetry add pytorch-image

Usage

from pytorch_image import Image
import albumentations


image = Image.open("path/to/image.png")

image.augment(albumentations.HorizontalFlip())

image.torch()
Image.from_numpy
Image.from_torch
Image.from_pil_image
Image.open

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

pytorch_image-1.0.0.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

pytorch_image-1.0.0-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

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