Installation#
The FreelyMovingVR4Mice repository contains main vr4mice package (src code: teensyexp folder) and mouse_task module that is the input for vr4mice
Note: The following installation assumes you have already installed on your system the conda package manager. If you havenโt, please follow the official installation process for Windows here (check this for more details).
Create and activate a new conda environment with local pip:
conda create -n <name-of-env> python=3.10.12 && conda activate <name-of-env>
Hint
As an example, with vr4mice_env as the environment name, the above command would become as follows:
conda create -n vr4mice_env python=3.10.12 && conda activate vr4mice_env
Now, it is necessary to clone the FreelyMovingVR4Mice repository and install the vr4mice package that comes with it:
To clone the FreelyMovingVR4Mice repository:
git clone https://github.com/MMathisLab/FreelyMovingVR4Mice.git
cd FreelyMovingVR4Mice
To choose a specific branch other than
mainormaster(if needed):git checkout <name-of-the-branch>
When cloning a GitHub repository, the default branch will usually be the
main(ormaster).To install the vr4mice package (use
pip install -e .instead if planning to actively develop the package and modify the source code):pip install .
To check everything installed successfully (assuming no ERRORS were displayed in the process), try to run the following in your conda environment:
vr4mice
๐ The GUI should appear on your screen! ๐
Install DLCliveGUI#
DLClivegui handles reading from the camera and live pose estimation. Before installing DLClivegui you will need to install the correct drivers and C libraries for your camera. You can find links to these here. Make sure you add the C libraries to your system path if you are using a windows machine.
You will also need to install DLCliveGUI on a separate conda environment (call this environment dlclive_gui) you can find installation instructions on how to do this here. However, you will want to use a tensorflow 2.x version since the model that we use for the tracking was made with tensorflow 2. Ensure that you also have the correct version of CUDA and cudnn installed on this conda environment for the tensorflow version that you are using.
You can then start the gui by typing dlclivegui when in the dlclive_gui environment.
Getting Started#
Setting up your experimental system#
Teensy#
Connect teensy microcontroller and upload the teensy sketch (example of code to upload)
Check rights on port access (modify via
sudo chmodif needed)
Config files#
Set up the config files
Desktop icon#
How to create desktop icon using a
.batscript (Windows)