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
Clone & Install Dependencies:
pip install -r requirements.txtInitialize Folders: On Linux:
bash scripts/create_repo.shOn Windows (PowerShell):
# Run the PowerShell folder setup commandsPlace Source Images: Add your raw
.jpg/.pngimages to their respective categories under theimages/directory.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_captionmetadata field to provide full scene composition, color palettes, styles, lighting, and textures. - Aspect Ratio Bucketing: Group image training items by their computed
aspect_ratioto avoid distortion during crop training. - Aesthetic Filtering: Exclude training images with
aesthetic_score < 6.0to preserve the visual fidelity of output weights.
2. Training SDXL Models
- CLIP Scores: Filter out records with
clip_score < 0.22to ensure proper visual concept alignment. - Tags: Use the computed
tagsarray 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_peopleorpeople_countto 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
- 277