```markdown # microgen3D [![Code](https://img.shields.io/badge/GitHub-Code-black?logo=github)](https://github.com/baskargroup/MicroGen3D) ## Dataset Summary **microgen3D** is a dataset of 3D voxelized microstructures designed for training, evaluation, and benchmarking of generative models—especially Conditional Latent Diffusion Models (LDMs). It includes both synthetic (Cahn-Hilliard) and experimental microstructures with multiple phases (2 to 3). The voxel grids range from `64³` up to `128×128×64`. The dataset consists of three microstructure types: - **Experimental microstructures** - **2-phase Cahn-Hilliard microstructures** - **3-phase Cahn-Hilliard microstructures** The two Cahn-Hilliard datasets are thresholded versions of the same simulation source. For each dataset type, we also provide pretrained generative model weights, comprising: - `vae.ckpt` – Variational Autoencoder - `fp.ckpt` – Feature Predictor - `ddpm.ckpt` – Denoising Diffusion Probabilistic Model --- ## 📁 Repository Structure ``` microgen3D/ ├── data/ │ └── sample_data.h5 # Experimental or synthetic HDF5 microstructure file ├── models/ │ └── weights/ │ ├── experimental/ │ │ ├── vae.ckpt │ │ ├── fp.ckpt │ │ └── ddpm.ckpt │ ├── two_phase/ │ └── three_phase/ └── ... ``` --- ## 🚀 Quick Start ### 🔧 Setup Instructions ```bash # 1. Clone the repo git clone https://github.com/baskargroup/MicroGen3D.git cd MicroGen3D # 2. Set up environment python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate # 3. Install dependencies pip install -r requirements.txt # 4. Download dataset and weights (Hugging Face) # Make sure HF CLI is installed and you're logged in: `huggingface-cli login` ``` ```python from huggingface_hub import hf_hub_download # Download sample data hf_hub_download(repo_id="BGLab/microgen3D", filename="sample_data.h5", repo_type="dataset", local_dir="data") # Download model weights hf_hub_download(repo_id="BGLab/microgen3D", filename="vae.ckpt", local_dir="models/weights/experimental") hf_hub_download(repo_id="BGLab/microgen3D", filename="fp.ckpt", local_dir="models/weights/experimental") hf_hub_download(repo_id="BGLab/microgen3D", filename="ddpm.ckpt", local_dir="models/weights/experimental") ``` --- ## 📜 Citation If you use this dataset or models, please cite: ``` @article{baishnab2025microgen3d, title={3D Multiphase Heterogeneous Microstructure Generation Using Conditional Latent Diffusion Models}, author={Baishnab, Nirmal and Herron, Ethan and Balu, Aditya and Sarkar, Soumik and Krishnamurthy, Adarsh and Ganapathysubramanian, Baskar}, journal={arXiv preprint arXiv:2503.10711}, year={2025} } ``` --- ## ⚖️ License This project is licensed under the **MIT License**. ---