This is repository to recreate experiments in the paper Visual Knowledge Tracing (ECCV 2022)
This document will guide you through setting up the project directory in order to run the experiments presented in the paper and to develop new models to try on this dataset.
The dataset contains three folders: OCT/
, greebles/
, butterflies/
.
Within each folder, there is a folder of images/
, mongodb_data/
, and a <dataset-name>.json
file.
The mongodb_data/
folder contains the raw responses from subjects.
The <dataset-name>.json
contains the mapping between images and image_ids in the
human data.
The experiments from the paper are contained within
/VisualKnowledgeTracing/experiments/vkt_experiment/
Setting up the environment to run these experiments.
A conda environment can be created using the environment.yml file.
Create : conda env create -f <path_to_yaml_file>
Activate : conda active VKT_env
- Download the dataset.
The paths to the dataset and output folders are set in the config.py file.
- Set the dataset path to the location of the dataset on your filesystem.
- Set the output path to the location where you'd like trained models to be stored.
This codebase was originally developed in Pycharm. Pycharm
appends the project directory to the sys.path
variable in python.
Not appending this value will cause import issues.
If running scripts from terminal (as opposed to in an IDE), running this subshell from the main project directory will address the import issue.
cd /<ROOT>/VisualKnowledgeTracing/
./project_subshell
cd <folder of script>
python3 <script_name>.py
You can skip the first step if you hard-code the root directory into the subshell script, then you will be able to activate the subshell from anywhere
ctrl D
or exit
will exit the subshell.
- Run all of the scripts
prep_<dataset>_data.py
.
They will process, format, and partition the data.
- Run one of the
experiment<x>.py
scripts - Run the corresponding analysis scripts
\vkt_experiment\analysis_scripts\experiment<x>_<>.py
- Run the desired figure generating scripts
\vkt_experiment\figures_scripts\experiment<x>_<>.py
- Copy the
template_experiment
folder and rename to your experiment name. runner_<model_type>.py
scripts can be run from the terminal by passing args. Each runner script trains a type of tracing model.- Change the experiment_group_name variable to your experiment name in
experiment_utilities.py
- Modify
experiment1_script.py
to create your own experiment where multiple models are trained
- Copy the
template.py
file and rename to your model's name- Modify or fill in the functions in the template
- Copy the
runner_template.py
script - Replace the
Template
model with your own model, add any params needed for your model