object-detection
Detect objects in sampled video frames and return standard Detection schema. Use when Codex has frames and labels and needs YOLO detections with labels, confidences, and bounding boxes. This skill exp
Files2
View on GitHubSKILL.mdskills/custom/video_surveillance/object-detection/SKILL.md
GitHubObject Detection
Execution Priority
Prioritize calling this skill's scripts/run.py entrypoint first. Only write custom code after the script result is unsuitable or the script cannot cover the requested task.
Input Resolution
If frames are missing but the user provided a video path or upload, do not ask the user to provide frames and do not write detection or frame extraction code. First call video-stream-ingestion/scripts/run.py if needed, then frame-sampling/scripts/run.py to generate frames, then call this skill. If labels are missing, infer common labels from the task when safe, such as person for crowd, fight, behavior, or pedestrian analysis; otherwise ask only for target labels.
Atomic CLI
Run this skill directly with its own script. The script does not call other skill scripts and does not depend on shared src, tools, or registry modules.
python object-detection/scripts/run.py --frames-json <frames.json> --labels person,car --provider ultralytics --config <config.json> --output <detections.json>
Parameters: --frames-json, --labels, --provider, --model-path, --config, --output.
Workflow
- Read frames and target labels.
- Load the configured ultralytics YOLO detector.
- Map model labels to internal labels.
- Apply per-label confidence thresholds.
- Return frame-level Detection records.
Available Implementation
This skill is implemented as an atomic standalone script in its own scripts/run.py. The script contains the executable logic for this skill and must not import shared src, tools, or registry modules.
Inputs
frameslabels- Optional
detectionsto pass through precomputed results
Outputs
Returns detections, each with frame_id, timestamp, and objects containing object_id, label, confidence, bbox, and optional model_label.
Failure Modes
YOLO_DEPENDENCY_MISSINGYOLO_MODEL_LOAD_FAILEDYOLO_MODEL_NOT_FOUNDYOLO_INFERENCE_FAILEDFRAME_NOT_FOUND
Constraints
Do not infer business events, track identities, or create evidence.