Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
The size of the content of the first rows (15966639 B) exceeds the maximum supported size (200000 B) even after truncation. Please report the issue.
Error code:   TooBigContentError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

CC12M multi-caption Webshart indexes

Metadata-only indexes for the 10,994,853 available images in laion/conceptual-captions-12m-webdataset, across 1,100 tar shards. The images remain in that source dataset; this repository does not duplicate or rewrite the image archives. Original member offsets, lengths, sidecar references, and image geometry are preserved.

These per-shard Webshart indexes are based on webshart/conceptual-captions-12m-webdataset-metadata. The 1,100 JSON files under data/ mirror the source tar layout. Every tar member's byte offset and length enables indexed range reads without downloading whole shards; image width, height, and aspect support aspect bucketing.

As documented in the original card, its captions were embedded for all 10,994,853 samples in August 2026, coalescing the source .txt sidecars with webshart optimize-captions. This combined index preserves that text unchanged as alt_text and adds four generated outputs. Reading the named caption fields directly from the index avoids per-sample .txt range reads: the text arrives with the metadata.

Caption fields

Each image entry in data/<shard>.json contains these explicitly named fields:

Field Value Caption run / origin
alt_text String, preserved without trimming or rewriting Original CC12M text, coalesced from the source .txt sidecar into the original Webshart metadata
short_caption String Short-description run: concise caption of the main visible subject, action, and setting
draft_long_caption String Long-description run: initial detailed draft, before refinement
long_caption String Long-description run: refined final description
json_label Native JSON object, not a JSON-encoded string Structured-caption run using the Ideogram4 JSON schema, decoded losslessly

Model provenance: all four generated outputs were produced by nvidia/Cosmos-Reason2-2B. Caption fields are named by their style and processing stage. alt_text is source web text, not a model-generated caption.

The long-run draft and final text are separate stored stages; neither is reconstructed from the other. Structured labels follow the audited schema in state/caption-schema.json, including normalized integer bounding boxes on a 0–1000 scale in [ymin, xmin, ymax, xmax] order.

Loading a caption set

Install Webshart and authenticate with Hugging Face if this repository is private. The combined indexes are in webshart/cc12m-structured-captions:

import webshart

index_repo = "webshart/cc12m-structured-captions"
dataset = webshart.discover_dataset(
    source="laion/conceptual-captions-12m-webdataset",
    metadata=index_repo,
    hf_token=None,  # Set HF_TOKEN for access to this private repository.
)
dataset.enable_metadata_cache(location="cache/cc12m-structured/metadata")
dataset.enable_shard_cache(
    location="cache/cc12m-structured/shards",
    cache_limit_gb=25,
    parallel_downloads=4,
)
loader = webshart.TarDataLoader(dataset, load_file_data=False)

# Read captions without loading image bytes.
metadata = loader.get_metadata(0)["00000001.jpg"]
caption = metadata["short_caption"]
draft = metadata["draft_long_caption"]
long_caption = metadata["long_caption"]
original_text = metadata["alt_text"]
label = metadata["json_label"]
assert isinstance(label, dict)

# Aspect bucketing for training pipelines, without scanning image bytes:
buckets = loader.list_shard_sample_aspect_buckets(
    [0], key="aspect", target_pixel_area=1024 * 1024,
    target_resolution_multiple=64,
)

To read images as well as their indexed captions:

image_loader = webshart.TarDataLoader(dataset, load_file_data=True)
entry = image_loader.load_sample(0, 0)
print(entry.metadata["short_caption"])
image_bytes = entry.data

Select a named field explicitly: this index does not introduce a caption or captions default. Convenience accessors such as entry.caption may still read the unchanged original .txt sidecar.

Usage with SimpleTuner

The original card's multidatabackend.json configuration is retained below with the combined metadata repository and an explicit webshart.caption_key selector. It streams the source images with cached VAE latents and indexed captions:

[
  {
    "id": "cc12m-structured-1024",
    "type": "webshart",
    "dataset_type": "image",
    "source": "laion/conceptual-captions-12m-webdataset",
    "metadata": "webshart/cc12m-structured-captions",
    "caption_strategy": "webshart",
    "metadata_backend": "webshart",
    "crop": true,
    "crop_style": "random",
    "crop_aspect": "square",
    "minimum_image_size": 512,
    "maximum_image_size": 1024,
    "target_downsample_size": 1024,
    "resolution": 1024,
    "resolution_type": "pixel_area",
    "cache_dir_vae": "cache/vae/cc12m-structured",
    "webshart": {
      "cache_dir": "cache/webshart/cc12m-structured",
      "shard_cache_gb": 25,
      "parallel_downloads": 4,
      "caption_key": "short_caption"
    }
  },
  {
    "id": "alt-embed-cache",
    "dataset_type": "text_embeds",
    "default": true,
    "type": "local",
    "cache_dir": "cache/text"
  }
]

Set webshart.caption_key to alt_text, draft_long_caption, long_caption, or json_label to select another set. A list such as ["short_caption", "long_caption"] selects caption alternatives rather than concatenating them. Use a SimpleTuner build supporting webshart.caption_key; for json_label, use a build with native JSON caption support. Structured objects remain intact in metadata and are serialized as one JSON text prompt for the text encoder, not split into per-field caption alternatives.

Add "max_num_samples": 65536 to the image backend to train on a fixed-size subset. See SimpleTuner's documentation/DATALOADER.md, “Webshart Datasets” for the full option reference, including webshart_optimize_captions. That coalescing option is useful for datasets whose captions still live in sidecars, but is not needed to populate this index's five already-embedded fields. Caption selection in some SimpleTuner builds also consults JSON sidecars when json_metadata is not embedded; this is separate from fetching the caption text from .txt files.

Regenerating the original caption metadata

The original caption embedding was produced with Webshart >= 0.5.2. To reproduce that base metadata locally:

webshart optimize-captions \
  --source laion/conceptual-captions-12m-webdataset \
  --metadata webshart/conceptual-captions-12m-webdataset-metadata \
  --destination caption-metadata \
  --shard-cache-dir cache/shards

The source card also documents publication with --push-to-hub and --path-in-repo data. If publishing a regenerated base index, use a separate destination repository, for example append --push-to-hub YOUR_ORG/cc12m-base-metadata --path-in-repo data. Do not use that command to replace this combined repository: it reproduces the original sidecar-text embedding, not the model-generated caption sets. Reconstructing this multi-caption index additionally requires the three pinned caption-run snapshots recorded in the manifest and the identity-checked merge described here.

Provenance and verification

state/manifest.json records the exact input repository commits, pinned Lance snapshot versions, original metadata revision, schema hashes, and per-shard input/output SHA-256 hashes.

The original metadata revision is 6bc65c1b99ee707d7957304b52d1546dd5ac703f. The generated captions come from the short-description, two-stage long-description, and structured JSON runs described above. Their exact input revisions and snapshot versions are recorded in the manifest.

The merge joins on (shard, item_index) and verifies member filename, sample key, image dimensions, and original source text across all three runs. It does not join on row order or chunk IDs: those differ between runs. Every source image must appear exactly once and have every generated caption field. Output JSON is read back and compared to the joined values before the build is certified.

Completeness and schema checks do not establish caption factuality. Generated text can contain speculation, incorrect identities, transcription errors, or miscounts. The original text can contain noisy web content and anonymized placeholders. Bounding boxes and color descriptions are model predictions, not manually validated annotations.

The source dataset's image/text rights, licensing, and usage restrictions still apply. This metadata-only combination does not grant new rights to the images.

Downloads last month
21