Object recognition
The Object recognition operation allows you to categorize and tag people, objects, and other content classes in your images. This operation uses AWS Rekognition machine learning for the analyses.
The feature is currently available on the REST API v0.7 or higher via add-ons API.
How it works
Object recognition works asynchronously through the REST API, unlike the image processing operations performed on the fly.
- Start a processing job via REST API. Send an input file UUID with necessary processing operations.
- Wait until the processing job status becomes
done
. - The result will be available in the JSON response in the
appdata
section of the processed file.
Example
Let’s take this image as an example:
Once it is uploaded to a project, you can make an API call to run object recognition via Rekognition API:
Get $YOUR_PUBLIC_KEY
and $YOUR_SECRET_KEY
from API keys.
Webhook event
To get the job result, you need to enable file.info_updated
in the
Webhook section of the dashboard.
After completing the processing job, the webhook will be sent to the endpoint you specified in the webhook settings.
File information in response:
Check the execution status
If your application does not have a backend or uses a mobile version, you can submit the request yourself.
You can track execution status using request_id
from object recognition
request’s response:
The result will be available in JSON response in appdata
.
Get image info
Acquiring info about detected objects through a file info request to the API endpoint, specifying the
include
parameter.
The endpoint for requesting Object recognition info:
There are two methods for getting info on detected objects via GET requests, for multi-file and single-file cases:
or
Where:
include
parameter points our API to includeappdata
, an object holding various application data.$UUID
identifies the unique image for which you are requesting info on detected objects.
Single-file request
Multi-file request
Where:
- Note,
Accept
header points at the REST API v0.7 or higher. Uploadcare.Simple
stands for the auth-scheme that requires your Uploadcare project Public and Secret keys.- In a single-file example,
$UUID
identifies the image we get info for. - In a multi-file example, no
$UUID
is provided; you will receive detection info for all files in your project.
Single-file response
The JSON response for requesting a single-file that is properly authenticated looks like this:
Limitations
- This operation is not available on the Free plan.
API integrations
You don’t have to code most of the low-level API integrations. We have high-level libraries for all popular platforms:
Billing
- This feature is available on paid plans.
- Learn how we charge for this operation.