Repository navigation
Content Aware Crop Page
The "Content Aware Crop" page within Dataset Tools provides a powerful way to automatically crop photos with people, eliminating white space and blank areas. This feature utilizes YoloV4 to identify people in images and focuses on enhancing the presence of individuals in your dataset. Please note that currently, only the "people" class is supported for predictions; other classes such as cars or animals are not supported at this time.
Using this page, you can:
- Automatically Crop Images: Crop images intelligently to keep the focus on the person in the photo while removing unnecessary background.
When using the "Content Aware Crop" feature, you can customize the following options:
-
Threshold Certainty for YoloV4 Predictions: Adjust the certainty threshold for YoloV4 predictions to control the precision of person detection.
-
Threshold for Intersection over Union (IoU): This setting allows you to control the tolerance level for bounding box overlap during person detection. A higher IoU threshold results in stricter criteria for considering two bounding boxes as separate detections, while a lower threshold may merge closely overlapping boxes. Adjust this threshold based on your specific dataset and requirements.
-
Bounding Box Expansion in Percentage: Define the expansion percentage for the bounding box to include a portion of the background around the person.
-
Dimension Size for Output Cropped Images: Specify the desired size for the output cropped images.
-
Lanczos Sampler Radius: Set the Lanczos sampler radius for image resizing; higher values takes a lot longer to process but could potentially keep more details from the original image.
-
Sharpen Sigma: Enable this option when downscaling very large images (e.g., 4K to 512x512) to enhance image quality.
-
Minimum Original Image Size to Apply Sharpen Sigma: Define the minimum original image size to which the Sharpen Sigma option will be applied.
-
Select Input and Output Folders: Start by specifying the input folder containing your images and the output folder where the cropped images will be saved.
-
Configure Settings: Adjust the configuration options mentioned above based on your specific requirements. Note that recommended starting settings are already pre-configured to help you get started quickly.
-
Crop Images: Click the "Crop" button to initiate the content-aware cropping process.

![]() |
![]() |
| Input Image | Output Image using 25% Bounding Box Expansion |
- Experiment with different configuration settings to achieve the best results for your dataset.
- Use this feature to enhance the focus on people in your images and remove distracting background elements.
- Doesn't work very well with Anime or Paintings; its better used for Photography... I'm currently looking for a Yolo fine tuned model that got trained with more artistic images to support Anime and Paintings better.
The "Content Aware Crop" feature streamlines the process of cropping images to emphasize the main subject, making it an essential tool for creating high-quality datasets with a focus on individuals.

