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 Actions
cropimage_dh-0.0.7-py3-none-any.whl Python 3 none any Details for cropimage_dh-0.0.7-py3-none-any.whl

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

Security for cropimage-dh 0.0.7

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.

Release history Release notifications | RSS feed

This release

0.0.7 This release

1 release file No provenance

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