Skip to main content

LaueNN- neural network training and prediction routine to index single and polycrystalline Laue diffraction patterns

Project description

GitHub CI contributions welcome HitCount

lauetoolsnn

A feed-forward neural network (FFNN) model to predict the HKL in single/multi-grain/multi-phase Laue patterns with high efficiency and accuracy is introduced.

Video tutorial

Requirements: (latest version of each libraries accessed on 03/04/2022)

  • PyQt5 (GUI)
  • matplotlib
  • Keras
  • tensorflow
  • numpy
  • scipy (scipy transform rotation is used)
  • h5py (required for writing neural network model files)
  • scikit-learn (required for generating trained model classification reports)
  • fabio (used for opening raw Laue tiff images)
  • networkx (to be replaced with numpy in the future)
  • scikit-image (used for hough based analysis of Laue patterns)
  • tqdm (required only for notebook scripts)
  • opencv (for LOG based peak search)

Installation

Lauetoolsnn can be installed either via PYPI usiing the following command in terminal (this installs all dependencies automatically): https://pypi.org/project/lauetoolsnn/

https://anaconda.org/bm32esrf/lauetoolsnn

$ pip install lauetoolsnn
$ or
$conda install -c bm32esrf lauetoolsnn -c conda-forge

or can be compiled and installed locally via the setup.py file. Download the Github repository and type the following in terminal. In this case, the dependencies has to be installed manually. The latest version of each dependency works as of (01/04/2022).

$ python setup.py install

See procedure_usage_lauetoolsnn.pdf for installation and how to write the configuration file to be used with GUI.

Example case

Two example case studies are included in the lauetoolsnn\examples folder. Run the GUI by either launching directly from the terminal using the 'lauetoolsnn' command or by running it locally with python lauetoolsneuralnetwork.py command.

First step is to load the config.txt from the example folder, it sets all the values of the GUI to the case study. In the GUI:

  • Step1: File --> load config . Select the config file from the example directory.
  • Step1a: If config file is not available, one can set parameters in the configure parameters window directly.
  • Step2: Press the configure parameters button and press Accept button at the end (the values are loaded from the config file).
  • Step3: Press Generate Training dataset button. This will generate the training and validation dataset for neural network.
  • Step4: Press Train Neural network button. This will start the training process and once finished will save the trained model.
  • Step5: Press the Live prediction with IPF map to start the prediction on predefined experimental dataset. Example datafile is included in the examples folder.
  • Step6: Once analyzed, the results can be saved using the save results button.

In addition, all the above mentioned steps can be done without the GUI and are detailed in the lauetoolsnn\example_notebook_scripts folder. Jupyter notebook scripts are provided to run all the steps sequentially.

The indexed orientation matrix is also written in ".ctf" format, which can then be opened with channel 5 Aztec or MTEX software to do post processing related to orientations analysis. MTEX post processing script is also included in the lauetoolsnn\util_script\MTEX_plot.m

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lauetoolsnn-3.0.64.tar.gz (13.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lauetoolsnn-3.0.64-py3-none-any.whl (12.8 MB view details)

Uploaded Python 3

File details

Details for the file lauetoolsnn-3.0.64.tar.gz.

File metadata

  • Download URL: lauetoolsnn-3.0.64.tar.gz
  • Upload date:
  • Size: 13.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for lauetoolsnn-3.0.64.tar.gz
Algorithm Hash digest
SHA256 18f0544e126110e052f83ea3d642ede6ea9e9024cdac1def8371feaede714cd8
MD5 7b09d16953b78b22e41f22dc21d9a17d
BLAKE2b-256 806bad5f81f1041dda34e17df05b2f56d3828dfec702ea0d1f0ba2bf6a855e4f

See more details on using hashes here.

File details

Details for the file lauetoolsnn-3.0.64-py3-none-any.whl.

File metadata

  • Download URL: lauetoolsnn-3.0.64-py3-none-any.whl
  • Upload date:
  • Size: 12.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for lauetoolsnn-3.0.64-py3-none-any.whl
Algorithm Hash digest
SHA256 0786ed65f8ead13bf7a8c4e7f2b1c8bcaedcda98141b358fd42c5bb3497ff4da
MD5 15d969bac85e9dc64e5de692d87d95cc
BLAKE2b-256 e69c7507fd8e0e0b9145a66bfc317c10358622965971f18272c1ecb78f727b54

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page