owned this note
owned this note
Published
Linked with GitHub
---
title: 'NTUT Action Labeling Tutorial'
disqus: hackmd
---
NTUT Action Labeling Tutorial
===
[TOC]
## Goal
This homework is to label human actions in drone videos. There are two tasks:
1. Label the actions of all humans
2. Label ID of each human and use auto-track to track all the humans. The actions have already been labelled
## Labeling Steps (Abstract)
1. Install [NTUT VoTT v0.0.7](https://drive.google.com/file/d/1DsavbWK5Ly8vZCAcbyCEPsk3zpRld34C/view?usp=share_link)
1. Add security token to VoTT
**Name**: NTUTDrone Token
**Key**: qITjd1Rj6hFqC7uB0OGxPKYVxIFSdcMrprQAMS5rEhc=
1. Download your assigned drone videosand labeling project files from:
[DroneVideos](https://1drv.ms/u/s!Ai-UtXZ5g88lk-kbP-BXnWeb5w30Vg?e=mRq1OS)
[VoTT Projects](https://1drv.ms/u/s!Ai-UtXZ5g88lk7AYqTW3x57h9gi1hQ?e=zaSrYz)
1. Create two folders: **"C:\Drone_Target\"** and **"C:\Drone_Source\"**
1. Extract the VoTT project zip file under **"C:\Drone_Target\"**
1. Put the drone video to **"C:\Drone_Source\"** (Make sure that ONLY your target video is in this folder)
1. Open VoTT project file (e.g. **"C:\Drone_Target\Drone_015\Drone_015.vott"**)
1. Label actions or human IDs
1. Export your work as csv
1. zip your project folder **"C:\Drone_Target\Drone_015\"** and upload to [Taipei Tech i-Study](https://istudy.ntut.edu.tw/)
## Setup
### Installing tool (NTUT VoTT)
Microsoft VoTT (Visual Object Tagging Tool) is an open source tool for labeling visual objects ([GitHub](https://github.com/microsoft/VoTT)). NTUT VoTT is developed by AIoT Lab, which add OpenCV object tracking algorithms to automatically track objects ([GitHub](https://github.com/masteree108/VoTT_NTUT_UBU18)). Please feel free to join us if you are interested in this project. ([Documents](https://hackmd.io/@NTUTVOTT))
Download the latest version of NTUT VoTT here:
1. Download NTUT_VoTT_v0.0.4.zip ([NTUT VoTT download](https://drive.google.com/drive/u/0/folders/1itcrh_g4PfrYRhOaKfQV85gd5g9w7cSa))
2. Extract the zip file to C:\
3. Execute **vott.exe**
### Adding security token to VoTT
Add the security token:
:::warning
Name: NTUTDrone Token
Key: qITjd1Rj6hFqC7uB0OGxPKYVxIFSdcMrprQAMS5rEhc=
:::

### Downloading the assigned video and project file (*.vott)
Download your assigned drone videos and labeling project files from:
[DroneVideos](https://drive.google.com/drive/folders/1VCM0J8mkNEFt3fMp-v-T0JeXdgNTbjeX)
[VoTT Projects](https://1drv.ms/u/s!Ai-UtXZ5g88lk-ZUtN0L_BB5m7oI0A?e=bhJ8Pu")
Your assignment is listed in previous section [Assignments](#Assignments)
### Putting the video "C:\Drone_Source\\" and extract the project zip file in "C:\Drone_Target\\"
Download and save the video **Drone_0XX.mp4** to "C:\Drone_Source\\".
Download the project zip file **Drone_0XX.zip** and extract the zip file in "C:\Drone_Target\\". The *.vott file should be in "C:\Drone_Target\Drone_0XX\\"
Example: Using video Drone_027
```
Source:
C:\Drone_Source\Drone_027.mp4
```

```
Target:
C:\Drone_Target\Drone_027\Drone_027.vott
```

### Using NTUT VOTT to open the target project
Click "Open Local Project". If your project was labelled by other people before, you will see many json files. You can sort files by Type to find your *.vott project file.

VoTT will start playing the video, stop the video. If your task is labeling actions, then there is no bounding boxes. If your task is tracking, you will see the action labels and bounding boxes.
## Labeling Tutorials
### Labeling human actions
Chinese tutorial: [VoTT使用教學](https://hackmd.io/@rkK3svDySo2BlzyaUnj66A/rkS1R4XSL)

We already have 13 different actions. Please select each human and add corresponding action tags to its boudning boxes:
1. stand
1. walk
1. sit
1. watchphone
1. basketball
1. baseball
1. riding
1. jump
1. push
1. skateboard
1. handstand
1. soccer
1. fishing
1. slide
1. seesaw
1. swing
1. dancce
You can add new action tags if necessary.
Sometimes the objects (humans) may be blocked. In this case, we need to label the occlusion rate.
1. block25 (Object is blocked 25~50%)
1. block50 (Object is blocked 50~75%)
1. block75 (Object is blocked 75~90%)
#### Draw Bounding Boxes
1. Select "Draw Rectangle"

1. Object selected!

1. Add action tag (Click action for adding, click again for cancelling). You can add more than one tag.

1. View the tags by stopping cursors on the rectangle

1. Once you've labeled all actions in current frame. Move to next frame. You can copy and paste all boxes and adjust the sizes.
### Tracking and labeling human IDs
Chinese tutorial: [使用NTUT版本的vott.exe進行標註](https://hackmd.io/WPFFvqCyTR69BIme3kiLYw)
The task is to assign an ID to each object (human), and track its positions in next several frames. Because drones are moving fast, so auto-tracking is difficult. Our goal is to use auto-track to track objects first, and manually fix the misses or errors if necessary. The steps are:
1. Create a new tage id_??? (ex: id_001) for each object.
1. Add the tag to the bounding boxes.
1. Run "Auto Track"
1. Check and fix the miss trackings or errors
Video example:
{%youtube wWEyVSttrYE %}
#### Auto-tracking

If in your VoTT project, frameRate=5, then:
(1) Enter 0 will track 1 frame
* Press "auto track" button will track the next (4th) frame
(2) Tracking more frames by entering corresponding numbers
* If input is 1 at 3rd frame, Press "auto track" button will track the 4th、5th frames
* If input is 2 at 3rd frame, Press "auto track" button will track the 4th、5th frames, and all the next 5 frames.
:::danger
Note! You need to press **d** (next frame) to save the tracking results in VoTT's momoery. Remeber to press next frame to save and check tracking results.
:::
#### Error Handling for Tracking
1. No human ID

1. Duplicated ID

1. System failure

Please check the error log
C:\VoTT\VoTT_NTUT\WIN10\NTUT\log\log.txt
1. If you got the following messages "tracking object id_xxx failed...". There are two situations:
(1) Tracking out of range.Just remove the bounding boxes. For example, id_002 is not visiable anymore:

(2) The bounding box may be too small, please resize the box and try again. If the error still exists, remove the box. For example, the id_002 box is tto small for tracking:

## Upload your work
Once you finish, please zip your project folder (ex: **"C:\Drone_Target\Drone_XXX\"**) to **Drone_XXX.zip**, and upload the zip file to the [cloud folder](https://1drv.ms/u/s!Ai-UtXZ5g88lk-ZN7zMcWVJHsi1V_g?e=Iy3nnl)