🎨 Data Designer Tutorial: Providing Images as Context for Vision-Based Data Generation¶
📚 What you'll learn¶
This notebook demonstrates how to provide images as context to generate text descriptions using vision-language models.
- ✨ Visual Document Processing: Converting images to chat-ready format for model consumption
- 🔍 Vision-Language Generation: Using vision models to generate detailed summaries from images
If this is your first time using Data Designer, we recommend starting with the first notebook in this tutorial series.
📦 Import Data Designer¶
data_designer.configprovides access to the configuration API.DataDesigneris the main interface for data generation.
# Standard library imports
import base64
import io
import uuid
# Third-party imports
import pandas as pd
import rich
from datasets import load_dataset
from IPython.display import display
from rich.panel import Panel
# Data Designer imports
import data_designer.config as dd
from data_designer.interface import DataDesigner
⚙️ Initialize the Data Designer interface¶
DataDesigneris the main object responsible for managing the data generation process.When initialized without arguments, the default model providers are used.
data_designer = DataDesigner()
🏗️ Initialize the Data Designer Config Builder¶
The Data Designer config defines the dataset schema and generation process.
The config builder provides an intuitive interface for building this configuration.
When initialized without arguments, the default model configurations are used.
config_builder = dd.DataDesignerConfigBuilder()
🌱 Seed Dataset Creation¶
In this section, we'll prepare our visual documents as a seed dataset for summarization:
- Loading Visual Documents: We use a small pets image dataset containing labeled images
- Image Processing: Convert images to base64 format for vision model consumption
- Metadata Extraction: Preserve relevant image information (label, etc.)
The seed dataset will be used to generate detailed text descriptions of each image.
# Dataset processing configuration
IMG_COUNT = 512 # Number of images to process
BASE64_IMAGE_HEIGHT = 512 # Standardized height for model input
# Load the pets dataset (train split, ~23 MB total)
img_dataset_cfg = {"path": "rokmr/pets", "split": "train"}
def resize_image(image, height: int):
"""
Resize image while maintaining aspect ratio.
Args:
image: PIL Image object
height: Target height in pixels
Returns:
Resized PIL Image object
"""
original_width, original_height = image.size
width = int(original_width * (height / original_height))
return image.resize((width, height))
def convert_image_to_chat_format(record, height: int) -> dict:
"""
Convert PIL image to base64 format for chat template usage.
Args:
record: Dataset record containing image and metadata
height: Target height for image resizing
Returns:
Updated record with base64_image and uuid fields
"""
image = resize_image(record["image"], height)
img_buffer = io.BytesIO()
image.save(img_buffer, format="PNG")
byte_data = img_buffer.getvalue()
base64_encoded_data = base64.b64encode(byte_data)
base64_string = base64_encoded_data.decode("utf-8")
return record | {"base64_image": base64_string, "uuid": str(uuid.uuid4())}
# Load and process the image dataset
print("📥 Loading and processing images...")
img_dataset = load_dataset(**img_dataset_cfg).map(
convert_image_to_chat_format, fn_kwargs={"height": BASE64_IMAGE_HEIGHT}
)
img_dataset = pd.DataFrame(img_dataset[:IMG_COUNT])
print(f"✅ Loaded {len(img_dataset)} images with columns: {list(img_dataset.columns)}")
📥 Loading and processing images...
Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
[21:16:33] [WARNING] Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.
✅ Loaded 512 images with columns: ['image', 'label', 'base64_image', 'uuid']
img_dataset.head()
| image | label | base64_image | uuid | |
|---|---|---|---|---|
| 0 | <PIL.JpegImagePlugin.JpegImageFile image mode=... | 0 | iVBORw0KGgoAAAANSUhEUgAAAeQAAAIACAIAAADc8YinAA... | 8a8ab698-5458-4f4a-ba0d-02c5a76c520a |
| 1 | <PIL.JpegImagePlugin.JpegImageFile image mode=... | 0 | iVBORw0KGgoAAAANSUhEUgAAAiQAAAIACAIAAAA9rOAHAA... | 64e52508-8342-40ab-8ab7-3198d7afe164 |
| 2 | <PIL.JpegImagePlugin.JpegImageFile image mode=... | 0 | iVBORw0KGgoAAAANSUhEUgAAAqoAAAIACAIAAADFYNm1AA... | 7822ce68-6989-475a-93a2-f806609bd8bb |
| 3 | <PIL.JpegImagePlugin.JpegImageFile image mode=... | 0 | iVBORw0KGgoAAAANSUhEUgAAAwAAAAIACAIAAAC6lJxtAA... | 48813cc6-72d3-4b9d-a711-4b6198002cfb |
| 4 | <PIL.PngImagePlugin.PngImageFile image mode=RG... | 0 | iVBORw0KGgoAAAANSUhEUgAAAqoAAAIACAIAAADFYNm1AA... | 9f13fb28-4fb3-46c5-8b1c-5d3a67ad1e25 |
# Add the seed dataset containing our processed images
df_seed = pd.DataFrame(img_dataset)[["uuid", "label", "base64_image"]]
config_builder.with_seed_dataset(dd.DataFrameSeedSource(df=df_seed))
DataDesignerConfigBuilder( seed_dataset: df seed )
# Add a column to generate detailed image descriptions
config_builder.add_column(
dd.LLMTextColumnConfig(
name="description",
model_alias="nvidia-vision",
prompt=(
"Provide a detailed description of the content in this image in Markdown format. "
"Describe the main subject, background, colors, and any notable details."
),
multi_modal_context=[dd.ImageContext(column_name="base64_image")],
)
)
data_designer.validate(config_builder)
[21:18:03] [INFO] ✅ Validation passed
🔁 Iteration is key – preview the dataset!¶
Use the
previewmethod to generate a sample of records quickly.Inspect the results for quality and format issues.
Adjust column configurations, prompts, or parameters as needed.
Re-run the preview until satisfied.
preview = data_designer.preview(config_builder, num_records=2)
[21:18:03] [INFO] 📸 Preview generation in progress
[21:18:03] [INFO] |-- 🔒 Jinja rendering engine: secure
[21:18:03] [INFO] ✅ Validation passed
[21:18:03] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[21:18:03] [INFO] 🩺 Running health checks for models...
[21:18:03] [INFO] |-- 👀 Checking 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning' in provider named 'nvidia' for model alias 'nvidia-vision'...
[21:18:04] [INFO] |-- ✅ Passed!
[21:18:04] [INFO] ⚡ DATA_DESIGNER_ASYNC_ENGINE is enabled - using async task-queue preview
[21:18:04] [INFO] 📝 llm-text model config for column 'description'
[21:18:04] [INFO] |-- model: 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning'
[21:18:04] [INFO] |-- model alias: 'nvidia-vision'
[21:18:04] [INFO] |-- model provider: 'nvidia'
[21:18:04] [INFO] |-- inference parameters:
[21:18:04] [INFO] | |-- generation_type=chat-completion
[21:18:04] [INFO] | |-- max_parallel_requests=4
[21:18:04] [INFO] | |-- temperature=0.60
[21:18:04] [INFO] | |-- top_p=0.95
[21:18:04] [INFO] ⚡️ Async generation: 1 column(s) (description), 2 tasks across 1 row group(s)
[21:18:04] [INFO] 🚀 (1/1) Dispatching with 2 records
[21:18:04] [INFO] 🌱 (1/1) Sampling 2 records from seed dataset
[21:18:04] [INFO] |-- seed dataset size: 512 records
[21:18:04] [INFO] |-- sampling strategy: ordered
[21:18:45] [INFO] 📊 Progress [41.5s]:
[21:18:45] [INFO] |-- 🤩 description: 2/2 (100%) 0.0 rec/s
[21:18:45] [INFO] ✅ Async generation complete [41.6s]: 2 ok, 0 failed across 1 column(s)
[21:18:45] [INFO] 📊 Model usage summary:
[21:18:45] [INFO] |-- model: nvidia/nemotron-3-nano-omni-30b-a3b-reasoning
[21:18:45] [INFO] |-- tokens: input=658, output=4622, total=5280, tps=127
[21:18:45] [INFO] |-- requests: success=2, failed=0, total=2, rpm=2
[21:18:45] [INFO] 📐 Measuring dataset column statistics:
[21:18:45] [INFO] |-- 📝 column: 'description'
[21:18:45] [INFO] 🥳 Preview complete!
# Run this cell multiple times to cycle through the 2 preview records.
preview.display_sample_record()
Seed Columns ┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Name ┃ Value ┃ ┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ uuid │ 8a8ab698-5458-4f4a-ba0d-02c5a76c520a │ ├──────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ │ label │ 0 │ ├──────────────┼─────────────────────────────────────────────────────────────────────────────────────────────┤ │ base64_image │ iVBORw0KGgoAAAANSUhEUgAAAeQAAAIACAIAAADc8YinAAEAAElEQVR4nOy9V5ckuZEmamZwEREpSna1YAv28JLDHT… │ └──────────────┴─────────────────────────────────────────────────────────────────────────────────────────────┘ Generated Columns ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Name ┃ Value ┃ ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ description │ **Main Subject:** │ │ │ - A black-and-white domestic cat captured in a close‑up portrait. The user wants a detailed │ │ │ description of the image. │ │ │ - I need to describe the main subject (the cat). │ │ │ - The background. │ │ │ - Colors present. │ │ │ - Any notable details about the cat's appearance or features. │ │ │ │ │ │ **1. Main Subject:** │ │ │ - It's a cat. │ │ │ - Specifically, it looks like a tuxedo cat (black and white). │ │ │ - Only the head is visible. The top of the head is cut off slightly, but mostly the face is │ │ │ visible. Wait, looking closely at the top edge, there is some black fur near the top left │ │ │ ear, suggesting the top of the head might be slightly cut off or just out of frame, but │ │ │ mostly the face is visible. Let's look closer. Actually, the top of the head seems to be cut │ │ │ off by the top edge of the image. Wait, let me re-examine. The top edge of the image cuts │ │ │ through the top of the left ear? No, the top of the left ear is visible. The top of the head │ │ │ area is cut off. Wait, looking at the very top edge, I see the tips of the ears. So the │ │ │ whole head is likely in frame, just the top edge cuts through the top of the ears slightly │ │ │ or just above them. Let's assume the whole head is visible for now, or at least the ears are │ │ │ fully visible. Actually, looking at the very top edge, I see the tips of the ears. So the │ │ │ whole head is likely in frame. │ │ │ │ │ │ **Cat Features:** │ │ │ - Fur: Black fur on the ears and around the eyes (mask). White fur on the muzzle, nose area, │ │ │ and chest (though only the top of the chest is visible). │ │ │ - Eyes: Large, round, yellowish-green (chartreuse/greenish-yellow). Vertical pupils. Looking │ │ │ directly at the camera. │ │ │ - Nose: Small, black nose with a slight pinkish hue around the nostrils. │ │ │ - Nose leather: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Whiskers: Long, white whiskers extending outwards from the muzzle. │ │ │ │ │ │ **Facial Features:** │ │ │ - Eyes: Large, round, yellowish-green (hazel/greenish-yellow) irises. Vertical pupils are │ │ │ visible. They are looking slightly upwards and to the left (viewer's left), not directly at │ │ │ the camera lens. │ │ │ - Nose: Small, black nose leather. There is a tiny pink spot on the left side of the nose │ │ │ (viewer's left). │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Wait, let me look really closely at the nose. There is a tiny pinkish spot on the left │ │ │ side of the nose leather (viewer's left). │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Nose leather color: Black. │ │ │ - Wait, let me look at the nose again. It looks like a standard black nose, maybe a tiny │ │ │ pink spot on the left side. Let's call it a black nose with a tiny pink spot. │ │ │ │ │ │ **Ears:** │ │ │ - Pointed ears. Left ear (viewer's left) is fully visible. Right ear is also visible. They │ │ │ are pointed and upright. │ │ │ │ │ │ **Facial Features:** │ │ │ - **Eyes:** Large, round, yellowish-green (hazel/greenish-yellow). Vertical pupils are │ │ │ visible. Looking slightly upwards and to the left (viewer's left). │ │ │ - **Nose:** Small, black nose leather. There appears to be a tiny pink spot on the left side │ │ │ of the nose leather (viewer's left). │ │ │ - **Whiskers:** Long, white whiskers extending from the muzzle area. │ │ │ │ │ │ **Background:** │ │ │ - A plain, light-colored wall, likely off-white or light grey/beige. It's out of focus. │ │ │ - On the right side, there is a vertical strip of a warmer, beige/tan color, possibly a door │ │ │ frame or a piece of furniture. │ │ │ │ │ │ **Colors:** │ │ │ - Black (ears, mask around eyes, nose) │ │ │ - White (muzzle, chest fur) │ │ │ - Yellowish-green eyes │ │ │ - Pinkish nose spot │ │ │ │ │ │ **Notable Details:** │ │ │ - The cat is looking slightly upwards and to its right (viewer's left). │ │ │ - The fur texture looks short and smooth. │ │ │ - The fur on the chest (white) looks soft and fluffy. │ │ │ - The lighting is even, likely indoor artificial light. │ │ │ │ │ │ **Refining the description:** │ │ │ - The cat has a "tuxedo" pattern: black fur covering the ears and the area around the eyes │ │ │ (mask), with a white blaze running up the forehead between the eyes and down the muzzle. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur looks short and sleek on the face, fluffier on the chest. │ │ │ │ │ │ **Drafting the response:** │ │ │ - Start with the main subject description. │ │ │ - Describe the cat's features in detail (eyes, nose, fur). │ │ │ - Mention the background. │ │ │ - Mention colors. │ │ │ │ │ │ Let's refine the "Notable details" part. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur texture appears short and smooth on the face. │ │ │ - The fur on the chest is fluffy/white. │ │ │ - The nose has a tiny pink spot on the left side (viewer's left). │ │ │ │ │ │ Let's refine the description of the cat's face. │ │ │ - The fur is short and sleek on the face. │ │ │ - The white fur on the muzzle is distinct. │ │ │ - The nose leather is black. │ │ │ - The nose leather has a tiny pink spot on the left side (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - Wait, I keep seeing "nose leather" repeated. Let's just say "black nose leather with a │ │ │ tiny pink spot on the left side". │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - Wait, I see "nose leather" multiple times in my thought process because I'm scanning for │ │ │ it. Let's just describe it simply. "Small black nose with a tiny pink spot on the left │ │ │ side." │ │ │ │ │ │ **Refining the description:** │ │ │ - The cat has a "tuxedo" pattern: black fur covers the ears and surrounds the eyes, while │ │ │ the muzzle and forehead between the eyes are white. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest (visible at the bottom) is white and fluffy. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ │ │ │ **Background:** │ │ │ - A plain, light-colored wall, likely off-white or light grey. │ │ │ - To the right, a vertical strip of beige/tan color, possibly a door frame or furniture │ │ │ edge. │ │ │ │ │ │ **Colors:** │ │ │ - Black (ears, eye mask, nose) │ │ │ - White (muzzle, chest) │ │ │ - Yellowish-green (eyes) │ │ │ - Pinkish spot on nose │ │ │ - Beige/tan (right edge) │ │ │ │ │ │ **Notable Details:** │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ │ │ │ Let's refine the "notable details" to be more specific. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ │ │ │ Wait, I need to make sure I don't hallucinate. Let's look at the image again. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ │ │ │ Actually, let's just describe what is visible without over-analyzing the "details" if they │ │ │ are repetitive. │ │ │ - The cat has a "tuxedo" pattern (black mask around eyes, white muzzle). │ │ │ - The cat is looking slightly upwards and to the left. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Okay, I will stick to the visible facts. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Wait, I need to be careful not to hallucinate. Let's look at the nose again. │ │ │ - The nose leather is definitely black. │ │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ │ - The nose leather is black. │ │ │ │ │ │ **Ears:** │ │ │ - Pointed ears, upright. │ │ │ - Left ear (viewer's left) is fully visible. │ │ │ - Right ear is also visible. │ │ │ │ │ │ **Eyes:** │ │ │ - Large, round, yellowish-green (hazel/greenish-yellow). │ │ │ - Vertical pupils are visible. │ │ │ - Looking slightly upwards and to the left (viewer's left). │ │ │ │ │ │ **Nose:** │ │ │ - Small, black nose leather. │ │ │ - Tiny pink spot on the left side (viewer's left). │ │ │ │ │ │ **Whiskers:** │ │ │ - Long, white whiskers extending from the muzzle. │ │ │ │ │ │ **Fur:** │ │ │ - Short and sleek on the face. │ │ │ - Fluffy white fur on the chest (visible at the bottom). │ │ │ │ │ │ **Background:** │ │ │ - Plain, light-colored wall (off-white/light grey). │ │ │ - Vertical beige/tan strip on the right edge. │ │ │ │ │ │ **Colors:** │ │ │ - Black (ears, eye mask, nose) │ │ │ - White (muzzle, chest) │ │ │ - Yellowish-green (eyes) │ │ │ - Pinkish spot on nose │ │ │ - Beige/tan (right edge) │ │ │ │ │ │ **Notable Details:** │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ │ │ │ Wait, I need to stop repeating "the fur on the face is short and sleek". It's redundant. I │ │ │ will just describe it once or twice if necessary. │ │ │ Actually, the prompt asks for "any notable details". I should list them clearly. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Wait, I see "nose leather" repeated 4 times in my thought trace. Let me look at the image │ │ │ very carefully. │ │ │ - The nose leather is black. │ │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Okay, I will just say "black nose leather with a tiny pink spot on the left side (viewer's │ │ │ left)". That covers it. │ │ │ │ │ │ Let's refine the "nose leather" part. It looks like the nose leather is black, and there is │ │ │ a tiny pink spot on the left side. Or maybe it's just the lighting? No, it looks like a │ │ │ distinct pink spot. Let's assume it's a pink spot. │ │ │ │ │ │ Let's re-evaluate the "nose leather" repetitions. I might be misinterpreting the image or │ │ │ just getting stuck in a loop. Let's look at the nose area again. │ │ │ - The nose leather is black. │ │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Okay, I will just describe the nose once. "A small black nose with a tiny pink spot on the │ │ │ left side (viewer's left)." │ │ │ │ │ │ **Refined Plan:** │ │ │ 1. **Main Subject:** Describe the cat (tuxedo pattern, face visible). │ │ │ 2. **Features:** Eyes (color, direction), Nose (color, pink spot), Whiskers. │ │ │ 3. **Background:** Plain wall, beige strip on right. │ │ │ 4. **Colors:** List them. │ │ │ 5. **Notable Details:** List specific observations like gaze direction, fur texture, nose │ │ │ spot. │ │ │ │ │ │ Let's write the final response. │ │ │ │ │ │ **Structure:** │ │ │ - **Main Subject:** Describe the cat (breed/pattern, position). │ │ │ - **Background:** Describe the wall and the beige strip. │ │ │ - **Colors:** List the colors present. │ │ │ - **Notable Details:** List specific features like gaze direction, fur texture, nose spot. │ │ │ │ │ │ Let's double check the gaze direction. │ │ │ - The pupils are centered in the eye, but the head is tilted slightly up and to the left. │ │ │ The pupils are looking slightly upwards and to the left (viewer's left). │ │ │ - Yes, the pupils are looking slightly upwards and to the left (viewer's left). │ │ │ │ │ │ **Refined Description:** │ │ │ The image features a close-up of a black-and-white cat, likely a tuxedo cat, with a white │ │ │ muzzle and a white blaze running up its forehead between its eyes. The cat has large, round, │ │ │ yellowish-green eyes with vertical pupils, which are looking slightly upwards and to the │ │ │ left (viewer's left). The cat has long white whiskers extending from its muzzle. Its fur is │ │ │ short and sleek on the face, with a white muzzle and chest area. The nose is small and │ │ │ black, with a tiny pink spot visible on the left side (viewer's left) of the nose leather. │ │ │ The ears are pointed and upright. │ │ │ │ │ │ **Background:** │ │ │ - A plain, light-colored wall, likely off-white or light grey, which is out of focus. │ │ │ - On the right side of the image, there is a vertical strip of a warm, beige or tan color, │ │ │ possibly a door frame or piece of furniture. │ │ │ │ │ │ **Colors:** │ │ │ - Black (ears, eye mask, nose) │ │ │ - White (muzzle, chest fur) │ │ │ - Yellowish-green (eyes) │ │ │ - Pinkish spot on nose │ │ │ - Beige/tan (right edge) │ │ │ │ │ │ **Notable Details:** │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the face is short and sleek. │ │ │ │ │ │ Wait, I keep seeing "the fur on the face is short and sleek" repeated. I will just include │ │ │ it once or twice if it adds value, but since I'm listing "notable details", I should be │ │ │ concise. I'll just mention the fur texture once. │ │ │ │ │ │ Let's do this: │ │ │ - The cat has a "tuxedo" pattern with black fur on the ears and around the eyes, and white │ │ │ fur on the muzzle and forehead. │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest is fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ - The nose leather is black. │ │ │ │ │ │ Okay, I will remove the repetitive "nose leather" lines. I'll just say "black nose leather". │ │ │ │ │ │ Final check of the image. │ │ │ - Is the top of the head cut off? Yes, slightly. The top of the left ear is visible, but the │ │ │ very top of the head fur is cut off by the top edge of the image. │ │ │ - Wait, looking really closely at the top left corner... no, the ear is fully visible. The │ │ │ top edge of the image cuts through the top of the left ear? No, the tip is visible. The top │ │ │ edge of the image is just above the top of the left ear. Wait, looking at the very top edge, │ │ │ I see the tips of the ears. So the whole head is likely in frame. │ │ │ - Actually, looking at the very top edge, I see the tips of the ears. So the whole head is │ │ │ likely in frame. │ │ │ │ │ │ Let's refine the "top of head" part. The top of the head fur is visible. The top edge of the │ │ │ image cuts through the top of the left ear? No, the tip is visible. The top edge is just │ │ │ above the top of the left ear. Wait, looking at the very top edge, I see the tips of the │ │ │ ears. So the whole head is likely in frame. │ │ │ │ │ │ Actually, looking at the very top edge, I see the tips of the ears. So the whole head is │ │ │ likely in frame. │ │ │ │ │ │ Let's just say "The cat's head is visible, with the top of the head slightly cut off by the │ │ │ top edge of the image." No, that's confusing. Let's look again. │ │ │ - Top left corner: I see the tip of the left ear. │ │ │ - Top right corner: I see the tip of the right ear. │ │ │ - So the whole head is in frame. │ │ │ │ │ │ Okay, let's proceed. │ │ │ │ │ │ **Final Plan:** │ │ │ 1. **Main Subject:** Describe the cat (tuxedo pattern, face visible, ears upright). │ │ │ 2. **Features:** Eyes (yellow-green, looking up-left), Nose (black with pink spot), │ │ │ Whiskers (long, white). │ │ │ 3. **Background:** Plain wall, beige strip on right. │ │ │ 4. **Colors:** Black, white, yellow-green, pink, beige. │ │ │ 5. **Details:** Looking up-left, short sleek fur on face, fluffy white chest fur. │ │ │ │ │ │ This seems solid. I will formulate the response now. │ │ │ │ │ │ The image features a close-up portrait of a cat, primarily focusing on its face and upper │ │ │ chest. │ │ │ │ │ │ **Main Subject:** │ │ │ - The subject is a cat with a "tuxedo" color pattern: black fur covers the ears and forms a │ │ │ mask around the eyes, while the muzzle, forehead between the eyes, and chest are white. │ │ │ - The cat's ears are pointed and upright. │ │ │ - The cat has large, round eyes that are a yellowish-green (hazel) color with vertical │ │ │ pupils. The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - It has long, prominent white whiskers extending from its muzzle. │ │ │ │ │ │ **Background:** │ │ │ - The background consists of a plain, out-of-focus wall that appears to be off-white or │ │ │ light grey. │ │ │ - On the far right edge of the image, there is a vertical strip of a warm, beige or tan │ │ │ color, which could be a door frame or a piece of furniture. │ │ │ │ │ │ **Colors:** │ │ │ - **Black:** Visible on the ears, the fur surrounding the eyes (mask), and the nose leather. │ │ │ - **White:** Covers the muzzle, the blaze on the forehead, and the fur on the chest. │ │ │ - **Yellowish-Green:** The color of the cat's eyes. │ │ │ - **Pink:** A tiny spot is visible on the left side of the nose (viewer's left). │ │ │ - **Beige/Tan:** Visible on the right edge of the frame. │ │ │ │ │ │ **Notable Details:** │ │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ │ - The fur on the face is short and sleek. │ │ │ - The fur on the chest (visible at the bottom) appears fluffy and white. │ │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ - The lighting is even, highlighting the texture of the fur and the sharpness of the eyes. │ └─────────────┴──────────────────────────────────────────────────────────────────────────────────────────────┘
# The preview dataset is available as a pandas DataFrame.
preview.dataset
| uuid | label | base64_image | description | |
|---|---|---|---|---|
| 0 | 8a8ab698-5458-4f4a-ba0d-02c5a76c520a | 0 | iVBORw0KGgoAAAANSUhEUgAAAeQAAAIACAIAAADc8YinAA... | **Main Subject:** \n- A black-and-white domes... |
| 1 | 64e52508-8342-40ab-8ab7-3198d7afe164 | 0 | iVBORw0KGgoAAAANSUhEUgAAAiQAAAIACAIAAAA9rOAHAA... |
📊 Analyze the generated data¶
Data Designer automatically generates a basic statistical analysis of the generated data.
This analysis is available via the
analysisproperty of generation result objects.
# Print the analysis as a table.
preview.analysis.to_report()
──────────────────────────────────────── 🎨 Data Designer Dataset Profile ───────────────────────────────────────── Dataset Overview ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ number of records ┃ number of columns ┃ percent complete records ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ 2 │ 1 │ 100.0% │ └─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────────────────┘ 📝 LLM-Text Columns ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ ┃ prompt tokens ┃ completion tokens ┃ ┃ column name ┃ data type ┃ number unique values ┃ per record ┃ per record ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ description │ string │ 2 (100.0%) │ 29.0 +/- 0.0 │ 2229.5 +/- 3153.0 │ └──────────────────┴───────────────┴──────────────────────────────┴─────────────────────┴─────────────────────────┘ ╭────────────────────────────────────────────────── Table Notes ──────────────────────────────────────────────────╮ │ │ │ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. │ │ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
🔎 Visual Inspection¶
Let's compare the original image with the generated description to validate quality:
# Compare original image with generated description
index = 0 # Change this to view different examples
# Merge preview data with original images for comparison
comparison_dataset = preview.dataset.merge(pd.DataFrame(img_dataset)[["uuid", "image"]], how="left", on="uuid")
# Extract the record for display
record = comparison_dataset.iloc[index]
print("📄 Original Image:")
display(resize_image(record.image, BASE64_IMAGE_HEIGHT))
print("\n📝 Generated Description:")
rich.print(Panel(record.description, title="Image Description", title_align="left"))
📄 Original Image:
📝 Generated Description:
╭─ Image Description ─────────────────────────────────────────────────────────────────────────────────────────────╮ │ **Main Subject:** │ │ - A black-and-white domestic cat captured in a close‑up portrait. The user wants a detailed description of the │ │ image. │ │ - I need to describe the main subject (the cat). │ │ - The background. │ │ - Colors present. │ │ - Any notable details about the cat's appearance or features. │ │ │ │ **1. Main Subject:** │ │ - It's a cat. │ │ - Specifically, it looks like a tuxedo cat (black and white). │ │ - Only the head is visible. The top of the head is cut off slightly, but mostly the face is visible. Wait, │ │ looking closely at the top edge, there is some black fur near the top left ear, suggesting the top of the head │ │ might be slightly cut off or just out of frame, but mostly the face is visible. Let's look closer. Actually, │ │ the top of the head seems to be cut off by the top edge of the image. Wait, let me re-examine. The top edge of │ │ the image cuts through the top of the left ear? No, the top of the left ear is visible. The top of the head │ │ area is cut off. Wait, looking at the very top edge, I see the tips of the ears. So the whole head is likely in │ │ frame, just the top edge cuts through the top of the ears slightly or just above them. Let's assume the whole │ │ head is visible for now, or at least the ears are fully visible. Actually, looking at the very top edge, I see │ │ the tips of the ears. So the whole head is likely in frame. │ │ │ │ **Cat Features:** │ │ - Fur: Black fur on the ears and around the eyes (mask). White fur on the muzzle, nose area, and chest (though │ │ only the top of the chest is visible). │ │ - Eyes: Large, round, yellowish-green (chartreuse/greenish-yellow). Vertical pupils. Looking directly at the │ │ camera. │ │ - Nose: Small, black nose with a slight pinkish hue around the nostrils. │ │ - Nose leather: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Whiskers: Long, white whiskers extending outwards from the muzzle. │ │ │ │ **Facial Features:** │ │ - Eyes: Large, round, yellowish-green (hazel/greenish-yellow) irises. Vertical pupils are visible. They are │ │ looking slightly upwards and to the left (viewer's left), not directly at the camera lens. │ │ - Nose: Small, black nose leather. There is a tiny pink spot on the left side of the nose (viewer's left). │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Wait, let me look really closely at the nose. There is a tiny pinkish spot on the left side of the nose │ │ leather (viewer's left). │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Nose leather color: Black. │ │ - Wait, let me look at the nose again. It looks like a standard black nose, maybe a tiny pink spot on the left │ │ side. Let's call it a black nose with a tiny pink spot. │ │ │ │ **Ears:** │ │ - Pointed ears. Left ear (viewer's left) is fully visible. Right ear is also visible. They are pointed and │ │ upright. │ │ │ │ **Facial Features:** │ │ - **Eyes:** Large, round, yellowish-green (hazel/greenish-yellow). Vertical pupils are visible. Looking │ │ slightly upwards and to the left (viewer's left). │ │ - **Nose:** Small, black nose leather. There appears to be a tiny pink spot on the left side of the nose │ │ leather (viewer's left). │ │ - **Whiskers:** Long, white whiskers extending from the muzzle area. │ │ │ │ **Background:** │ │ - A plain, light-colored wall, likely off-white or light grey/beige. It's out of focus. │ │ - On the right side, there is a vertical strip of a warmer, beige/tan color, possibly a door frame or a piece │ │ of furniture. │ │ │ │ **Colors:** │ │ - Black (ears, mask around eyes, nose) │ │ - White (muzzle, chest fur) │ │ - Yellowish-green eyes │ │ - Pinkish nose spot │ │ │ │ **Notable Details:** │ │ - The cat is looking slightly upwards and to its right (viewer's left). │ │ - The fur texture looks short and smooth. │ │ - The fur on the chest (white) looks soft and fluffy. │ │ - The lighting is even, likely indoor artificial light. │ │ │ │ **Refining the description:** │ │ - The cat has a "tuxedo" pattern: black fur covering the ears and the area around the eyes (mask), with a white │ │ blaze running up the forehead between the eyes and down the muzzle. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur looks short and sleek on the face, fluffier on the chest. │ │ │ │ **Drafting the response:** │ │ - Start with the main subject description. │ │ - Describe the cat's features in detail (eyes, nose, fur). │ │ - Mention the background. │ │ - Mention colors. │ │ │ │ Let's refine the "Notable details" part. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur texture appears short and smooth on the face. │ │ - The fur on the chest is fluffy/white. │ │ - The nose has a tiny pink spot on the left side (viewer's left). │ │ │ │ Let's refine the description of the cat's face. │ │ - The fur is short and sleek on the face. │ │ - The white fur on the muzzle is distinct. │ │ - The nose leather is black. │ │ - The nose leather has a tiny pink spot on the left side (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - Wait, I keep seeing "nose leather" repeated. Let's just say "black nose leather with a tiny pink spot on the │ │ left side". │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - Wait, I see "nose leather" multiple times in my thought process because I'm scanning for it. Let's just │ │ describe it simply. "Small black nose with a tiny pink spot on the left side." │ │ │ │ **Refining the description:** │ │ - The cat has a "tuxedo" pattern: black fur covers the ears and surrounds the eyes, while the muzzle and │ │ forehead between the eyes are white. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest (visible at the bottom) is white and fluffy. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ │ │ **Background:** │ │ - A plain, light-colored wall, likely off-white or light grey. │ │ - To the right, a vertical strip of beige/tan color, possibly a door frame or furniture edge. │ │ │ │ **Colors:** │ │ - Black (ears, eye mask, nose) │ │ - White (muzzle, chest) │ │ - Yellowish-green (eyes) │ │ - Pinkish spot on nose │ │ - Beige/tan (right edge) │ │ │ │ **Notable Details:** │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ │ │ Let's refine the "notable details" to be more specific. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ │ │ Wait, I need to make sure I don't hallucinate. Let's look at the image again. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ │ │ Actually, let's just describe what is visible without over-analyzing the "details" if they are repetitive. │ │ - The cat has a "tuxedo" pattern (black mask around eyes, white muzzle). │ │ - The cat is looking slightly upwards and to the left. │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Okay, I will stick to the visible facts. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Wait, I need to be careful not to hallucinate. Let's look at the nose again. │ │ - The nose leather is definitely black. │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ - The nose leather is black. │ │ │ │ **Ears:** │ │ - Pointed ears, upright. │ │ - Left ear (viewer's left) is fully visible. │ │ - Right ear is also visible. │ │ │ │ **Eyes:** │ │ - Large, round, yellowish-green (hazel/greenish-yellow). │ │ - Vertical pupils are visible. │ │ - Looking slightly upwards and to the left (viewer's left). │ │ │ │ **Nose:** │ │ - Small, black nose leather. │ │ - Tiny pink spot on the left side (viewer's left). │ │ │ │ **Whiskers:** │ │ - Long, white whiskers extending from the muzzle. │ │ │ │ **Fur:** │ │ - Short and sleek on the face. │ │ - Fluffy white fur on the chest (visible at the bottom). │ │ │ │ **Background:** │ │ - Plain, light-colored wall (off-white/light grey). │ │ - Vertical beige/tan strip on the right edge. │ │ │ │ **Colors:** │ │ - Black (ears, eye mask, nose) │ │ - White (muzzle, chest) │ │ - Yellowish-green (eyes) │ │ - Pinkish spot on nose │ │ - Beige/tan (right edge) │ │ │ │ **Notable Details:** │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ │ │ Wait, I need to stop repeating "the fur on the face is short and sleek". It's redundant. I will just describe │ │ it once or twice if necessary. │ │ Actually, the prompt asks for "any notable details". I should list them clearly. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Wait, I see "nose leather" repeated 4 times in my thought trace. Let me look at the image very carefully. │ │ - The nose leather is black. │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Okay, I will just say "black nose leather with a tiny pink spot on the left side (viewer's left)". That covers │ │ it. │ │ │ │ Let's refine the "nose leather" part. It looks like the nose leather is black, and there is a tiny pink spot on │ │ the left side. Or maybe it's just the lighting? No, it looks like a distinct pink spot. Let's assume it's a │ │ pink spot. │ │ │ │ Let's re-evaluate the "nose leather" repetitions. I might be misinterpreting the image or just getting stuck in │ │ a loop. Let's look at the nose area again. │ │ - The nose leather is black. │ │ - There is a tiny pink spot on the left side of the nose (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Okay, I will just describe the nose once. "A small black nose with a tiny pink spot on the left side (viewer's │ │ left)." │ │ │ │ **Refined Plan:** │ │ 1. **Main Subject:** Describe the cat (tuxedo pattern, face visible). │ │ 2. **Features:** Eyes (color, direction), Nose (color, pink spot), Whiskers. │ │ 3. **Background:** Plain wall, beige strip on right. │ │ 4. **Colors:** List them. │ │ 5. **Notable Details:** List specific observations like gaze direction, fur texture, nose spot. │ │ │ │ Let's write the final response. │ │ │ │ **Structure:** │ │ - **Main Subject:** Describe the cat (breed/pattern, position). │ │ - **Background:** Describe the wall and the beige strip. │ │ - **Colors:** List the colors present. │ │ - **Notable Details:** List specific features like gaze direction, fur texture, nose spot. │ │ │ │ Let's double check the gaze direction. │ │ - The pupils are centered in the eye, but the head is tilted slightly up and to the left. The pupils are │ │ looking slightly upwards and to the left (viewer's left). │ │ - Yes, the pupils are looking slightly upwards and to the left (viewer's left). │ │ │ │ **Refined Description:** │ │ The image features a close-up of a black-and-white cat, likely a tuxedo cat, with a white muzzle and a white │ │ blaze running up its forehead between its eyes. The cat has large, round, yellowish-green eyes with vertical │ │ pupils, which are looking slightly upwards and to the left (viewer's left). The cat has long white whiskers │ │ extending from its muzzle. Its fur is short and sleek on the face, with a white muzzle and chest area. The nose │ │ is small and black, with a tiny pink spot visible on the left side (viewer's left) of the nose leather. The │ │ ears are pointed and upright. │ │ │ │ **Background:** │ │ - A plain, light-colored wall, likely off-white or light grey, which is out of focus. │ │ - On the right side of the image, there is a vertical strip of a warm, beige or tan color, possibly a door │ │ frame or piece of furniture. │ │ │ │ **Colors:** │ │ - Black (ears, eye mask, nose) │ │ - White (muzzle, chest fur) │ │ - Yellowish-green (eyes) │ │ - Pinkish spot on nose │ │ - Beige/tan (right edge) │ │ │ │ **Notable Details:** │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ - The fur on the face is short and sleek. │ │ │ │ Wait, I keep seeing "the fur on the face is short and sleek" repeated. I will just include it once or twice if │ │ it adds value, but since I'm listing "notable details", I should be concise. I'll just mention the fur texture │ │ once. │ │ │ │ Let's do this: │ │ - The cat has a "tuxedo" pattern with black fur on the ears and around the eyes, and white fur on the muzzle │ │ and forehead. │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest is fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ - The nose leather is black. │ │ │ │ Okay, I will remove the repetitive "nose leather" lines. I'll just say "black nose leather". │ │ │ │ Final check of the image. │ │ - Is the top of the head cut off? Yes, slightly. The top of the left ear is visible, but the very top of the │ │ head fur is cut off by the top edge of the image. │ │ - Wait, looking really closely at the top left corner... no, the ear is fully visible. The top edge of the │ │ image cuts through the top of the left ear? No, the tip is visible. The top edge of the image is just above the │ │ top of the left ear. Wait, looking at the very top edge, I see the tips of the ears. So the whole head is │ │ likely in frame. │ │ - Actually, looking at the very top edge, I see the tips of the ears. So the whole head is likely in frame. │ │ │ │ Let's refine the "top of head" part. The top of the head fur is visible. The top edge of the image cuts through │ │ the top of the left ear? No, the tip is visible. The top edge is just above the top of the left ear. Wait, │ │ looking at the very top edge, I see the tips of the ears. So the whole head is likely in frame. │ │ │ │ Actually, looking at the very top edge, I see the tips of the ears. So the whole head is likely in frame. │ │ │ │ Let's just say "The cat's head is visible, with the top of the head slightly cut off by the top edge of the │ │ image." No, that's confusing. Let's look again. │ │ - Top left corner: I see the tip of the left ear. │ │ - Top right corner: I see the tip of the right ear. │ │ - So the whole head is in frame. │ │ │ │ Okay, let's proceed. │ │ │ │ **Final Plan:** │ │ 1. **Main Subject:** Describe the cat (tuxedo pattern, face visible, ears upright). │ │ 2. **Features:** Eyes (yellow-green, looking up-left), Nose (black with pink spot), Whiskers (long, white). │ │ 3. **Background:** Plain wall, beige strip on right. │ │ 4. **Colors:** Black, white, yellow-green, pink, beige. │ │ 5. **Details:** Looking up-left, short sleek fur on face, fluffy white chest fur. │ │ │ │ This seems solid. I will formulate the response now. │ │ │ │ The image features a close-up portrait of a cat, primarily focusing on its face and upper chest. │ │ │ │ **Main Subject:** │ │ - The subject is a cat with a "tuxedo" color pattern: black fur covers the ears and forms a mask around the │ │ eyes, while the muzzle, forehead between the eyes, and chest are white. │ │ - The cat's ears are pointed and upright. │ │ - The cat has large, round eyes that are a yellowish-green (hazel) color with vertical pupils. The cat is │ │ looking slightly upwards and to the left (viewer's left). │ │ - It has long, prominent white whiskers extending from its muzzle. │ │ │ │ **Background:** │ │ - The background consists of a plain, out-of-focus wall that appears to be off-white or light grey. │ │ - On the far right edge of the image, there is a vertical strip of a warm, beige or tan color, which could be a │ │ door frame or a piece of furniture. │ │ │ │ **Colors:** │ │ - **Black:** Visible on the ears, the fur surrounding the eyes (mask), and the nose leather. │ │ - **White:** Covers the muzzle, the blaze on the forehead, and the fur on the chest. │ │ - **Yellowish-Green:** The color of the cat's eyes. │ │ - **Pink:** A tiny spot is visible on the left side of the nose (viewer's left). │ │ - **Beige/Tan:** Visible on the right edge of the frame. │ │ │ │ **Notable Details:** │ │ - The cat is looking slightly upwards and to the left (viewer's left). │ │ - The fur on the face is short and sleek. │ │ - The fur on the chest (visible at the bottom) appears fluffy and white. │ │ - The nose leather is black with a tiny pink spot on the left side (viewer's left). │ │ - The lighting is even, highlighting the texture of the fur and the sharpness of the eyes. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
🆙 Scale up!¶
Happy with your preview data?
Use the
createmethod to submit larger Data Designer generation jobs.
results = data_designer.create(config_builder, num_records=10, dataset_name="tutorial-4")
[21:18:45] [INFO] 🎨 Creating Data Designer dataset
[21:18:45] [INFO] |-- 🔒 Jinja rendering engine: secure
[21:18:45] [INFO] ✅ Validation passed
[21:18:45] [INFO] ⛓️ Sorting column configs into a Directed Acyclic Graph
[21:18:45] [INFO] 🩺 Running health checks for models...
[21:18:45] [INFO] |-- 👀 Checking 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning' in provider named 'nvidia' for model alias 'nvidia-vision'...
[21:19:56] [INFO] |-- ✅ Passed!
[21:19:56] [INFO] ⚡ DATA_DESIGNER_ASYNC_ENGINE is enabled - using async task-queue builder
[21:19:56] [INFO] 📝 llm-text model config for column 'description'
[21:19:56] [INFO] |-- model: 'nvidia/nemotron-3-nano-omni-30b-a3b-reasoning'
[21:19:56] [INFO] |-- model alias: 'nvidia-vision'
[21:19:56] [INFO] |-- model provider: 'nvidia'
[21:19:56] [INFO] |-- inference parameters:
[21:19:56] [INFO] | |-- generation_type=chat-completion
[21:19:56] [INFO] | |-- max_parallel_requests=4
[21:19:56] [INFO] | |-- temperature=0.60
[21:19:56] [INFO] | |-- top_p=0.95
[21:19:56] [INFO] ⚡️ Async generation: 1 column(s) (description), 10 tasks across 1 row group(s)
[21:19:56] [INFO] 🚀 (1/1) Dispatching with 10 records
[21:19:56] [INFO] 🌱 (1/1) Sampling 10 records from seed dataset
[21:19:56] [INFO] |-- seed dataset size: 512 records
[21:19:56] [INFO] |-- sampling strategy: ordered
[21:20:01] [INFO] 📊 Progress [5.1s]:
[21:20:01] [INFO] |-- 🌧️ description: 1/10 (10%) 0.2 rec/s
[21:20:07] [INFO] 📊 Progress [10.9s]:
[21:20:07] [INFO] |-- 🌦️ description: 4/10 (40%) 0.4 rec/s
[21:20:13] [INFO] 📊 Progress [17.3s]:
[21:20:13] [INFO] |-- ⛅ description: 7/10 (70%) 0.4 rec/s
[21:20:18] [INFO] 📊 Progress [22.6s]:
[21:20:18] [INFO] |-- 🌤️ description: 9/10 (90%) 0.4 rec/s
[21:20:27] [INFO] 📊 Progress [30.9s]:
[21:20:27] [INFO] |-- ☀️ description: 10/10 (100%) 0.3 rec/s
[21:20:27] [INFO] ✅ Async generation complete [30.9s]: 10 ok, 0 failed across 1 column(s)
[21:20:27] [INFO] 📊 Model usage summary:
[21:20:27] [INFO] |-- model: nvidia/nemotron-3-nano-omni-30b-a3b-reasoning
[21:20:27] [INFO] |-- tokens: input=3720, output=8140, total=11860, tps=381
[21:20:27] [INFO] |-- requests: success=10, failed=0, total=10, rpm=19
[21:20:27] [INFO] 📐 Measuring dataset column statistics:
[21:20:27] [INFO] |-- 📝 column: 'description'
# Load the generated dataset as a pandas DataFrame.
dataset = results.load_dataset()
dataset.head()
| uuid | label | base64_image | description | |
|---|---|---|---|---|
| 0 | 8a8ab698-5458-4f4a-ba0d-02c5a76c520a | 0 | iVBORw0KGgoAAAANSUhEUgAAAeQAAAIACAIAAADc8YinAA... | # Close-up Portrait of a Black and White Cat ... |
| 1 | 64e52508-8342-40ab-8ab7-3198d7afe164 | 0 | iVBORw0KGgoAAAANSUhEUgAAAiQAAAIACAIAAAA9rOAHAA... | # Fluffy Tabby and White Cat in a Box **Main ... |
| 2 | 7822ce68-6989-475a-93a2-f806609bd8bb | 0 | iVBORw0KGgoAAAANSUhEUgAAAqoAAAIACAIAAADFYNm1AA... | **Main Subject:** The image features a domes... |
| 3 | 48813cc6-72d3-4b9d-a711-4b6198002cfb | 0 | iVBORw0KGgoAAAANSUhEUgAAAwAAAAIACAIAAAC6lJxtAA... | |
| 4 | 9f13fb28-4fb3-46c5-8b1c-5d3a67ad1e25 | 0 | iVBORw0KGgoAAAANSUhEUgAAAqoAAAIACAIAAADFYNm1AA... |
# Load the analysis results into memory.
analysis = results.load_analysis()
analysis.to_report()
──────────────────────────────────────── 🎨 Data Designer Dataset Profile ───────────────────────────────────────── Dataset Overview ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ number of records ┃ number of columns ┃ percent complete records ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ 10 │ 1 │ 100.0% │ └─────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────────────────┘ 📝 LLM-Text Columns ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ ┃ ┃ ┃ prompt tokens ┃ completion tokens ┃ ┃ column name ┃ data type ┃ number unique values ┃ per record ┃ per record ┃ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ description │ string │ 9 (90.0%) │ 29.0 +/- 0.0 │ 274.5 +/- 123.6 │ └──────────────────┴───────────────┴──────────────────────────────┴─────────────────────┴─────────────────────────┘ ╭────────────────────────────────────────────────── Table Notes ──────────────────────────────────────────────────╮ │ │ │ 1. All token statistics are based on a sample of max(1000, len(dataset)) records. │ │ 2. Tokens are calculated using tiktoken's cl100k_base tokenizer. │ │ │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
⏭️ Next Steps¶
Now that you've learned how to use visual context for image summarization in Data Designer, explore more:
Experiment with different vision models for specific image types
Try different prompt variations to generate specialized descriptions (e.g., technical details, key findings)
Combine vision-based descriptions with other column types for multi-modal workflows
Apply this pattern to other vision tasks like image captioning, OCR validation, or visual question answering
Generating images with Data Designer