Script to reflatten the scroll segments used in the Vesuvius Challenge ( https://scrollprize.org/ ) using Scalable Locally Injective Mappings (SLIM) as described in the SLIM paper.
- Conda (Anaconda or Miniconda).
- Flattened segment(s) with
.obj
,.tif
and.mtl
in the same folder.
- Clone or download this repository to your local machine.
- Create a Conda environment with the required dependencies:
conda env create -f environment.yml
- Activate the environment:
conda activate flatboi-env
Run the script from the command line, specifying the path to your .obj
file and the number of iterations as arguments:
python flatboi.py <path_to_obj_file> <number_of_iterations>
Example:
python flatboi.py /path/to/segment.obj 20
Select a number of iterations that makes the procedure converge. I would put at least 20
.
The script will generate modified _flatboi.obj
, _flatboi.png
, and _flatboi.mtl
files in the same directory as the input file. Additionally, it will create a energies_flatboi.txt
file containing Symmetric Dirichlet Energy values computed during the iterative process.
See the LICENSE file.
Dr. Giorgio Angelotti