<aside>
ðŸ›
Extract Image Region by Detection Class
Crop images by selecting detected object classes from Object Detection output. Select a class (e.g., "person", "car", "dog"), and the tool automatically crops the image to the bounding box of that object. Perfect for extracting detected objects, batch object extraction, and automated region cropping
</aside>
What it does
Image Crop by Class works with Object Detection model outputs to automatically crop images based on detected object classes. You select a target class from the detected objects, and the tool crops the image to that object's bounding box—extracting just the detected object region. Essential for object extraction, batch processing, and automated object-based image cropping.
Problem it solves
- Extract detected objects – Crop to bounding box of specific class (person, car, dog, etc.)
- Single object focus – Isolate one detected object from scene
- Batch object extraction – Automate cropping of detected objects across images
- Targeted region cropping – Focus on specific detected categories
- Detection validation – Visually verify detected objects by cropping
- Face/person extraction – Crop detected faces/people from photos
- Automated image processing – Crop before further processing
Input/Output
<aside>
- Input: Object Detection output + Class selection
- Detection: Output from object detection model (DETR, YOLOS, etc.)
- Class selection: Select target class from detected objects
- Output: Cropped image
- Format: Cropped image containing only selected object region
- Bounding box: Dimensions of detected object
</aside>
Features - Three Controls for Flexible Cropping
<aside>
-
Class Selection: Choose which semantic class to extract
- Available classes: Person, Car, Sky, Building, Tree, Grass, Water, Dog, Cat, Bicycle, etc.
- How it works: Browse detected/segmented classes, select one class to extract
- Purpose: Specify exactly which semantic region you want
-
Dilation of the Bounding Box: Expand or contract the bounding box boundaries by pixels
- Format: Cropped image containing only selected object region
- Range: Positive (expand outward) or Zero (exact)
- Measured in: Pixels on all sides
- How it works:
- +20px dilation: Adds 20 pixels padding around detected region
- 10px dilation: Removes 10 pixels from edges of detected region
- 0 dilation: Uses exact detection boundary
- Purpose: Control how much context to include around the class region
-
Handling Duplicated Classes (Multiple Instances): When multiple instances of same class exist, decide which to keep
| Option |
Behavior |
Use Case |
| merge |
Combine all instances into ONE bounding box |
Extract all people/cars in frame together |
| left most |
Keep instance furthest LEFT |
Extract leftmost person |
| top most |
Keep instance furthest TOP |
Extract topmost object |
| right most |
Keep instance furthest RIGHT |
Extract rightmost person |
| bottom most |
Keep instance furthest BOTTOM |
Extract bottommost object |
| center most |
Keep instance closest to CENTER |
Extract main subject in middle |
</aside>
How to Use
<aside>
crop by class_.mp4
- Load detection → Get output from object detection model (DETR, YOLOS, etc.)
- Select class → Add Image Crop by Class and choose target class from detected objects
- Run Flow → Tool extracts selected class region
</aside>
Note: Image Crop by Class requires Object Detection model output with bounding boxes and class labels. It crops images to detected object regions. Perfect for object extraction, batch processing, detection validation, and automated image cropping workflows.