ncta2022
Repository for the paper Deep learning of structural changes in historical buildings: the case study of the Pisa tower
Installation
Clone this repository
git clone https://github.com/galatolofederico/ncta2022.git
cd ncta2022
Create a virtualenv and install the requirements
virtualenv --python=python3.8 env
. ./env/bin/activate
pip install -r requirements.txt
If you are interested in the dataset please contact us
Usage
To train a model run
python train.py train.save_model=<save_path> dataset=<dataset> train.wandb=<true/false> wandb.tag=<tag> architecture=<architecture>
Where
- dataset can be:
post
prepost
orfull
- architecture can be:
LSTMRegressor
VectorAutoRegressor
orTransformerRegressor
This script will save the trained model in <save_path>
To run the inference with a model run
python predict.py predict.model=<path-to-checkpoint> predict.split=<split> dataset=<dataset> architecture=<architecture>
Where
- predict.split can be:
train
validation
test
orpost
(post
is available only using theprepost
dataset) - dataset can be:
post
prepost
orfull
- architecture can be:
LSTMRegressor
VectorAutoRegressor
orTransformerRegressor
This script will save the outputs and the plots in the folder ./plots
To compute the performance metrics run
python evaluate.py evaluate.model=<path-to-checkpoint> evaluate.split=<split> dataset=<dataset> architecture=<architecture>
Where
- evaluate.split can be:
train
validation
test
orpost
(post
is available only using theprepost
dataset) - dataset can be:
post
prepost
orfull
- architecture can be:
LSTMRegressor
VectorAutoRegressor
orTransformerRegressor
This script will save the results in the folder ./results
Scripts
To train all the models from the paper run
./train_all.sh
To run the inference with the trained models run
./predict_all.sh
To compute the performance metrics for all the models run
./evaluate_all.sh
Contributions and license
The code is released as Free Software under the GNU/GPLv3 license. Copying, adapting and republishing it is not only allowed but also encouraged.
For any further question feel free to reach me at federico.galatolo@ing.unipi.it or on Telegram @galatolo