Term-Annotator is an application for media (video/images/gifs) annotation.
This application is installed on a laptop and is working locally. It is made for images/video/gifs manual classification in order to train machine learning on the database.
Basically, term annotator is only moving files from one directory to another in a local computer.
Term-annotator provides productivty tools for the annotator :
Load application with this link and unzip into term-annotator
folder
Load mediafiles to annotate and unzip into new folder
Run term-annotator.exe
file from term-annotator
folder
Import Configuration file:
4.1. Click on button Import Configuration File
4.2. in a new window CHOOSE CONFIGURATION FILE
choose your config file.
4.3. in a new window CHOOSE SOURCE DIRECTORY
choose folder with files to annotate
First image is displayed to start annotation.
when annotation of first image is done, annotated image will be automatically saved in newly created annotated
folder and removed from original folder where all the images are saved.
In annotated folder, image is being stored in folder with name-patterns like : <team-number>-<player-number>
and notVisible-notVisible-color
along with notPlayer
and other
folder.
Generate Annotation results
8.1 click on button Generate Result
8.2 save result as json file. See naming pattern here
NextImage
.Configuration parameters for the term-annotator are strored in a json file that should be loaded once app is started.
Configuration file should be shared with the annotator together with a data set before the annotation
EXAMPLE
{
"sort": true,
"source" : {
"dir": "my_directory",
"recursive": true,
"mediaType": "video",
"subDir":"toannotate"
"videoSplit": {
"startEndRegexp" : "\\w*-([0-9\\.]*)-([0-9\\.]*).mp4",
"splitKey": "!",
"minDuration": 2
},
"renaming": {
"from": "/",
"to": "_xxx_"
}
},
"destination": {
"destSubDir":"annotated"
},
"classes": {
"class-a": {
"key" : "a",
"dir": "myAnnotation/class-a"
},
"class-c": {
"key" : "c",
"dir": "myAnnotation/class-c-<%=isFoo%>-<%=isBar%>",
"params" : [{
"label": "Is it foo ?",
"name": "isFoo",
"choices": [{
"key": "Y",
"label": "yes",
"value": "fooTrue"
},{
"key": "N",
"label": "no",
"value": "fooFalse"
}]
}
}]
}
}
}
source | ||
---|---|---|
sort | if true the images are annotated in the filename alhpabetic order | |
dir | the input directory whis videos/images to annotate | |
recursive | play all videos from folder: true/false | |
mediaType | type of files (video/images) | |
videSplit | video splitting settings section | |
startEndRegexp | foramat of file's name | |
splitKey | key that should be pressed to split video | |
minDuration | minumum duration of splitted video degment | |
renaming | video renaming settings section | |
from | rename this sign | |
to | rename into this sign | |
classes | classes definition | ||
---|---|---|---|
class-name | class' configuration | ||
key | the keyboard key that do this action when pressed | ||
dir | the output directory where to move annotated images for this class | ||
params | additional params for sub questions to the class | ||
label | additional question for class | ||
name | the name to be used in ejs template | ||
choices | the available choices | ||
key | key that should be pressed to chose this class | ||
label | label of choise | ||
value | value to use in ejs template |
{
"epoch": "2019-10-25T11:13:02.723Z",
"folders": {
"dir-path" : {
"thumbnail": null,
"filenames": [
"a"
]
},
"termAnnotatorConfig": {...}
....
}
epoch
- an import timestamp
dir-path
- a path to dir for a category. Each annotated category has separate directory
filenames
- a list of files inside dir
thumbnail
- a thumbnail stored inside dir
termAnnotatorConfig
- a configuration for the correction workflow
{
"epoch": "2019-10-25T11:13:02.723Z",
"folders": {
"../annotated/1-5" : {
"thumbnail": null,
"filenames": [
"a",
"b",
"c",
"w"
]
},
...
"../annotated/notClean":
{
"filenames": [
"q",
"p",
"r",
"s"
],
"thumbnail": s.png
}
},
"termAnnotatorConfig": {
"sort": true,
"mediaType": "gif",
"source": {
"subDir": "toannotate",
"recursive": false
},
"destination": {
"destSubDir": "annotated"
},
"classes": {
"player01": {
"key": "1",
"dir": "1-1_TANx1-1_SMI"
}
}
}
Generate Result
<name-of-dataset/toannotate>
)<name-of-dataset/annotated>
)To package repo into application run:
- for Windows : `npm run package-windows`
- for Ubuntu: `npm run package-linux`
- for Windows : `./term-annotator-app-linux.zip`
- for Ubuntu: `./term-annotator-app-windows.zip`
Push new changes into master to release new version of app with Semantic-Release
Download app from Releases' assets: https://github.com/teamklap/term-annotator/releases
term-annotator-app-windows
assetterm-annotator-app-linux
assetunzip packaged app:
unzip
with zip manager WinRARunzip term-annotator-app-linux.zip -d .
run app:
term-annotator-win32-x64/term-annotator.exe
term-annotator-linux-x64/term-annotator