cv-pipeline-builder

Computer vision ML pipelines for image classification, object detection, semantic segmentation, and image generation. Activates for "computer vision", "image classification", "object detection", "CNN", "ResNet", "YOLO", "image segmentation", "image preprocessing", "data augmentation". Builds end-to-end CV pipelines with PyTorch/TensorFlow, integrated with SpecWeave increments.

⭐17stars🔀3forks📁View on GitHub🕐Updated Jan 3, 2026⬇️1downloads

When & Why to Use This Skill

The Computer Vision Pipeline Builder is a specialized Claude skill designed to automate the development of end-to-end machine learning workflows for visual data. It streamlines the creation of complex CV architectures—including image classification, object detection, and semantic segmentation—using industry-leading frameworks like PyTorch and TensorFlow. By integrating advanced data augmentation, transfer learning, and production-ready deployment paths (ONNX), this skill significantly accelerates the transition from raw image data to high-performance AI models.

Use Cases

  • Automated Image Classification: Rapidly configure and train ResNet, EfficientNet, or Vision Transformer models for custom image datasets using transfer learning.
  • Real-time Object Detection: Implement robust detection systems using YOLO or Faster R-CNN to identify and localize multiple objects within images or video streams.
  • Semantic Segmentation for Precision Tasks: Develop pixel-level classification models using U-Net or DeepLab for applications in medical imaging, autonomous driving, or satellite analysis.
  • Advanced Data Augmentation: Enhance model generalization by automatically applying sophisticated preprocessing techniques like Mixup, Cutout, and AutoAugment.
  • Production-Ready Deployment: Streamline the ML lifecycle by exporting trained models to ONNX format and generating optimized inference scripts for production environments.
namecv-pipeline-builder
description|

Computer Vision Pipeline Builder

Overview

Specialized ML pipelines for computer vision tasks. Handles image preprocessing, data augmentation, CNN architectures, transfer learning, and deployment for production CV systems.

CV Tasks Supported

1. Image Classification

from specweave import CVPipeline

# Binary or multi-class classification
pipeline = CVPipeline(
    task="classification",
    num_classes=10,
    increment="0042"
)

# Automatically configures:
# - Image preprocessing (resize, normalize)
# - Data augmentation (rotation, flip, color jitter)
# - CNN architecture (ResNet, EfficientNet, ViT)
# - Transfer learning from ImageNet
# - Training loop with validation
# - Inference pipeline

pipeline.fit(train_images, train_labels)

2. Object Detection

# Detect multiple objects in images
pipeline = CVPipeline(
    task="object_detection",
    classes=["person", "car", "dog", "cat"],
    increment="0042"
)

# Uses: YOLO, Faster R-CNN, or RetinaNet
# Returns: Bounding boxes + class labels + confidence scores

3. Semantic Segmentation

# Pixel-level classification
pipeline = CVPipeline(
    task="segmentation",
    num_classes=21,
    increment="0042"
)

# Uses: U-Net, DeepLab, or SegFormer
# Returns: Segmentation mask for each pixel

Best Practices for CV

Data Augmentation

from specweave import ImageAugmentation

aug = ImageAugmentation(increment="0042")

# Standard augmentations
aug.add_transforms([
    "random_rotation",  # ±15 degrees
    "random_flip_horizontal",
    "random_brightness",  # ±20%
    "random_contrast",  # ±20%
    "random_crop"
])

# Advanced augmentations
aug.add_advanced([
    "mixup",  # Mix two images
    "cutout",  # Random erasing
    "autoaugment"  # Learned augmentation
])

Transfer Learning

# Start from pre-trained ImageNet models
pipeline = CVPipeline(task="classification")

# Option 1: Feature extraction (freeze backbone)
pipeline.use_pretrained(
    model="resnet50",
    freeze_backbone=True
)

# Option 2: Fine-tuning (unfreeze after few epochs)
pipeline.use_pretrained(
    model="resnet50",
    freeze_backbone=False,
    fine_tune_after_epoch=3
)

Model Selection

Image Classification:

  • Small datasets (<10K): ResNet18, MobileNetV2
  • Medium datasets (10K-100K): ResNet50, EfficientNet-B0
  • Large datasets (>100K): EfficientNet-B3, Vision Transformer

Object Detection:

  • Real-time (>30 FPS): YOLOv8, SSDLite
  • High accuracy: Faster R-CNN, RetinaNet

Segmentation:

  • Medical imaging: U-Net
  • Scene segmentation: DeepLabV3, SegFormer

Integration with SpecWeave

# CV increment structure
.specweave/increments/0042-image-classifier/
├── spec.md
├── data/
│   ├── train/
│   ├── val/
│   └── test/
├── models/
│   ├── model-v1.pth
│   └── model-v2.pth
├── experiments/
│   ├── baseline-resnet18/
│   ├── resnet50-augmented/
│   └── efficientnet-b0/
└── deployment/
    ├── onnx_model.onnx
    └── inference.py

Commands

/ml:cv-pipeline --task classification --model resnet50
/ml:cv-evaluate 0042  # Evaluate on test set
/ml:cv-deploy 0042    # Export to ONNX

Quick setup for CV projects with production-ready pipelines.