Skip to main content

Enable thumbor to use AWS rekognition to run face detection

Build Status Coverage Status PyPI version

thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images. It also features a smart detection of important points in the image for better cropping and resizing, using opencv face detection algorithms.

AWS Rekognition can quickly detect faces in image using sophisticated deep learning-based visual search and image classification.

thumbor_rekognition helps to use AWS Rekognition service to do face detection in thumbor easily.

Installation

pip install thumbor_rekognition

Enable detector

Add thumbor_rekognition to your thumbor.conf. Do not include thumbor’s out-of-box face detector.

DETECTORS = [
    # Do not use out-of-box face detector
    # 'thumbor.detectors.face_detector',

    # Include thumbor_rekognition
    'thumbor_rekognition',
    'thumbor.detectors.feature_detector',
]

The above configuration tells thumbor that it should run both the facial detection and the feature detection. These are mutually exclusive, meaning that if a face is detected, the feature detector won’t be run.

AWS Rekognition

Authentication

Authentication is handled by botocore, see Boto3 documentation.

Region

To set the region to use Rekognition service, add REKOGNITION_REGION to your thumbor.conf. Default is us-east-1.

# AWS region for the Rekognition service
REKOGNITION_REGION = 'us-west-2'

Using it

After installing thumbor_rekognition, you can test it by using the following URL.

http://<thumbor>:<port>/unsafe/300x300/smart/my.domain.com/picture.png

If you need to see what thumbor is seeing in your image, prepend /debug to all the parameters.

http://<thumbor>:<port>/unsafe/debug/300x300/smart/my.domain.com/picture.png

Release files for thumbor_rekognition 0.1.1

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

Source distribution (sdist)

Source distribution for thumbor_rekognition 0.1.1
File Size Uploaded
thumbor_rekognition-0.1.1.tar.gz 4.5 kB Details

Release files / thumbor_rekognition-0.1.1.tar.gz

Download URL thumbor_rekognition-0.1.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
769895c4384679e3d991ee93fde0115b44d700b8205d2188c756435cc8e64aa8
BLAKE2b-256 checksum
How to use checksums
872467a5f0ead679c5a81606e0dbbb2b84ee54ae8cd8e8ff27b22419c4cfa8e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

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