This instruction illustrates a machine learning-based multi-scale model to predict bone formation in tissue scaffolds. This code uses neural networks to predict bone formation in synthetic scaffolds. We are sorry that the code is a little bit messy as we are not good at coding. The code can be used to predict bone remodelling results in synthetic scaffolds in a multi-level way. Therefore, it enables to inversely identification of the bone remodelling related parameters from clinical data. In order to run the machine learning-based multiscale bone remodelling program. The following platforms are what you need:
- Abaqus v2016/v614
- Matlab R2020b
- An Abaqus plugin tool which can be downloaded from https://github.com/mhogg/pyvxray.git
- Jupyter notebook with Python 3.
Here is a detailed description of the program.
- demo_example and demo_pearson_opt. This document provides instructions on running a demo example and a demo example calculating Pearson’s coefficient. The necessary functions for running the machine learning-based algorithm are located in the folder “demo_example”. In "demo_example", Multiscale_boneRemodelling_ML is the main function to start the program. “macro_umat” is the user subroutine to pass the homogenized material properties to Abaqus. “read_macro_1423” is a post-process file to obtain necessary stress/strain data information. “Sheep_macro_1423_C3D4.inp” is the input file of the sheep tibia scaffold model. Before start, please change line 49 and line 58 of “macro_umat” file to your current work directory. In “results” file, the results are obtained by running the demo_program. In “demo_pearson_opt” file, there are inversely-identified virtual X-ray images and in-vivo X-ray images. The python code "sheep3_6_9_8roi.ipynb" can be found to calculate the Pearson’s coefficient between the virtual X-ray images and in-vivo X-ray images. Jupyter notebook is required to run “sheep3_6_9_8roi.ipynb” to calculate the Pearson’s coefficient in "demo_pearson_opt". “image_opt” is the calculated Pearson’s coefficient based on the inverse-identified case.
- Micro_samples contains the files for the generation of micro RVE samples. “microRVE.inp” is the input file of the micro RVE for Abaqus. “Micro_USDF1.for” is the Fortran file that is used as a user subroutine in Abaqus to consider the adaptive bone density change in the bone regeneration area. “read_microRVE” is the post-process file to obtain strain and stress information.
- Neural_network_training contains the files for the training of the 1st neural network for calculating the elastic tensor and the 2nd series of neural networks for calculating the unit SED components. In 1st_neural_network file, a Matlab code is for the training of the neural network based on Matlab R2020b. The training data of the 1st round and the 2nd round are provided in the dataset file. In 2nd_neural_network file, a Matlab code “Train3D_SED” is used for the training of 21 independent neural networks for predicting 21 unit SED components. “dataset” contains the training data of unit SED components.
- ML_approach contains the files of the proposed machine learning-based approach and the trained neural networks. The Matlab code “Multiscale_boneRemodelling _ML” is the program for the proposed approach, which will call Abaqus for the finite element analysis at the macroscopic level. “sheep_macro_1423_C3D4.inp” is the input file of the in-silico model, including sheep tibia, bone fixation plate, screws and scaffold. “macro_umat” is the user subroutine file. “read_macro_1423” is used for post-process of FE data. “Trained_model” file includes all the trained neural networks.
- Inverse_identification contains files for the inverse problem. “image_analysis” contains the 5000 virtual images generated by the proposed ML approach (“postresults_imageupdate_5000). “sheep3_6_9_8roi.ipynb” is the python-based code for the images analysis and calculates the Pearson’s coefficient. “NN_pear” is the trained neural network to output Pearson’s coefficient. “Pea_opt” is the code to find the optimal bone remodelling parameters by multi-objective genetic algorithm. “in-vivo X_ray” includes the clinical X-ray images taken at different time points. “inverse_identified_results” includes the final inverse identified results.