Skip to content

Joe Webb's machine learning approach for classifying diffraction patterns, and predicting properties of the associated crystal. Furthermore, to quickly generate these diffraction patterns from crystal parameters.

Notifications You must be signed in to change notification settings

WarwickMicroscopy/felix-ml

 
 

Repository files navigation

Felix-ML

PyTorch Lightning Config: Hydra Template

A machine learning approach to diffraction patterns.
Check out the webpage to see documentation and research!

Description

Felix-ML is able to predict and analyse LACBED diffraction patterns for defining crystal structures.

Installation

Pip

# clone project
git clone https://github.com/wephy/felix-ml
cd felix-ml

# [OPTIONAL] create conda environment
conda create -n myenv python=3.9
conda activate myenv

# install pytorch according to instructions
# https://pytorch.org/get-started/

# install requirements
pip install -r requirements.txt

Conda

# clone project
git clone https://github.com/wephy/felix-ml
cd felix-ml

# create conda environment and install dependencies
conda env create -f environment.yaml -n myenv

# activate conda environment
conda activate myenv

How to run

Train model with default configuration

# train on CPU
python src/train.py trainer=cpu

# train on GPU
python src/train.py trainer=gpu

Train model with chosen experiment configuration from configs/experiment/

python src/train.py experiment=experiment_name.yaml

You can override any parameter from command line like this

python src/train.py trainer.max_epochs=20 data.batch_size=64

Create a sweep over hyperparameters

python train.py -m data.batch_size=32,64,128 model.lr=0.001,0.0005

About

Joe Webb's machine learning approach for classifying diffraction patterns, and predicting properties of the associated crystal. Furthermore, to quickly generate these diffraction patterns from crystal parameters.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Python 96.9%
  • Makefile 2.4%
  • Shell 0.7%