How yongchoooon/dalda works
DALDA is a few-shot image-classification augmentation framework: it uses LLM-written semantic prompts and real images as visual guidance for diffusion-generated training examples, then trains and evaluates a classifier. The main workflow is configured experiments, dataset sampling, synthetic-image generation, mixed real/synthetic training, and validation. The graph also includes the separate prompt-generation capability and the three supported datasets. Some runtime details are unsampled; edges are limited to source excerpts or README-documented relationships.
Main entry points: train_classifier.py Training workflow · generate_prompt_by_LLM.py LLM prompt generator · dalda.py DALDA augmentation · few_shot_dataset.py Few-shot dataset
Components 17
Prompt authoring
- LLM prompt generator
generate_prompt_by_LLM.py - Prompt templates
prompt_for_LLM - Azure OpenAI
Few-shot data
- Oxford Pets data
semantic_aug/datasets/pets.py - Flowers102 data
semantic_aug/datasets/flowers102.py - Caltech101 data
semantic_aug/datasets/caltech101.py - Few-shot dataset
semantic_aug/few_shot_dataset.py - Synthetic examples
semantic_aug/few_shot_dataset.py
DALDA generation
- Augmentation interface
semantic_aug/generative_augmentation.py - DALDA augmentation
semantic_aug/augmentations/dalda.py - Diffusion synthesis
semantic_aug/augmentations/dalda.py - CLIP guidance scoring
semantic_aug/augmentations/dalda.py
Classifier training
- Experiment settings
configs - Training workflow
train_classifier.py - Classifier model
train_classifier.py - Evaluation records
train_classifier.py
Other components
- Experimenter
Connections 22
- Experimenter → LLM prompt generator: generates prompts
README.md - Prompt templates → LLM prompt generator: provides templates
generate_prompt_by_LLM.py - LLM prompt generator → Azure OpenAI: requests completions
generate_prompt_by_LLM.py - LLM prompt generator → Oxford Pets data: gets class names
generate_prompt_by_LLM.py - LLM prompt generator → Flowers102 data: gets class names
generate_prompt_by_LLM.py - LLM prompt generator → Caltech101 data: gets class names
generate_prompt_by_LLM.py - Experimenter → Training workflow: runs experiment
README.md - Experiment settings → Training workflow: configures
README.md - Training workflow → Oxford Pets data: selects dataset
train_classifier.py - Training workflow → Flowers102 data: selects dataset
train_classifier.py - Training workflow → Caltech101 data: selects dataset
train_classifier.py - Oxford Pets data → Few-shot dataset: extends
semantic_aug/datasets/pets.py - Flowers102 data → Few-shot dataset: extends
semantic_aug/datasets/flowers102.py - Caltech101 data → Few-shot dataset: extends
semantic_aug/datasets/caltech101.py - Training workflow → DALDA augmentation: instantiates
train_classifier.py - DALDA augmentation → Augmentation interface: implements
semantic_aug/augmentations/dalda.py - Few-shot dataset → DALDA augmentation: generates examples
semantic_aug/few_shot_dataset.py - DALDA augmentation → Diffusion synthesis: synthesizes images
semantic_aug/augmentations/dalda.py - DALDA augmentation → CLIP guidance scoring: scores guidance
semantic_aug/augmentations/dalda.py - Few-shot dataset → Synthetic examples: saves examples
semantic_aug/few_shot_dataset.py - Training workflow → Classifier model: trains model
train_classifier.py - Training workflow → Evaluation records: records metrics
train_classifier.py