From c0059f872a9e8e23b3cffa59d58ee7ecc0831748 Mon Sep 17 00:00:00 2001 From: roomrys <38435167+roomrys@users.noreply.github.com> Date: Tue, 19 Jul 2022 12:50:22 -0700 Subject: [PATCH] Update installation and labeling docs and no cuda yml --- .github/workflows/website.yml | 2 +- docs/installation.md | 22 ++++++++++-- ...sted-labeling.rst => assisted-labeling.md} | 35 +++++++++++-------- environment_no_cuda.yml | 16 +++++---- 4 files changed, 50 insertions(+), 25 deletions(-) rename docs/tutorials/{assisted-labeling.rst => assisted-labeling.md} (74%) diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index ea8e5ba56..7a0a67ec6 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -8,7 +8,7 @@ on: # 'main' triggers updates to 'sleap.ai', 'develop' to 'sleap.ai/develop' - main - develop - - david/add-CLI-to-render-videos + - liezl/docs-update paths: - "docs/**" - "README.rst" diff --git a/docs/installation.md b/docs/installation.md index 623e4f109..6bf7011b2 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -77,20 +77,36 @@ conda create -y -n sleap -c sleap -c nvidia -c conda-forge sleap=1.2.4 ### `conda` from source -1. First, clone the repository: +1. First, ensure git is installed: + + ```bash + git --version + ``` + + If 'git' is not recognized, then [install git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). + +2. Then, clone the repository: ```bash git clone https://github.com/talmolab/sleap && cd sleap ``` -2. Then, install from the environment file: +3. Finally, install from the environment file: + ```bash conda env create -f environment.yml -n sleap ``` + + If you do not have a NVIDIA GPU, then you should use the no CUDA environment file: + + ```bash + conda env create -f environment_no_cuda.yml -n sleap + ``` + This works on **Windows**, **Linux** and **Mac OS X** (pre-M1). This is the **recommended method for development**. ```{note} -- This install SLEAP in development mode, which means that edits to the source code will be applied the next time you run SLEAP. +- This installs SLEAP in development mode, which means that edits to the source code will be applied the next time you run SLEAP. - Change the `-n sleap` in the command to create an environment with a different name (e.g., `-n sleap_develop`). ``` diff --git a/docs/tutorials/assisted-labeling.rst b/docs/tutorials/assisted-labeling.md similarity index 74% rename from docs/tutorials/assisted-labeling.rst rename to docs/tutorials/assisted-labeling.md index 611d23109..f044b5500 100644 --- a/docs/tutorials/assisted-labeling.rst +++ b/docs/tutorials/assisted-labeling.md @@ -1,16 +1,21 @@ -.. _assisted-labeling: +--- +substitutions: + imagefix: |- + ```{image} ../_static/fixing-predictions.gif + ``` +--- -Prediction-assisted labeling -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +(assisted-labeling)= -*Prediction-assisted labeling* has two main goals. First, it speeds up the labeling +# Prediction-assisted labeling + +_Prediction-assisted labeling_ has two main goals. First, it speeds up the labeling process as it is faster to correct a predicted instance which is mostly correct than it is to add a new instance from scratch. Second, it provides feedback about where your model does well and where it does poorly, and this should give you a better idea of which frames will be most useful to label. - The GUI doesn’t yet give you a way to monitor the progress during inference, although it will alert you if an error occurs during inference. @@ -18,8 +23,7 @@ When inference finishes, you’ll be told how many instances were predicted. Suggested frames with predicted instances will be marked in red on the seekbar. -Reviewing and fixing predictions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Reviewing and fixing predictions After you’ve successfully trained models and predicted some instances, you’ll get a message that inference has finished. @@ -28,24 +32,27 @@ that you manually labeled will be marked with a thicker black line. (For "suggested" frames, manually labeled frames will have a dark blue line and predicted frames will have a lighter blue.) -Predicted instances will *not* be used for future model training unless you +Predicted instances will _not_ be used for future model training unless you correct the predictions in the GUI. -|imagefix| +{{ imagefix }} Predicted instances in the frame are displayed in grey with yellow nodes. To edit a prediction, you’ll need to replace it with an editable instance. **Double-click** the predicted instance and it will be converted into a regular instance. +:::{note} +All node labels on the regular instance will be colored red. +After moving nodes, the node labels will colored green. This is just a visual indicator +to keep track of which nodes have been moved from the original prediction. +::: + You can now edit the instance as before. Once you’ve added and/or corrected more instances, you can repeat the process: train a new model, predict on more frames, correct those predictions, and so on. You’ll want to regularly generate new frame suggestions, since active learning will return predictions for just these frames. -After you have accurate frame-by-frame prediction, you’re ready to predict for entire video clips and to track animal identities. We use a variety of heuristic algorithms for tracking identities across time (see :ref:`tracking-method-details` for more details). SLEAP also includes a graphical proof-reading tool for quickly assessing the accuracy of tracking and correcting problems. - - -Continue to :ref:`proofreading-tutorial`. +After you have accurate frame-by-frame prediction, you’re ready to predict for entire video clips and to track animal identities. We use a variety of heuristic algorithms for tracking identities across time (see {ref}`tracking-method-details` for more details). SLEAP also includes a graphical proof-reading tool for quickly assessing the accuracy of tracking and correcting problems. -.. |imagefix| image:: ../_static/fixing-predictions.gif \ No newline at end of file +Continue to {ref}`proofreading-tutorial`. diff --git a/environment_no_cuda.yml b/environment_no_cuda.yml index 8e213d314..04c740dcb 100644 --- a/environment_no_cuda.yml +++ b/environment_no_cuda.yml @@ -2,19 +2,21 @@ name: sleap dependencies: - python=3.7 - # - conda-forge::numpy>=1.19.5,<=1.21.5 - # - sleap::tensorflow>=2.6.3,<=2.7.1 - # - conda-forge::pyside2>=5.13.2,<=5.14.1 - # - conda-forge::h5py>=3.1.0,<=3.6.0 - # - conda-forge::scipy>=1.4.1,<=1.7.3 + - conda-forge::numpy>=1.19.5,<=1.21.5 + # - conda-forge::tensorflow>=2.6.3,<=2.7.1 + - conda-forge::pyside2>=5.13.2,<=5.14.1 + - conda-forge::h5py=3.1.0 + - conda-forge::scipy>=1.4.1,<=1.7.3 - pillow=8.4.0 - shapely=1.7.1 - # - conda-forge::pandas + - conda-forge::pandas - ffmpeg # - cudatoolkit=11.3.1 # - cudnn=8.2.1 # - nvidia::cuda-nvcc=11.3 + # - sleap::tensorflow=2.7.0 + # - sleap::pyside2=5.14.1 - conda-forge::pip<=22.0.3 - pip: - - "." + - "--editable=." - "--requirement=./dev_requirements.txt"