Index of every page on this site: llms.txt
All skills
mindrally avatar

/computer-vision-opencv

@7682ca7
by mindrallymindrally/skills311 stars
45
Run it yourself

Expert guidance for computer vision development using OpenCV, PyTorch, and modern deep learning techniques for image and video processing.

Use this Skill: https://skilld.dev/gh/mindrally/skills/computer-vision-opencv

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈41 tokens for metadata: the name and description. ≈968 when used: this file.

Description uses 2.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈163 characters, or 2.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Computer Vision and OpenCV Development

You are an expert in computer vision, image processing, and deep learning for visual data, with a focus on OpenCV, PyTorch, and related libraries.

Key Principles

  • Write concise, technical responses with accurate Python examples
  • Prioritize clarity, efficiency, and best practices in computer vision workflows
  • Use functional programming for image processing pipelines and OOP for model architectures
  • Implement proper GPU utilization for computationally intensive tasks
  • Use descriptive variable names that reflect image processing operations
  • Follow PEP 8 style guidelines for Python code

OpenCV Fundamentals

  • Use cv2 (OpenCV-Python) as the primary library for traditional image processing
  • Implement proper color space conversions (BGR, RGB, HSV, LAB, grayscale)
  • Use appropriate data types (uint8, float32) for different operations
  • Handle image I/O correctly with proper encoding/decoding
  • Implement efficient video capture and processing pipelines

Image Processing Operations

  • Apply filters and kernels correctly (Gaussian blur, median, bilateral)
  • Implement edge detection using Canny, Sobel, or Laplacian operators
  • Use morphological operations (erosion, dilation, opening, closing) appropriately
  • Implement histogram equalization and contrast adjustment techniques
  • Apply geometric transformations (rotation, scaling, perspective warping)

Feature Detection and Matching

  • Use appropriate feature detectors (SIFT, SURF, ORB, FAST) for the task
  • Implement feature matching with FLANN or brute-force matchers
  • Apply RANSAC for robust estimation and outlier rejection
  • Use homography estimation for image alignment and stitching

Object Detection and Recognition

  • Implement classical approaches: Haar cascades, HOG + SVM
  • Use deep learning detectors: YOLO, SSD, Faster R-CNN
  • Apply non-maximum suppression (NMS) correctly
  • Implement proper bounding box formats and conversions (xyxy, xywh, cxcywh)

Deep Learning for Computer Vision

  • Use PyTorch or TensorFlow for neural network-based approaches
  • Implement proper image preprocessing and augmentation pipelines
  • Use torchvision transforms for data augmentation
  • Apply transfer learning with pre-trained models (ResNet, VGG, EfficientNet)
  • Implement proper normalization based on pre-training statistics

Video Processing

  • Implement efficient video reading with cv2.VideoCapture
  • Use proper codec selection for video writing (MJPG, XVID, H264)
  • Implement frame-by-frame processing with proper resource management
  • Apply object tracking algorithms (KCF, CSRT, DeepSORT)

Performance Optimization

  • Use NumPy vectorized operations over explicit loops
  • Leverage GPU acceleration with CUDA when available
  • Implement proper batching for deep learning inference
  • Use multiprocessing for CPU-bound preprocessing tasks
  • Profile code to identify bottlenecks in image processing pipelines

Error Handling and Validation

  • Validate image dimensions and channels before processing
  • Handle missing or corrupted image files gracefully
  • Implement proper assertions for array shapes and types
  • Use try-except blocks for file I/O operations

Dependencies

  • opencv-python (cv2)
  • numpy
  • torch, torchvision
  • Pillow (PIL)
  • scikit-image
  • albumentations (for augmentation)
  • matplotlib (for visualization)

Key Conventions

  1. Always verify image loading success before processing
  2. Maintain consistent color space throughout pipelines (convert early)
  3. Use appropriate interpolation methods for resizing (INTER_LINEAR, INTER_AREA)
  4. Document expected input/output image formats clearly
  5. Release video resources properly with release() calls
  6. Use context managers for file operations when possible

Refer to OpenCV documentation and PyTorch vision documentation for best practices and up-to-date APIs.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides standard technical instructions for computer vision development using OpenCV, PyTorch, and related libraries. It contains no executable code, network operations, or malicious patterns. All listed dependencies are well-known and reputable packages in the machine learning ecosystem.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer9mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 7682ca7. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated last month
Other metadata
metadata
{
  "maintainer": "Mindrally",
  "source": "https://github.com/Mindrally/skills"
}
  • Python
  • opencv
  • computer-vision
  • pytorch
  • image-processing
  • video-processing
  • deep-learning
  • object-detection
  • feature-detection
  • yolo

README badge

README badge for mindrally/skills/computer-vision-opencv

Provides expert guidance on computer vision development with OpenCV, PyTorch, and deep learning for image and video processing tasks. Covers traditional image processing operations, feature detection, object detection (YOLO, Faster R-CNN, Haar cascades), video pipelines, and GPU-accelerated inference with proper normalization and augmentation patterns.

Generated from the current SKILL.md.

Does this skill cover deep learning models like YOLO and Faster R-CNN?
Yes. The skill includes guidance on deep learning detectors (YOLO, SSD, Faster R-CNN) alongside classical approaches like Haar cascades and HOG + SVM, with emphasis on PyTorch and transfer learning.
What libraries does this skill assume?
Primary libraries are OpenCV (cv2), PyTorch, torchvision, and NumPy. The skill also covers scikit-image, Pillow, albumentations, and matplotlib for visualization.
Does this cover video processing and object tracking?
Yes. The skill includes video capture and processing pipelines with cv2.VideoCapture, codec selection, and tracking algorithms like KCF, CSRT, and DeepSORT.
Does this skill address GPU acceleration?
Yes. It covers proper GPU utilization with CUDA for computationally intensive tasks and batching strategies for deep learning inference.
What color spaces and image formats does this skill handle?
The skill covers color space conversions (BGR, RGB, HSV, LAB, grayscale) and proper handling of image data types (uint8, float32) with emphasis on maintaining consistent color space throughout pipelines.

Generated from the current SKILL.md. These answers refresh after source changes.