Getting Started

Installation

Install cvpal using pip:

pip install cvpal

Quickstart

Here's a quick example to get you started with cvpal:

from cvpal import generate, preprocessing

# Generate synthetic images
images = generate.synthetic_images("cat sitting on a chair", 10)

# Merge datasets
merged_dataset = preprocessing.merge_datasets([
    "path/to/dataset1",
    "path/to/dataset2"
])

# Count label occurrences
label_counts = preprocessing.count_labels("path/to/dataset")

print(f"Generated {len(images)} synthetic images")
print(f"Merged dataset contains {len(merged_dataset)} images")
print(f"Label distribution: {label_counts}")

Basic Usage

Synthetic Image Generation

Generate synthetic images from text prompts for data augmentation:

from cvpal import generate

# Generate 5 images of cats
images = generate.synthetic_images("a cat sitting", 5)

# Generate with specific style
images = generate.synthetic_images(
    "a dog running in a park", 
    10, 
    style="photorealistic"
)

Dataset Operations

Perform various operations on your datasets:

from cvpal import preprocessing

# Merge multiple datasets
merged = preprocessing.merge_datasets([
    "dataset1/images",
    "dataset2/images"
])

# Replace labels
preprocessing.replace_labels(
    "path/to/dataset", 
    {"old_label": "new_label"}
)

# Count label occurrences
counts = preprocessing.count_labels("path/to/dataset")
print(counts)

Next Steps

Explore Features

Learn about all the features cvpal offers for dataset management and synthetic image generation.

View Features β†’

API Reference

Detailed documentation of all functions and parameters available in cvpal.

API Reference β†’

MCP Server

Use cvPal through the Model Context Protocol for AI integration.

MCP Server β†’