Skip to main content

cropimage

Colab PyPI version Python Downloads contributions welcome

CropImage is a simple toolkit for image cropping. Different from other projects that mainly tackle face region, we extend to all kinds of images such as landscape. We support horizontal and portrait size and generate a square output.

Installation

pip install cropimage

Get Started

from cropimage import Cropper

cropper = Cropper()

# Get a Numpy array of the cropped image
# Set completeness to be True if you expect the 'face' to be focused rather than 'person'
# Set target_size to be a tuple (size, size), only square output is supported now
result = cropper.crop('./images/input.jpg')

# Save the cropped image
cv2.imwrite('cropped.jpg', result)

More Results

Contributing

If you find any issue of this project, feel free to open an issue or contribute!

Metadata

Release files for cropimage-dh 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cropimage-dh 0.0.7
File Interpreter ABI Platform
cropimage_dh-0.0.7-py3-none-any.whl Python 3 none any Details

Release files / cropimage_dh-0.0.7-py3-none-any.whl

Download URL cropimage_dh-0.0.7-py3-none-any.whl
Size 270.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2b0fa4394d29b6031d1db9112501d5a0ede55a4e1c12fe2055c0376ac17a431c
BLAKE2b-256 checksum
How to use checksums
2ddde6be6638dde0d84e1670573ccdc8d03bf9b988c2543220d3ccb3fab39a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file

0.0.6

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page