pytorch-smartcrop
This is a PyTorch implementation of the smartcrop algorithm. The smartcrop algorithm is a content aware image cropping algorithm that is used to crop images to the most interesting part of the image. The algorithm is based on the pyvips smartcrop implementation.
Prerequisites
- requires libvips shared library to be installed on the system. For further information on how to install libvips, please refer to the libvips installation guide
Usage
from pytorch_smartcrop import SmartCrop
from PIL import Image
# load image
image = Image.open('image.jpg')
# crop image to 256x256
sc = SmartCrop(patch_size=(256, 256))
cropped_image = sc(image)
Metadata
Release files for pytorch-smartcrop 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytorch_smartcrop-1.0.0.tar.gz | 3.1 kB | Without provenance | Details for pytorch_smartcrop-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytorch_smartcrop-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pytorch_smartcrop-1.0.0-py3-none-any.whl |
Total release size: 7.3 kB
Release files / pytorch_smartcrop-1.0.0.tar.gz
| Download URL | pytorch_smartcrop-1.0.0.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f9344efd4269ef0d8b091ec083f37dcf80ba8c232e83fad7963539e82006520
|
|
BLAKE2b-256 checksum How to use checksums |
4b59133eba0abf90b362569e9d9b8612be0138e07eaec085909a093166e4c94b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Release files / pytorch_smartcrop-1.0.0-py3-none-any.whl
| Download URL | pytorch_smartcrop-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04e1b7a3ddbcd284e9bfdd69c845104396e0957322d6821b314853ea1bd10067
|
|
BLAKE2b-256 checksum How to use checksums |
b79928e4c6324f101c21aa8d235daf6b0355b771487c29a3923af483c3620b0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.19
|
Security for pytorch-smartcrop 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.