Automated Object Detection and Cropping with n8n
detail.loadingPreview
This n8n workflow automates the process of detecting objects within an image using Cloudflare's AI and then cropping out those identified objects. The cropped images are then uploaded to Cloudinary and their metadata is indexed in Elasticsearch for easy retrieval and analysis.
About This Workflow
This workflow leverages the power of n8n to create a seamless image processing pipeline. It begins by fetching a source image and then utilizes Cloudflare's advanced AI models (specifically Detr-Resnet-50) to perform object detection. The workflow intelligently filters results to ensure only high-confidence detections (score >= 0.9) are processed. Each identified object is then precisely cropped from the original image based on its bounding box coordinates. These cropped images are subsequently uploaded to Cloudinary for storage and CDN delivery, with their URLs and associated metadata, including labels and original filename, being indexed in an Elasticsearch database for efficient searching and analysis.
Key Features
- Automated Object Detection: Utilizes powerful AI models to identify objects within images.
- Intelligent Filtering: Processes only high-confidence detections (score >= 0.9).
- Precise Cropping: Automatically crops identified objects based on bounding box data.
- Cloud Storage Integration: Seamlessly uploads cropped images to Cloudinary.
- Metadata Indexing: Stores image details and detected object information in Elasticsearch for easy searching.
How To Use
- Set Source Image and API Credentials: Configure the 'Set Variables' node with your source image URL and ensure your Cloudflare, Cloudinary, and Elasticsearch API credentials are set up in n8n.
- Trigger Workflow: Manually trigger the workflow by clicking the 'Test workflow' button.
- Object Detection: The workflow will fetch the image and send it to Cloudflare's AI API for object detection.
- Filter Detections: Detections with a confidence score below 0.9 will be discarded.
- Crop and Upload: For each high-confidence detection, the object will be cropped from the original image and uploaded to Cloudinary.
- Index in Elasticsearch: The URL of the uploaded cropped image, along with its source image URL, label, and relevant metadata, will be indexed in your Elasticsearch instance.
Apps Used
Workflow JSON
{
"id": "fa5406f5-c4bf-4141-b669-3e3eec52cf76",
"name": "Automated Object Detection and Cropping with n8n",
"nodes": 29,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: fa5406f5-c4bf...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.