How kapilw25/evaluation_generated_images works
Main Components
• Data Management & Ingestion:
• The DeepFashion folder holds raw input data (images, captions, labels, keypoints) used for training and evaluation.
• Metadata Preprocessing:
• The new component (metadata_preprocessing.py) processes structured input files (CSV, JSON) from the dataset. It likely cleans, normalizes, and transforms the raw metadata, and then outputs a processed file (for example, processed_metadata.csv) typically stored in the results or a similar output folder.
• Model Training/Generation Pipeline:
• Scripts such as text2image_generation.py are responsible for generating images from text.
• Evaluation Pipeline:
• Files like evaluation_metrics.py and evaluation_pipeline.py compute performance metrics (e.g., FID, LPIPS, Recall@3, MRR) using results stored in the mlruns and results directories.
• Experiment Tracking:
• The mlruns folder shows structured experiment logs managed by MLflow. It stores metrics, parameters, and metadata for different runs.
• Image Generation Artifacts:
• The image_generated directory contains outputs from various image generation models (CogView, Context_LoRA, Flux, etc.) along with their metadata.
• Visualization/Demo Interface:
• The visualization_app.py (and associated demo assets in README_files) is used to present the results and system outputs, providing a user interface or dashboard.
• Notebook for Interactivity:
• test.ipynb can serve to experiment with or demonstrate parts of the system interactively.
Relationships and Data Flow
• The raw data in the DeepFashion folder feeds into the metadata preprocessing module (metadata_preprocessing.py), which outputs a cleaned metadata file.
• This processed metadata, along with raw images and captions, is then used by the text-to-image generation script and the overall training pipeline.
• Generated images are stored in the image_generated folder with accompanying metadata that can be evaluated.
• The evaluation pipeline takes artifacts from image generation and computes various evaluation metrics, logging them through MLflow in the mlruns folder.
• Finally, the visualization_app.py consumes the processed images, evaluation metrics, and possibly experiment metadata to render a demo dashboard for users.
Architectural Patterns and Design Principles
• Modular Pipelines: Each component (data preprocessing, model generation, evaluation, and visualization) is implemented as a standalone module, making it easier to manage and extend.
• Experiment Tracking: Leveraging MLflow (via the mlruns directory) helps in maintaining reproducibility and performance comparison across multiple runs.
• Separation of Concerns: Data ingestion, processing, evaluation, and presentation are well isolated, which improves maintainability.
Relevant Technologies, Frameworks, and Files
• Python Scripts: All the key functionalities (generation, evaluation, preprocessing) are available as Python scripts.
• MLflow: For experiment tracking and logging metrics.
• CSV/JSON Files: Used for storing input/output metadata, indicating a reliance on commonly used data formats.
• Visualization: The visualization_app.py and demo images included in README_files provide a front-end view of the system.