Dataset Viewer
Auto-converted to Parquet Duplicate
image
stringclasses
1 value
metadata
stringclasses
1 value
caption
stringclasses
1 value
quality
stringclasses
1 value
images\cyberpunk\cyberpunk_city.png
metadata\cyberpunk_city.json
Mock long detailed caption explaining composition of cyberpunk_city.png.
{"aesthetic_score":7.08,"clip_score":0.3823627849,"blur_score":0.0,"width":1024,"height":1024}

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

ramanv-image-foundation

A production-grade, highly-scalable dataset engineering platform designed for training and fine-tuning text-to-image models (e.g., FLUX, SDXL, and image editing models).

The repository is built to process datasets scaling up to 10M+ images, supporting multi-GPU captioning, OCR extraction, CLIP alignment scoring, aesthetic analysis, deduplication checks, quality filters, and automated uploading to the Hugging Face Hub.


πŸ“‚ Folder Layout

ramanv-image-foundation/
β”œβ”€β”€ README.md                 # Dataset Card & Guide
β”œβ”€β”€ LICENSE                   # Apache-2.0 License
β”œβ”€β”€ pyproject.toml            # Project configurations and packages
β”œβ”€β”€ requirements.txt          # Python dependency list
β”œβ”€β”€ dataset_infos.json        # HF Dataset features schema
β”‚
β”œβ”€β”€ configs/                  # Pipeline configurations (YAML)
β”‚   β”œβ”€β”€ captions.yaml
β”‚   β”œβ”€β”€ ocr.yaml
β”‚   β”œβ”€β”€ clip.yaml
β”‚   β”œβ”€β”€ aesthetic.yaml
β”‚   β”œβ”€β”€ deduplicate.yaml
β”‚   β”œβ”€β”€ quality.yaml
β”‚   β”œβ”€β”€ splits.yaml
β”‚   └── upload.yaml
β”‚
β”œβ”€β”€ docs/                     # Detailed guides
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ metadata.md
β”‚   β”œβ”€β”€ pipelines.md
β”‚   β”œβ”€β”€ quality.md
β”‚   └── hf_upload.md
β”‚
β”œβ”€β”€ images/                   # Image folders grouped into 86 categories
β”‚   β”œβ”€β”€ marketing/
β”‚   β”œβ”€β”€ social_media/
β”‚   β”œβ”€β”€ advertisements/
β”‚   └── ... (83 other folders)
β”‚
β”œβ”€β”€ captions/                 # Raw descriptive text files
β”œβ”€β”€ metadata/                 # Schema-compliant JSON files (49 fields)
β”œβ”€β”€ manifests/                # Dataset manifest files (jsonl)
β”‚   β”œβ”€β”€ train.jsonl
β”‚   β”œβ”€β”€ validation.jsonl
β”‚   β”œβ”€β”€ test.jsonl
β”‚   └── all.jsonl
β”‚
β”œβ”€β”€ quality/                  # Quality metrics and reports
β”œβ”€β”€ splits/                   # Split metrics and records
β”œβ”€β”€ embeddings/               # Precomputed CLIP/SigLIP feature matrices (.npy)
β”œβ”€β”€ thumbnails/               # Generated preview thumbnails
β”œβ”€β”€ logs/                     # Rotation log output files
└── src/                      # Core utility codebase

πŸ“Š Image Categories

The dataset organizes assets into 86 distinct category folders under images/, including:

  • Design & Layout: marketing, branding, poster, flyer, banner, business_cards, advertisements, logos, icons, illustrations, 3d, packaging, mockups, social_media.
  • Commerce: products, electronics, fashion, cosmetics, food, restaurants.
  • Transport: vehicles, cars, motorcycles, buses, trains, aircraft, boats.
  • Spaces: architecture, real_estate, interiors, homes, office, workspace, travel, hotel.
  • Nature: landscape, forest, mountains, beaches, rivers, space, science, technology, medical, education, sports.
  • Culture & People: festival, temple, wedding, indian, villages, cities, street, humans, portraits.
  • Documents & Text: documents, receipts, forms, books, menus, newspapers, typography, signboards, certificates, whiteboards, handwriting.

πŸ› οΈ Getting Started

  1. Clone & Install Dependencies:

    pip install -r requirements.txt
    
  2. Initialize Folders: On Linux:

    bash scripts/create_repo.sh
    

    On Windows (PowerShell):

    # Run the PowerShell folder setup commands
    
  3. Place Source Images: Add your raw .jpg/.png images to their respective categories under the images/ directory.

  4. Run Pipelines:

    # 1. Generate captions using VLMs
    python scripts/generate_captions.py
    
    # 2. Extract OCR texts
    python scripts/generate_ocr.py
    
    # 3. Calculate CLIP alignments and extract embeddings
    python scripts/compute_clip_scores.py
    
    # 4. Compute LAION aesthetic ratings
    python scripts/compute_aesthetic.py
    
    # 5. Filter out low-quality/blurry images and deduplicate
    python scripts/deduplicate.py
    python scripts/quality_filter.py
    
    # 6. Partition train/validation/test splits
    python scripts/create_splits.py
    
    # 7. Validate schemas
    python scripts/validate_dataset.py
    

πŸš€ Model Training Guide

1. Fine-tuning FLUX Models

  • Long Captions: FLUX models leverage T5-XXL text encoders, which excel at processing highly-detailed descriptions. Use the long_caption metadata field to provide full scene composition, color palettes, styles, lighting, and textures.
  • Aspect Ratio Bucketing: Group image training items by their computed aspect_ratio to avoid distortion during crop training.
  • Aesthetic Filtering: Exclude training images with aesthetic_score < 6.0 to preserve the visual fidelity of output weights.

2. Training SDXL Models

  • CLIP Scores: Filter out records with clip_score < 0.22 to ensure proper visual concept alignment.
  • Tags: Use the computed tags array joined as comma-separated values for the conditioning prompt.

3. Training Editing / ControlNet Models

  • Use the OCR labels (contains_text: true) to isolate text-heavy graphics for training layout-aware control weights (e.g., ControlNet-OCR).
  • Filter using contains_people or people_count to selectively build portrait or posture-conditioned model adapters.

πŸ“„ License

This repository is licensed under the Apache License 2.0. See LICENSE for more details.

Downloads last month
409