Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] UI improvements and Documentation Update #11

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
65efa02
fix multi-view
andybonnetto Sep 19, 2023
e281bac
Merge branch 'niels_bugfixes' of https://github.com/amathislab/dlc2ac…
andybonnetto Sep 19, 2023
725da6f
design branch
andybonnetto Oct 6, 2023
9cf817f
Remove "load last label" option
Ines-C-Amri Oct 7, 2023
cf91b37
Removed "save correction" option
Ines-C-Amri Oct 16, 2023
d7839dc
Removed "save correction" option
Ines-C-Amri Oct 16, 2023
004c774
Discard
Ines-C-Amri Oct 16, 2023
bb2f8b1
Discard
Ines-C-Amri Oct 16, 2023
de7dcb5
Removed "save correction" option
Ines-C-Amri Oct 16, 2023
51eac59
Removed "save correction" option
Ines-C-Amri Oct 16, 2023
82271b3
Adding "Set Labels" features
Ines-C-Amri Oct 16, 2023
ba7efd8
Set labels - Adding catDialog
Ines-C-Amri Oct 16, 2023
ee56292
Update README.md
AlexEMG Oct 18, 2023
53900db
Revert "Adding "Set Labels" features"
Ines-C-Amri Oct 20, 2023
3245fd9
Revert "Set labels - Adding catDialog"
Ines-C-Amri Oct 20, 2023
2148ede
Added UI for create / load project
Ines-C-Amri Oct 20, 2023
e86e185
Functionalities for Create/Load project
Ines-C-Amri Oct 20, 2023
a64183b
Create/Load project working features
Ines-C-Amri Oct 27, 2023
5dab648
Update README.md
InesAmri Oct 30, 2023
d571627
Update readme - added Table of content
InesAmri Oct 30, 2023
d0769c5
Load user set labels
Ines-C-Amri Oct 31, 2023
c5a5976
Added project creation functionalities
Ines-C-Amri Oct 31, 2023
7db894a
Bug: removed export examples and fixing open video workflow
Ines-C-Amri Oct 31, 2023
e075db9
Fixed change labels behaviour + other bugs
Ines-C-Amri Oct 31, 2023
d238516
Update annotator.py
Ines-C-Amri Nov 2, 2023
ba41405
Update README.md
Ines-C-Amri Nov 2, 2023
adce0f9
Added video links
Ines-C-Amri Nov 3, 2023
1c9dc12
Merge branch 'annotation-tutorials' into annotation_design
Ines-C-Amri Nov 3, 2023
b28a47c
--
Ines-C-Amri Nov 3, 2023
573946c
--rm
Ines-C-Amri Nov 3, 2023
12b0ab5
Corrected typos in Readme
Ines-C-Amri Nov 3, 2023
29fc5f5
Merge branch 'main' into annotation_design
Ines-C-Amri Dec 1, 2023
438af09
add "Select videos" button
Ines-C-Amri Dec 1, 2023
d29b02c
Add choice for users to copy video
Ines-C-Amri Dec 1, 2023
8494410
Fixed create_folder()
Ines-C-Amri Dec 1, 2023
08172d7
Update create project workflow
Ines-C-Amri Feb 17, 2024
0092318
Load DLC_resnet50.h5 files
Ines-C-Amri Feb 17, 2024
b43ee70
Added multi selection of videos skeleton files
Ines-C-Amri Feb 19, 2024
baeafd6
Updated matching of DLC files
Ines-C-Amri Feb 25, 2024
508b6be
User input saved to config
Ines-C-Amri Mar 7, 2024
6d73ea1
Updated project creation
Ines-C-Amri Mar 7, 2024
b3756e4
Fixed matching skeleton files with corresponding videos
Ines-C-Amri Mar 10, 2024
e92b9d2
Update following PR review
Ines-C-Amri Apr 7, 2024
1fdeaed
Data loading bug fixes
Ines-C-Amri Apr 22, 2024
2d4b487
file links and buttons conditions for windows
andybonnetto Jul 18, 2024
ba06bdf
resolve merge
andybonnetto Jul 18, 2024
9d3eb86
remove nested, change default config, reorganize project selection wi…
andybonnetto Jul 19, 2024
416f9eb
repare change labels
andybonnetto Jul 24, 2024
84a1a45
change create folder structure to exploit suffixes, postpone choice o…
andybonnetto Jul 25, 2024
a1f8031
found bug in annotation file variable declaration leading to wrong sa…
andybonnetto Jul 31, 2024
73c22fa
repair cancel button in project management windows, repair annotation…
andybonnetto Aug 1, 2024
51f5719
update animal selection, paths and dependency on pose file
andybonnetto Oct 13, 2024
901d72b
Fix animals, display animals, output_path,self.statusBar object, sequ…
andybonnetto Oct 21, 2024
4df3961
reinclude suggestion files, load anmals from pose files, fix small bugs
andybonnetto Oct 21, 2024
c5d48a5
add prediction file reading as suggestion file
andybonnetto Oct 22, 2024
77e0207
black
andybonnetto Oct 22, 2024
79c9892
remove print
andybonnetto Oct 22, 2024
37ae83a
update installation env
andybonnetto Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,10 @@ dmypy.json
#data
last_action_choice.pickle
/config.yaml
*.pickle
*.csv
*.npy
*.yaml
*.mp4
*.h5
*.txt
95 changes: 85 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,96 @@ conda activate dlc2action_gui

Further detailed in [Installation and updating](readme_media/installation.md).

## Quick Start
## Quick Start : Annotation Workflow Tutorial

Welcome to the Annotation Workflow Tutorial section, your comprehensive guide to mastering the annotation process. Below is a breakdown of the standard workflow, designed to ensure a seamless experience:

## Table of Contents

- [Setting up your environment](#Setting-up-your-environment)
- [Creating a project](#Creating-a-project)
- [Loading videos](#Loading-videos)
- [Handling videos](#Handling-videos)
- [Annotating videos](#Annotating-videos)
- [Add or modify labels](#Add-or-modify-labelss)
- [Saving your work](#Saving-your-work)
- [Opening a project](#Opening-a-project)
- [Change settings](#Change-settings)

## 1) Setting up your environment :

You can start using the interface by running the following commands in a terminal
```bash
conda activate dlc2action_gui
python annotator.py
```
The standard workflow is rather straightforward and involves
1) Loading videos
2) Setting labels and shortcuts
3) Annotating videos
4) Saving your work

You can find detail documentation on how to use the annotation tool in the
[Main user guide](readme_media/userguide.md)
## 2) Creating a project :
Once the application is launched, locate the option to create a new project.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it could be nice here to add some screenshots of the GUI

- Provide a title for your project
- Set the annotator's name
- Set your labels for the project and/or select existing labels
- Set a keyboard shortcut for your annotations to improve your workflow speed

Watch the tutorial [here](https://www.youtube.com/watch?v=iTTREcVEL4U).

## 3) Loading videos :
Once the project is created a window will open to prompt you to select your videos.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be a bit more clear - maybe a "select videos" button when creating the project?

I wasn't sure what I needed to select when the window first popped up

- You can select one or multiple videos
- If you select multiple videos you'll have the option to display them sequentially or in multiple view
- Select 'Yes' to display all videos conjointly (depending on the size of your videos this will take a few minutes)

## 4) Handling videos :
Actions you can perform:
- Play/stop (shortcut: space bar)
- Set video speed
- Select frames
- Move video frames using the hand icon
- Drag and zoom
- Clicking anywhere on the bar will take you to the corresponding frame
- If multiple animals are displayed and their key points have been uploaded, the animal that is being annotated is the one with the colored key point markers


## 5) Annotating videos :

Dive into detailed tutorials on the annotation process. Explore techniques for tagging and marking within videos.
- To annotate or handle your annotations you have to first select the action you want to perform then click on the annotation
- To create a new annotation, hit the + icon then drag the label below the video
- Modify any actions by clicking and dragging the edges of your annotation in the **Move** mode.
- Select the trash bin icon / press `Cmd + R` to delete an annotation
- Select the scissors icon / press `Cmd + C` to split an annotation in two
- Select the transparency icon / press `Cmd + B` to mark actions as ambiguous. In that case, the actions will be transparent on the action bar
- Select the label icon / press `Cmd + A` to change the annotation's label to another in the label's menu.

## Acknowledgments and Credits
Watch the tutorial [here](https://www.youtube.com/watch?v=QiTD5HngoVk).

The GUI was initially written by [Liza Kozlova](https://github.com/elkoz) in the [Mathis group](https://www.mathislab.org/). The GUI is still in development but fully operational on the main branch. Please reach out, or open an issue if you have questions! Collaborations are welcome.
## 6) Add, edit or delete labels :
- Use the keyboard shortcut cmd+L or go to "labels" then "Change labels"
- For nested annotation, you can choose a category by double-clicking it and going back to the categories list by pressing `Esc` or the 'Go back to categories' button.

Watch the tutorial [here](https://www.youtube.com/watch?v=yRKC_ppjWbw).

## 7) Saving your work :

The program should run smoothly, but please don't forget to save your results regularly by selecting the 'Save' action in the 'File' menu or pressing `Cmd + S`, just in case.

Backups for your annotated data are automatically created every **30 minutes** in a folder located next to your first video: `path/to/video1_backups`. You can change the directory
where backups are saved for your project, and the interval at which they are saved.
Running
```bash
python annotator.py --backup-dir /path/to/backups --backup-interval 120
```
will save backups every 2 hours (120 minutes) in the `/path/to/backups` folder.

The results of your work will be saved at `path/to/video1_annotation.pickle`. The `_annotation.pickle` suffix is the default, you can change it in the settings window (at Files / Annotation suffix). If you open a video that already has a corresponding annotation file in the same folder, that file will be loaded automatically. A human-readable version of the annotations will also be saved in CSV format (with the same suffix, and `.csv` extension).

## 8) Opening a project :
Once the application is launched, locate the option to open a project.
- Select your project folder then click open

Watch the tutorial [here](https://www.youtube.com/watch?v=etsFBnmiadc).

## 9) Change settings :

You can find detailed documentation on how to use the annotation tool in the
[Main user guide](readme_media/userguide.md)
Loading