Skip to content

Commit

Permalink
[docs] installation
Browse files Browse the repository at this point in the history
  • Loading branch information
themattinthehatt committed Dec 3, 2023
1 parent ed6c8f4 commit e92fa62
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 37 deletions.
37 changes: 3 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
[![Documentation Status](https://readthedocs.org/projects/daart/badge/?version=latest)](https://daart.readthedocs.io/en/latest/?badge=latest)
[![DOI](https://zenodo.org/badge/334987729.svg)](https://zenodo.org/badge/latestdoi/334987729)

A collection of tools for the discrete classification of animal behaviors using low-dimensional representations of videos (such as skeletons provided by tracking algorithms). Our approach combines strong supervision, weak supervision, and self-supervision to improve model performance. See the preprint [here](https://www.biorxiv.org/content/10.1101/2021.06.16.448685v1) for more details. This repo currently supports fitting the
following types of base models on behavioral time series data:
A collection of tools for the discrete classification of animal behaviors using low-dimensional representations of videos (such as skeletons provided by tracking algorithms). Our approach combines strong supervision, weak supervision, and self-supervision to improve model performance. See the preprint [here](https://www.biorxiv.org/content/10.1101/2021.06.16.448685v1) for more details. This repo currently supports fitting the following types of base models on behavioral time series data:
* Dense MLP network with initial 1D convolutional layer
* RNNs - both LSTMs and GRUs
* Temporal Convolutional Networks (TCNs)

See the [documentation](https://daart.readthedocs.io/) to get started!

If you use daart in your analysis of behavioral data, please cite our preprint!

@inproceedings{whiteway2021semi,
Expand All @@ -21,39 +22,7 @@ If you use daart in your analysis of behavioral data, please cite our preprint!

## Installation

First you'll have to install the `git` package in order to access the code on github. Follow the
directions [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
for your specific OS.
Then, in the command line, navigate to where you'd like to install the `daart` package and move
into that directory:
```
$: git clone https://github.com/themattinthehatt/daart
$: cd daart
```

Next, follow the directions
[here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/)
to install the `conda` package for managing development environments.
Then, create a conda environment:

```
$: conda create --name=daart python=3.6
$: conda activate daart
(daart) $: pip install -r requirements.txt
```

To make the package modules visible to the python interpreter, locally run pip
install from inside the main `daart` directory:

```
(daart) $: pip install -e .
```

To be able to use this environment for jupyter notebooks:

```
(daart) $: python -m ipykernel install --user --name daart
```

## Getting started

Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ extensions = [
'sphinx.ext.napoleon', # parsing of different docstring styles
'sphinx_automodapi.automodapi',
'sphinx_copybutton', # add copy button to code blocks
'sphinx_rtd_dark_mode',
]
```

Expand Down
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'sphinx.ext.napoleon', # parsing of different docstring styles
'sphinx_automodapi.automodapi',
'sphinx_copybutton', # add copy button to code blocks
'sphinx_rtd_dark_mode',
]

templates_path = ['_templates']
Expand All @@ -40,6 +41,9 @@
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']

# user starts in dark mode
default_dark_mode = True


# document constructors
def skip(app, what, name, obj, skip, options):
Expand Down
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@
Welcome to daart's documentation!
=================================

The ``daart`` package is a collection of tools for the discrete classification of animal behaviors
using low-dimensional representations of videos (such as skeletons provided by tracking algorithms).
``daart`` combines strong supervision, weak supervision, and self-supervision to improve model
performance.
See the `preprint <https://www.biorxiv.org/content/10.1101/2021.06.16.448685v1>`_ for more details.

This repo currently supports fitting the following types of base models on behavioral time series
data:

* dense MLP network with initial 1D convolutional layer
* RNNs - both LSTMs and GRUs
* temporal convolutional networks (TCNs)

.. toctree::
:maxdepth: 2
:caption: Contents:
Expand Down
75 changes: 74 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,77 @@
Installation
============

TODO
First you'll have to install the ``git`` package in order to access the code on github.
Follow the
`git installion instructions <https://git-scm.com/book/en/v2/Getting-Started-Installing-Git>`_
for your specific OS.

**Install ffmpeg**

First, check to see you have ``ffmpeg`` installed by typing the following into the terminal:

.. code-block:: console
ffmpeg -version
If not, install:

.. code-block:: console
sudo apt install ffmpeg
**Set up a conda environment**

Next, follow the
`conda installation instructions <https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`_
to install the ``conda`` package for managing development environments.
Then, create a conda environment:

.. code-block:: console
conda create --name daart python=3.6
Active the new environment:

.. code-block:: console
conda activate daart
**Install daart**

.. note::

Make sure your conda environment is activated during the following steps.

1. Move into the directory where you want to place the repository folder, and download it from
github.

.. code-block:: console
git clone https://github.com/themattinthehatt/daart
2. Move into the newly created folder:

.. code-block:: console
cd daart
and install the package and all dependencies:

.. code-block::
pip install -e .
3. Verify that all the unit tests are passing on your machine by running

.. code-block:: console
pytest
The tests will take a minute or two to run.

4. To be able to use this environment for jupyter notebooks:

.. code-block:: console
python -m ipykernel install --user --name daart
26 changes: 24 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
from distutils.core import setup


VERSION = '1.0.1'
VERSION = '1.0.2'

# add the README.md file to the long_description
with open('README.md', 'r') as fh:
long_description = fh.read()

install_requires = [
'h5py',
'ipykernel',
'jupyter',
'matplotlib',
'numpy',
'opencv-python',
'pandas',
'pytest',
'pyyaml',
'scikit-learn',
'scipy>=1.2.0',
'seaborn',
'tables',
'test-tube',
'torch==1.8.0',
'tqdm',
'typeguard',
]

extras_require = {
'dev': {
'sphinx',
Expand All @@ -16,6 +36,7 @@
'sphinx-copybutton',
}
}

setup(
name='daart',
packages=['daart'],
Expand All @@ -26,6 +47,7 @@
author='matt whiteway',
author_email='',
url='http://www.github.com/themattinthehatt/daart',
install_requires=install_requires,
extras_require=extras_require,
keywords=['machine learning', 'action segmentation', 'computer_vision'],
keywords=['machine learning', 'action segmentation', 'computer vision'],
)

0 comments on commit e92fa62

Please sign in to comment.