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 | |
|---|---|---|---|
| pytorch_smartcrop-1.0.0.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytorch_smartcrop-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
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
|