Skip to content

Further developing deep learning for microstructure reconstruction

NinaStJohn/deep-microstructure-reconstruction

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Microstructure Image GAN

This project trains a Generative Adversarial Network (GAN) to synthesize realistic microstructure images based on input RGB image data. It supports multi-class training and saves both intermediate and final results for further analysis.


Installation Guide

Follow the steps below to set up the environment and run the project.

βœ… Step 1: Install Miniconda

πŸ”Ή Windows

  1. Download the Miniconda installer: Miniconda for Windows
  2. Run the .exe installer and follow the prompts.
  3. Open the Anaconda Prompt after installation.

πŸ”Ή macOS

# Download and install Miniconda
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
bash Miniconda3-latest-MacOSX-x86_64.sh

Then restart your terminal.

πŸ”Ή Linux

# Download and install Miniconda
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Then restart your shell or run: source ~/.bashrc


βœ… Step 2: Create the Conda Environment

Clone the repository (or download the files) and make sure you're in the root directory.

git clone https://github.com/cmaloney111/deep-microstructure-reconstruction.git
conda env create -f environment.yml
conda activate MicroRec

βœ… Step 3: Navigate to the Training Script

cd src/new-final-gan

βœ… Step 4: Prepare Your Data

Your RGB image folder should be structured like this:

/path/to/RGB-image-folder/
β”œβ”€β”€ class_0/
β”‚   β”œβ”€β”€ image_0.jpg
β”‚   β”œβ”€β”€ image_1.jpg
β”‚   └── ...
β”œβ”€β”€ class_1/
β”‚   β”œβ”€β”€ image_0.jpg
β”‚   β”œβ”€β”€ image_1.jpg
β”‚   └── ...
└── ...

Each subfolder represents a class label (e.g., microstructure type), and contains images in .jpg/.jpeg, .png, or .tif format.


βœ… Step 5: Run the Training Script

python train.py --path /path/to/RGB-image-folder

Arguments:

  • --path: Path to the root folder containing your image classes.

Example:

python train.py --path ./data/microstructures

Outputs

After training, you will find:

  • Generated images (images folder)
  • Model checkpoints (models folder)

About

Further developing deep learning for microstructure reconstruction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%