Image Cropper

v1.0.0

Crop objects from images using bounding box annotations in COCO, YOLO, VOC, or LabelMe formats with optional padding and batch processing.

0· 292·4 current·4 all-time
byMingo_318@mingo-318
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description match the included script and SKILL.md. The tool only requires Pillow (documented in SKILL.md) and operates on local image and annotation files (COCO/YOLO/VOC/LabelMe).
Instruction Scope
SKILL.md instructs running the included script with local paths and options (padding, objects, format). The instructions do not ask the agent to read unrelated system files, environment variables, or to transmit data externally. Note: the printed code excerpt in the manifest appears truncated in the prompt display, but the file manifest indicates a full script is present — verify the full file if you plan to install.
Install Mechanism
No install spec; SKILL.md recommends 'pip install pillow' which is appropriate for the script. No downloads from arbitrary URLs or archive extraction are present.
Credentials
No environment variables, credentials, or config paths are required. The script does not access secrets or external services in the provided code.
Persistence & Privilege
Skill does not request always:true or any elevated/system-wide privileges; it is user-invocable only and does not modify other skill configurations.
Assessment
This skill appears to be a straightforward local image-cropping utility. Before installing or running it: (1) verify the full scripts/cropper.py file in the package (the preview in the prompt looked truncated); (2) run it in an environment where input images/labels are from trusted sources (it reads and writes local files only); (3) install Pillow from PyPI in a virtual environment (pip install pillow); (4) if you need stronger assurance, quickly grep the script for network/socket/requests/imports to confirm there are no external endpoints or hidden code paths; and (5) consider running initial tests on a small dataset to confirm behavior and outputs.

Like a lobster shell, security has layers — review code before you run it.

latestvk97dzstbwn0d34h95y1xygzfyx82bpaj
292downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Image Cropper

Crop images based on bounding box annotations. Supports COCO, YOLO, VOC, and LabelMe formats. Use when user needs to extract objects from images based on annotation boxes.

Features

  • Multi-format Support: COCO, YOLO, VOC, LabelMe
  • Batch Processing: Crop entire datasets
  • Padding: Add padding around bounding boxes
  • Output Options: Individual files or sprite sheet
  • Handle Missing: Gracefully handle images without annotations

Usage

# Crop YOLO annotations
python scripts/cropper.py yolo images/ labels/ output/

# Crop COCO annotations
python scripts/cropper.py coco annotations.json images/ output/

# Crop with padding
python scripts/cropper.py yolo images/ labels/ output/ --padding 10

# Crop all objects to individual files
python scripts/cropper.py yolo images/ labels/ output/ --objects

Examples

$ python scripts/cropper.py yolo ./images ./labels ./output

Processing 100 images...
✓ Cropped 250 objects from image_001.jpg
✓ Cropped 180 objects from image_002.jpg
...
Total: 500 cropped images

Installation

pip install pillow

Options

  • --padding: Padding around box (pixels, default: 0)
  • --objects: Save each object as separate file
  • --min-size: Minimum box size to crop (pixels)
  • --format: Output format (jpg, png, default: jpg)
  • --quality: JPEG quality 1-100 (default: 95)

Comments

Loading comments...