The train.ipynb notebook contains code for training a 3D convnet using Barlow Twins. The goal is to embed short video clips of animal behavior in a semantically-meaningful latent space.
Create a virtual environment using conda:
conda create -n video_embedding python=3.10
conda activate video_embedding
Install ipykernel to use the conda environment in Jupyter notebooks:
pip install ipykernel
python -m ipykernel install --user --name=video_embedding
When you want to use the conda environment in Jupyter notebooks, select the video_embedding kernel.
-
Install necessary dependencies to run the full notebook. List all the dependencies you had to install in a file called
requirements.txt -
Add comments/docstrings that explain the purpose of each function (or question marks if any you're not sure).
-
Create a minimal python package by adding an
__init__.pyfile and splitting the functions into separate files that cover different functionalities (e.g.io.pyfor video reading and writing,augmentation.pyfor augmentations,model.pyfor the model, etc.). The package should be importable from the notebook. -
Add formal docstrings to all the functions and classes. Use the Google style guide for docstrings. Refactor where necessary to make the code more readable.
-
Formalize the python package by adding a
setup.pyfile and versioning (Caleb will do this). -
Add functionality for animal tracking / cropping.
-
Create documentation, including installation instructions and a tutorial notebook.