This is the code for generating visual geometric premises recognition benchmark and GeoCLIP-style data used for evaluating and constructing the vision encoder of GeoDANO. The code is built on the implementation of AlphaGeometry.
Installation is done in a virtual environment:
virtualenv -p python3 .
source ./bin/activate
pip install --require-hashes -r requirements.txt
Install meliad
separately as it is not
registered with pip
:
MELIAD_PATH=meliad_lib/meliad
mkdir -p $MELIAD_PATH
git clone https://github.com/google-research/meliad $MELIAD_PATH
export PYTHONPATH=$PYTHONPATH:$MELIAD_PATH
Run the following script to generate the benchmark. The default directory is ./data
:
bash benchmark_generation.sh
Run the following scrip to generate the GeoCLIP-style data used to train the vision encoder:
python clip_generator.py --n_problems 200000 --image_folder ./data/clip/images --out_file ./data/clip/problems.jsonl --n_workers 50