skills/computer-vision-warehouse/SKILL.md
When the user wants to apply computer vision in warehouses, detect defects, track packages, count inventory, or automate visual inspection. Also use when the user mentions "computer vision," "image recognition," "object detection," "barcode reading," "package tracking," "quality inspection," "YOLO," "RCNN," "image classification," or "warehouse automation with vision." For general ML, see ml-supply-chain.
npx skillsauth add kishorkukreja/awesome-supply-chain computer-vision-warehouseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in applying computer vision to warehouse and supply chain operations. Your goal is to implement object detection, classification, tracking, and inspection systems using CNNs, YOLO, and other vision models.
import cv2
from ultralytics import YOLO
class PackageDetector:
"""
Real-time package detection using YOLO
"""
def __init__(self, model_path='yolov8n.pt'):
self.model = YOLO(model_path)
def detect_packages(self, image_path):
"""Detect packages in warehouse image"""
results = self.model(image_path)
detections = []
for result in results:
boxes = result.boxes
for box in boxes:
x1, y1, x2, y2 = box.xyxy[0]
confidence = box.conf[0]
class_id = box.cls[0]
detections.append({
'bbox': (x1, y1, x2, y2),
'confidence': confidence,
'class': class_id
})
return detections
from tensorflow import keras
from tensorflow.keras import layers
class QualityInspector:
"""
CNN for defect detection
"""
def build_model(self, image_size=(224, 224), num_classes=2):
model = keras.Sequential([
layers.Conv2D(32, 3, activation='relu',
input_shape=(*image_size, 3)),
layers.MaxPooling2D(2),
layers.Conv2D(64, 3, activation='relu'),
layers.MaxPooling2D(2),
layers.Conv2D(128, 3, activation='relu'),
layers.MaxPooling2D(2),
layers.Flatten(),
layers.Dense(256, activation='relu'),
layers.Dropout(0.5),
layers.Dense(num_classes, activation='softmax')
])
model.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
return model
from sort import Sort
class PackageTracker:
"""
Multi-object tracking for packages
"""
def __init__(self):
self.tracker = Sort()
self.package_trajectories = {}
def track(self, detections, frame_id):
"""
Track packages across frames
"""
# Convert detections to format for tracker
dets = np.array([[d['bbox'][0], d['bbox'][1],
d['bbox'][2], d['bbox'][3],
d['confidence']] for d in detections])
# Update tracker
tracked_objects = self.tracker.update(dets)
# Store trajectories
for obj in tracked_objects:
obj_id = int(obj[4])
bbox = obj[:4]
if obj_id not in self.package_trajectories:
self.package_trajectories[obj_id] = []
self.package_trajectories[obj_id].append({
'frame': frame_id,
'bbox': bbox
})
OpenCV: image processingYOLOv8: object detectionTensorFlow/PyTorch: deep learningRoboflow: dataset managementDetectron2: Facebook detectiondocumentation
When the user wants to optimize yard operations, manage trailer parking, or improve dock door utilization. Also use when the user mentions "yard management," "trailer tracking," "yard jockey," "drop trailer program," "trailer pool," "dock scheduling," or "gate management." For cross-dock operations, see cross-docking. For warehouse design, see warehouse-design.
tools
When the user wants to optimize workforce scheduling, create shift plans, or balance labor demand. Also use when the user mentions "staff scheduling," "labor planning," "shift optimization," "crew scheduling," "roster optimization," or "employee scheduling." For task assignment, see task-assignment-problem. For wave planning labor, see wave-planning-optimization.
testing
When the user wants to optimize pick wave planning, schedule warehouse operations, or improve order fulfillment efficiency. Also use when the user mentions "wave management," "batch picking," "pick wave scheduling," "order release optimization," "wave design," or "pick wave strategy." For order batching, see order-batching-optimization. For workforce scheduling, see workforce-scheduling.
testing
When the user wants to optimize warehouse slot assignments, improve pick efficiency, or design warehouse layouts. Also use when the user mentions "slotting optimization," "slot assignment," "ABC slotting," "pick path optimization," "storage location assignment," "warehouse layout optimization," or "forward pick locations." For picker routing, see picker-routing-optimization. For warehouse design, see warehouse-design.