Home

Awesome

Geoclidean: Few-Shot Generalization in Euclidean Geometry

demonstrative figure

Joy Hsu, Jiajun Wu, Noah Goodman

In NeurIPS Datasets and Benchmarks 2022

Prerequisites

pip install Shapely and pip install descartes.

Data

The Geoclidean-Elements and Geoclidean-Constraints dataset can be downloaded here. Geoclidean-Elements includes 17 concepts and 34 tasks of Close and Far, while Geoclidean-Constraints includes 20 concepts and 40 tasks. The data is structured as following:

geoclidean    
│
└───elements -> the Geoclidean-Elements dataset
│   │
│   └───concept_name
│       │   concept.txt
│       │   close_concept.txt
│       │   far_concept.txt
│       │   train
│       │   │   1_fin.png -> rendered from concept.txt
│       │   │   2_fin.png
│       │   │   3_fin.png
│       │   │   4_fin.png
│       │   │   5_fin.png
│       │   test
│       │   │   in_1_fin.png -> rendered from concept.txt
│       │   │   in_2_fin.png
│       │   │   in_3_fin.png
│       │   │   in_4_fin.png
│       │   │   in_5_fin.png
│       │   │   out_close_1_fin.png -> rendered from close_concept.txt
│       │   │   out_close_2_fin.png
│       │   │   out_close_3_fin.png
│       │   │   out_close_4_fin.png
│       │   │   out_close_5_fin.png
│       │   │   out_far_1_fin.png -> rendered from far_concept.txt
│       │   │   out_far_2_fin.png
│       │   │   out_far_3_fin.png
│       │   │   out_far_4_fin.png
│       │   │   out_far_5_fin.png
│       ...
│   
└───constraints -> the Geoclidean-Constraints dataset
    │   ...

Geoclidean DSL and Rendering

See examples of Euclidean geometry language to image rendering in dataset_creation.ipynb.

Primitives:

Syntax:

Model Benchmarking

Feature extraction:

See feature extraction for VGG16, ResNet50, and IncepeptionV3 in feature_extraction_cnn.ipynb, and for Vision Transformer in feature_extraction_vit.ipynb.

Benchmarking:

See accuracy and AUC calculation in model_benchmarks.ipynb.