File size: 5,905 Bytes
d21cb06
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Datumaro

<!--lint disable list-item-indent-->

## Table of contents

- [Concept](#concept)
- [RC 1 vision](#rc-1-vision)

## Concept

Datumaro is:
- a tool to build composite datasets and iterate over them
- a tool to create and maintain datasets
  - Version control of annotations and images
  - Publication (with removal of sensitive information)
  - Editing
  - Joining and splitting
  - Exporting, format changing
  - Image preprocessing
- a dataset storage
- a tool to debug datasets
  - A network can be used to generate
    informative data subsets (e.g. with false-positives)
    to be analyzed further

### Requirements

- User interfaces
  - a library
  - a console tool with visualization means
- Targets: single datasets, composite datasets, single images / videos
- Built-in support for well-known annotation formats and datasets:
    CVAT, COCO, PASCAL VOC, Cityscapes, ImageNet
- Extensibility with user-provided components
- Lightweightness - it should be easy to start working with Datumaro
  - Minimal dependency on environment and configuration
  - It should be easier to use Datumaro than writing own code
    for computation of statistics or dataset manipulations

### Functionality and ideas

- Blur sensitive areas on dataset images
- Dataset annotation filters, relabelling etc.
- Dataset augmentation
- Calculation of statistics:
  - Mean & std, custom stats
- "Edit" command to modify annotations
- Versioning (for images, annotations, subsets, sources etc., comparison)
- Documentation generation
- Provision of iterators for user code
- Dataset downloading
- Dataset generation
- Dataset building (export in a specific format, indexation, statistics, documentation)
- Dataset exporting to other formats
- Dataset debugging (run inference, generate dataset slices, compute statistics)
- "Explainable AI" - highlight network attention areas ([paper](https://arxiv.org/abs/1901.04592))
  - Black-box approach
    - Classification, Detection, Segmentation, Captioning
    - White-box approach

### Research topics

- exploration of network prediction uncertainty (aka Bayessian approach)
  Use case: explanation of network "quality", "stability", "certainty"
- adversarial attacks on networks
- dataset minification / reduction
  Use case: removal of redundant information to reach the same network quality with lesser training time
- dataset expansion and filtration of additions
  Use case: add only important data
- guidance for key frame selection for tracking ([paper](https://arxiv.org/abs/1903.11779))
  Use case: more effective annotation, better predictions

## RC 1 vision

In the first version Datumaro should be a project manager for CVAT.
It should only consume data from CVAT. The collected dataset
can be downloaded by user to be operated on with Datumaro CLI.

<!--lint disable fenced-code-flag-->
```
        User
          |
          v
 +------------------+
 |       CVAT       |
 +--------v---------+       +------------------+       +--------------+
 | Datumaro module  | ----> | Datumaro project | <---> | Datumaro CLI | <--- User
 +------------------+       +------------------+       +--------------+
```
<!--lint enable fenced-code-flag-->

### Interfaces

- [x] Python API for user code
  - [x] Installation as a package
- [x] A command-line tool for dataset manipulations

### Features

- Dataset format support (reading, writing)
  - [x] Own format
  - [x] CVAT
  - [x] COCO
  - [x] PASCAL VOC
  - [x] YOLO
  - [x] TF Detection API
  - [ ] Cityscapes
  - [ ] ImageNet

- Dataset visualization (`show`)
  - [ ] Ability to visualize a dataset
    - [ ] with TensorBoard

- Calculation of statistics for datasets
  - [x] Pixel mean, std
  - [x] Object counts (detection scenario)
  - [x] Image-Class distribution (classification scenario)
  - [x] Pixel-Class distribution (segmentation scenario)
  - [ ] Image similarity clusters
  - [ ] Custom statistics

- Dataset building
  - [x] Composite dataset building
  - [x] Class remapping
  - [x] Subset splitting
  - [x] Dataset filtering (`extract`)
  - [x] Dataset merging (`merge`)
  - [ ] Dataset item editing (`edit`)

- Dataset comparison (`diff`)
  - [x] Annotation-annotation comparison
  - [x] Annotation-inference comparison
  - [x] Annotation quality estimation (for CVAT)
    - Provide a simple method to check
      annotation quality with a model and generate summary

- Dataset and model debugging
  - [x] Inference explanation (`explain`)
  - [x] Black-box approach ([RISE paper](https://arxiv.org/abs/1806.07421))
  - [x] Ability to run a model on a dataset and read the results

- CVAT-integration features
  - [x] Task export
    - [x] Datumaro project export
    - [x] Dataset export
    - [x] Original raw data (images, a video file) can be downloaded (exported)
      together with annotations or just have links
      on CVAT server (in future, support S3, etc)
      - [x] Be able to use local files instead of remote links
        - [ ] Specify cache directory
  - [x] Use case "annotate for model training"
    - create a task
    - annotate
    - export the task
    - convert to a training format
    - train a DL model
  - [x] Use case "annotate - reannotate problematic images - merge"
  - [x] Use case "annotate and estimate quality"
    - create a task
    - annotate
    - estimate quality of annotations

### Optional features

- Dataset publishing
  - [ ] Versioning (for annotations, subsets, sources, etc.)
  - [ ] Blur sensitive areas on images
  - [ ] Tracking of legal information
  - [ ] Documentation generation

- Dataset building
  - [ ] Dataset minification / Extraction of the most representative subset
    - Use case: generate low-precision calibration dataset

- Dataset and model debugging
  - [ ] Training visualization
  - [ ] Inference explanation (`explain`)
    - [ ] White-box approach

### Properties

- Lightweightness
- Modularity
- Extensibility