Here we introduce the 'ImageRep' method for fast phase fraction representativity estimation from a single microstructural image. This is achieved by calculating the Two-Point Correlation (TPC) function of the image, combined with a data-driven analysis of the MicroLib dataset. By applying a statistical framework that utilizes both data sources, we can establish the uncertainty in the phase fraction in the image with a given confidence, and the image size that would be needed to meet a given target uncertainty. Further details are provided in our paper.
If you use this ImageRep in your research, please cite us.
This method can be used via the website (imagerep.io) or as python package - see example.ipynb
.
NB: the website may run out of memory for large volumes (>1000x1000x1000) - if this happens run the method locally or contact us
These instructions are for installing and running the method locally. They assume a UNIX enviroment (mac or linux), but adapting for Windows is straightforward. Note you will need 2 terminals, one for the frontend local server and one for the backend local server.
Install npm (ideally via a manager like nvm) if you want to run the website. Clone this repo and change directory:
git clone https://github.com/tldr-group/Representativity && cd Representativity
pip install -e .
NOTE: this is all you need to do if you wish to use the method via the python package. To run the website locally, follow the rest of the instructions.
representativity/
directory, runpython -m flask --app server run
The server should now be running on http://127.0.0.1:500
and listening for requests!
pytorch
and some additional dependencies. It may be worth using conda to install pytorch
as this will interact correctly with your GPU. Run
pip install -r requirements_dev.txt
npm install --g yarn
yarn && yarn start
http://localhost:8080/
(the browser should do this automatically).python tests/tests.py