Skip to content

picselliahq/picsellia-cv-pipelines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

153 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Picsellia CV Pipelines

The official public repository for computer vision pipelines powered by Picsellia CV Engine.

This repository centralizes 17 production-ready pipelines for processing datasets and training computer vision models, all managed through the pxl-pipeline CLI and fully integrated with the Picsellia platform.


πŸš€ Quick Start

Installation

pip install picsellia-cv-engine picsellia-pipelines-cli

Authentication

export PXL_API_TOKEN="your-token"
pxl-pipeline login --organization my-org --env PROD --token $PXL_API_TOKEN

Test a Pipeline

cd pipelines/SAM3_Bbox
pxl-pipeline test SAM3_Bbox --run-config-file run_config.toml

Deploy to Picsellia

pxl-pipeline deploy SAM3_Bbox --organization my-org --bump patch

πŸ“¦ What's Inside

🎯 Pre-Annotation Pipelines

Automatically generate annotations using foundation models:

  • SAM-3 Bbox/Polygons - Zero-shot segmentation with natural language prompts
  • Grounding DINO - Text-guided object detection
  • YOLOv8 Pre-annotation - Fast detection with pretrained weights

πŸš‚ Training Pipelines

Fine-tune models on custom datasets:

  • YOLOv8 - Real-time object detection (3 variants)
  • RT-DETR - Transformer-based detection
  • YOLOv7 Segmentation - Instance segmentation
  • SAM-2, CLIP, DINOv2 - Foundation models
  • Paddle OCR - Text recognition

πŸ”§ Dataset Processing Pipelines

Transform and prepare datasets:

  • Dataset Tiler - Split large images with overlap handling
  • Albumentations - Image augmentation
  • Bounding Box Cropper - Extract regions
  • Diversified Extractor - Sample representative data

πŸ“š Documentation

Guide Description
Processing Pipelines Guide Pre-annotation and dataset processing
Training Pipelines Guide Training custom models
Developer Guide Creating custom pipelines
Documentation Index Full documentation navigation

Pipeline-Specific Documentation

Each pipeline has its own detailed README:


πŸ’‘ Usage Examples

Pre-annotate a Dataset

# 1. Create configuration
cat > run_config.toml << EOF
[job]
type = "PRE_ANNOTATION"

[auth]
organization_name = "my-org"
env = "PROD"

[parameters]
text_prompt = "car,person,bicycle"
threshold = 0.35

[input.dataset_version]
id = "your-dataset-id"
EOF

# 2. Test locally
pxl-pipeline test SAM3_Bbox --run-config-file run_config.toml

# 3. Deploy
pxl-pipeline deploy SAM3_Bbox --organization my-org --bump patch

Train a Custom Detector

# 1. Create training config
cat > train_config.toml << EOF
[job]
type = "TRAINING"

[auth]
organization_name = "my-org"
env = "PROD"

[parameters]
epochs = 100
batch_size = 16
learning_rate = 0.001

[input.dataset_collection.train]
id = "train-id"

[input.dataset_collection.val]
id = "val-id"

[input.model_version]
id = "pretrained-id"
EOF

# 2. Test
cd pipelines/yolov8/training
pxl-pipeline test training --run-config-file train_config.toml

# 3. Deploy for full training
pxl-pipeline deploy training --organization my-org --bump minor

Process Large Images

# Tile satellite/medical imagery
cd pipelines/dataset_tiler
pxl-pipeline test dataset_tiler --run-config-file tile_config.toml

πŸ”§ pxl-pipeline CLI Commands

Command Description Example
login Authenticate with Picsellia pxl-pipeline login --organization my-org --token $TOKEN
init Create new pipeline from template pxl-pipeline init my_pipeline --type processing --template pre_annotation
test Test pipeline locally pxl-pipeline test <pipeline> --run-config-file config.toml
deploy Deploy to Picsellia cloud pxl-pipeline deploy <pipeline> --organization my-org --bump patch

Learn more: Picsellia CV Engine - CLI Usage


πŸ—οΈ Repository Structure

picsellia-cv-pipelines/
β”œβ”€β”€ pipelines/              # 17 production-ready pipelines
β”‚   β”œβ”€β”€ SAM3_Bbox/
β”‚   β”œβ”€β”€ yolov8/
β”‚   β”œβ”€β”€ rt_detr/
β”‚   └── ...
β”œβ”€β”€ docs/                   # Comprehensive guides
β”‚   β”œβ”€β”€ PROCESSING_PIPELINES_GUIDE.md
β”‚   β”œβ”€β”€ TRAINING_PIPELINES_GUIDE.md
β”‚   └── DEVELOPER_GUIDE.md
β”œβ”€β”€ tests/                  # Test configurations
β”œβ”€β”€ scripts/                # Automation scripts
└── .github/workflows/      # CI/CD

Each pipeline includes:

  • pipeline.py - Main entry point
  • steps.py - Step implementations
  • utils/parameters.py - Parameter definitions
  • config.toml - Metadata
  • Dockerfile - Container definition
  • README.md - Detailed documentation

πŸŽ“ Getting Started Path

For Users:

  1. Install CLI tools β†’ See Quick Start
  2. Choose your use case:
  3. Check pipeline-specific README for detailed parameters

For Developers:

  1. Clone repository: git clone https://github.com/picselliahq/picsellia-cv-pipelines.git
  2. Setup: uv sync && pxl-pipeline login
  3. Read: Developer Guide
  4. Create pipeline: pxl-pipeline init my_pipeline --type processing

πŸ› οΈ Development

Quick Development Setup

# Clone and setup
git clone https://github.com/picselliahq/picsellia-cv-pipelines.git
cd picsellia-cv-pipelines
uv sync
pre-commit install

# Authenticate
pxl-pipeline login --organization test-account --env STAGING --token $TOKEN

Create a Custom Pipeline

# Initialize from template
pxl-pipeline init my_pipeline --type processing --template pre_annotation

# Customize
cd pipelines/my_pipeline
# Edit utils/parameters.py, steps.py, pipeline.py

# Test
pxl-pipeline test my_pipeline --run-config-file test_config.toml

# Deploy
pxl-pipeline deploy my_pipeline --organization my-org --bump patch

Full guide: Developer Guide


πŸ”¬ Testing & CI/CD

Run Tests

# Test specific pipeline
./scripts/test_pipelines.sh --pipeline SAM3_Bbox

# Test all pipelines
./scripts/test_pipelines.sh --pipeline all

CI/CD

  • Automated testing on every PR
  • GPU tests on self-hosted runners
  • Code quality checks with Ruff

πŸ’» Hardware Requirements

Use Case Minimum Recommended
Processing (CPU) 4 cores, 8GB RAM 8 cores, 16GB RAM
Processing (GPU) 8GB VRAM 16GB VRAM (10-20x faster)
Training 8GB VRAM, 16GB RAM 24GB VRAM, 32GB RAM, NVMe SSD

πŸ†˜ Troubleshooting

Common Issues

Authentication errors?

pxl-pipeline login --organization my-org --token $NEW_TOKEN

Out of memory?

# Reduce batch size in config
[parameters]
batch_size = 4

Slow processing?

# Verify GPU is detected
python -c "import torch; print(torch.cuda.is_available())"

More help: Troubleshooting sections in guides


🀝 Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes (follow existing patterns)
  4. Add tests and documentation
  5. Submit a pull request

Contribution types:

  • New pipelines
  • Bug fixes
  • Documentation improvements
  • Performance optimizations

See: Contributing section in docs


πŸ“ License

Apache License 2.0 - See LICENSE

Individual pipelines may use models with different licenses. Check model cards on Hugging Face and framework licenses.


πŸ™ Acknowledgments

Built with:

  • Picsellia CV Engine - Core framework
  • Meta AI - SAM-3, SAM-2, DINOv2
  • Hugging Face - Model hosting and transformers
  • Ultralytics - YOLOv8, YOLOv7
  • OpenAI - CLIP
  • PaddlePaddle - Paddle OCR

πŸ”— Links


Built by Picsellia | Website | Documentation | Blog

About

Public, production-ready training and processing pipelines for Picsellia.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors