Skip to content

Intermediate · 30 min

Computer Vision Pipeline: Object Detection, Classification, and Search

Build optimized computer vision workflows with Pixeltable. Run YOLOX, CLIP, and custom models as computed columns with automatic batching, stored results, and incremental processing.

The Challenge

Computer vision pipelines require managing image preprocessing, running multiple models (detection, classification, embedding), storing results, and keeping everything in sync. Adding a new model or changing thresholds means reprocessing millions of images manually.

The Solution

Pixeltable makes CV pipelines declarative. Define models as computed columns, and Pixeltable handles execution, batching, stored results, and incremental updates. After a threshold change, you recompute that column and the ones that depend on it, not the whole pipeline.

Implementation Guide

Step-by-step walkthrough with code examples

Step 1 of 4

Image Table

Create a table for images with metadata tracking.

python
1import pixeltable as pxt
2
3# Create image processing pipeline
4images = pxt.create_table('app.images', {
5 'image': pxt.Image,
6 'source': pxt.String,
7 'timestamp': pxt.Timestamp,
8 'camera_id': pxt.String,
9})
10
11# Insert images: local, S3, or URL
12images.insert([
13 {'image': 's3://bucket/cam01/frame_001.jpg',
14 'source': 'warehouse', 'camera_id': 'cam-01'},
15 {'image': '/data/inspection/part_42.png',
16 'source': 'qc-station', 'camera_id': 'cam-02'},
17])
Each image is a typed column value next to its metadata; the file stays where it is. No separate image registry or file management.

Key Benefits

One table instead of custom CV pipeline code
Automatic batching and GPU utilization
Detections stored with each image, so queries do not rerun the model
Incremental processing: only new images trigger computation
Mix vendor models (YOLOX, CLIP) with custom PyTorch models seamlessly

Real Applications

Manufacturing quality control and defect detection
Retail inventory monitoring and shelf analytics
Security and surveillance image analysis
Medical image classification and triage
Autonomous vehicle perception data processing

Prerequisites

Familiarity with computer vision concepts
Python and basic ML experience
Python 3.9+
GPU recommended for large-scale inference
PyTorch for custom model support

How-to guides

Ready to get started?

Install Pixeltable and start building in minutes. One Python file for tables, indexes, and HTTP.