conda env create -f environment.yml
conda activate masconcube
Or, if you want to install also development dependencies:
conda env create -f environment_dev.yml
conda activate masconcube
Development dependencies include packages for linting and contributing to the project.
- Download the 3D meshes from darioizzo/geodesyNets/3dmeshes and copy them inside the
data/3dmeshes
folder. For more information, see the data README. - Generate the ground-truth mascon models in the
data/ground_truths
folder by running the following script:python scripts/generate_ground_truth.py
- Generate the validation datasets in the
data/val_datasets
anddata/test_datasets
folders by running the following script:python scripts/generate_val_datasets.py
- Train MasconCubes with the following command:
python scripts/train_cubes_all.py [--gpus <gpu1> <gpu2> ...]
- Train GeodesyNets with the following command:
python scripts/train_geodesynet_all.py [--gpus <gpu1> <gpu2> ...]
- Train PINN-GM III with the following command:
python scripts/train_pinn_all.py [--gpus <gpu1> <gpu2> ...]
- Evaluate the models and produce plots using the provided notebooks.
Note that steps 5 and 6 are required only to compare the results with previous state-of-the-art methods, and they might take a long time to run. You can skip them if you are only interested in MasconCube. If you want to run them, multiple GPUs are recommended, so that you can run them in parallel. The --gpus
argument allows you to specify which GPUs to use for training.
If you want to run the training on single asteroids, you can use the scripts scripts/train.py
, scripts/train_geodesynet.py
, and scripts/train_pinn.py
. For example, to train MasconCube on eros_uniform
, you can run:
python scripts/train.py eros_uniform
MasconCube trainings also support TensorBoard logging (development dependencies required). You can run the following command to start TensorBoard:
tensorboard --logdir runs
And then enable logging in the training script by passing the --tensorboard
argument:
python scripts/train.py eros_uniform --tensorboard