Repository for computational, behavioral, and imaging studies of physical event perception.
Requirements: singularity
If you are working on a Linux computer, download singularity and you should be good to go! :
git clonethe repositorycd physical_event_primitivesgit submodule update --init(initialize the Blender egg importer add-on)./setup.sh pull true true(pulls the container from Box.com, sets up Conda and Julia environments). Run./setup.sh build true trueif you want to build the container for some reason.
If you are working on a Mac, the situation is more complicated.
- Follow instructions here: https://sylabs.io/guides/3.5/admin-guide/installation.html#mac to download
vagrant,vagrant-manager, andvirtual box. You need to haveHomebrewto install this. - Make sure to create the virtual machine inside of the
physical_event_primitivesdirectory, or in a directory that encloses it. - When you want to build or pull the singularity image, go into the directory with the Vagrantfile and run
vagrant ssh. Thencdinto thephysical_event_primitivesdirectory which is located within/vagrant/. You can now run the above commands as if you were working on a Linux!
Mac users may also need to cp default.conf user.conf and change the Julia depot line to julia_depot:/home/vagrant/.julia/.
Run ./run.sh <command> to execute commands with the image, e.g. to launch Julia REPL ./run.sh julia.
If using Milgram and need a virtual display (e.g. rendering with Blender), run ./run.sh xvfb-run -a <command>.
Disclaimer: Much of this code is taken directly from http://geometry.cs.ucl.ac.uk/projects/2019/causal-graphs/ with tweaks to fit our specific situation
blender/ - Scripts used to export animations to Blender
core/ - Core package; contains all the algorithms
demos/ - Demos to play with & contains the main generate.py script for generating videos
gui/ - Graphical modules -- mostly irrelevant here
scenarios/ - Config files of different possible scenarios
You can run the script using ./run.sh demos/generate.py