-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathTrackSettingsPanel.vue
More file actions
364 lines (358 loc) · 9.26 KB
/
Copy pathTrackSettingsPanel.vue
File metadata and controls
364 lines (358 loc) · 9.26 KB
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<script lang="ts">
import {
defineComponent,
reactive,
PropType,
ref,
computed,
} from 'vue';
import { clientSettings } from 'dive-common/store/settings';
import { useCameraStore } from '../../src/provides';
export default defineComponent({
name: 'TrackSettingsPanel',
props: {
allTypes: {
type: Array as PropType<Array<string>>,
required: true,
},
},
setup(props) {
const itemHeight = 45; // in pixels
const help = reactive({
mode: {
Track: 'Track Mode - advance a frame while drawing',
Detection: 'Detection Mode - Used to create multiple detections on a single frame.',
},
type: 'Choose a default type for the new Track/Detection to be or type in a new type to add it',
autoAdvanceFrame: 'After creating a track advance to the next frame. Hit Esc to exit.',
interpolate: 'Whether new tracks should have interpolation enabled by default',
continuous: 'Immediately stay in detection creation mode after creating a new track. Hit Esc to exit.',
prompt: 'Prompt user before deleting a track?',
stereoMatching: 'When manually adding detections, control whether to create a mirror feature in other cameras.',
filterTracksByFrame: 'Filter the track list by those with detections in the current frame',
autoZoom: 'Automatically zoom to the track when selected',
});
const modes = ref(['Track', 'Detection']);
// Add unknown as the default type to the typeList
const typeList = computed(() => ['unknown'].concat(props.allTypes));
const cameraStore = useCameraStore();
const multiCam = ref(cameraStore.camMap.value.size > 1);
return {
clientSettings,
itemHeight,
help,
modes,
typeList,
multiCam,
};
},
});
</script>
<template>
<div class="TrackSettings">
<v-card
outlined
class="pa-2"
width="300"
color="blue-grey darken-3"
>
<div class="subheading">
New Annotation Settings
</div>
<v-row
align="end"
dense
>
<v-col
class="mx-2 px-0"
cols="2"
>
Mode:
</v-col>
<v-col>
<v-select
v-model="clientSettings.trackSettings.newTrackSettings.mode"
class="ml-0 pa-0"
x-small
:items="modes"
dense
hide-details
/>
</v-col>
<v-col
cols="2"
align="right"
>
<v-tooltip
open-delay="200"
bottom
max-width="200"
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>
{{ help.mode[clientSettings.trackSettings.newTrackSettings.mode] }}
</span>
</v-tooltip>
</v-col>
</v-row>
<v-row
align="end"
dense
class="mb-2"
>
<v-col
class="mx-2"
cols="2"
>
Type:
</v-col>
<v-col>
<v-combobox
v-model="clientSettings.trackSettings.newTrackSettings.type"
class="ml-0 pa-0"
x-small
:items="typeList"
dense
hide-details
/>
</v-col>
<v-col
cols="2"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.type }}</span>
</v-tooltip>
</v-col>
</v-row>
<template v-if="clientSettings.trackSettings.newTrackSettings.mode === 'Track'">
<v-row>
<v-col class="py-1">
<v-switch
v-model="
clientSettings.trackSettings.newTrackSettings.modeSettings.Track.autoAdvanceFrame"
class="my-0 ml-1 pt-0"
dense
label="Advance Frame"
hide-details
/>
</v-col>
<v-col
class="py-1 shrink"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.autoAdvanceFrame }}</span>
</v-tooltip>
</v-col>
</v-row>
<v-row>
<v-col class="py-1">
<v-switch
v-model="
clientSettings.trackSettings.newTrackSettings.modeSettings.Track.interpolate"
class="my-0 ml-1 pt-0"
dense
label="Interpolate"
hide-details
/>
</v-col>
<v-col
class="py-1 shrink"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.interpolate }}</span>
</v-tooltip>
</v-col>
</v-row>
<v-row v-if="multiCam">
<v-col class="py-1">
<v-switch
v-model="
clientSettings.trackSettings.newTrackSettings.modeSettings.Track.stereoMatching"
class="my-0 ml-1 pt-0"
dense
label="Stereo Matching"
hide-details
/>
</v-col>
<v-col
class="py-1 shrink"
align="right"
>
<v-tooltip
open-delay="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.stereoMatching }}</span>
</v-tooltip>
</v-col>
</v-row>
</template>
<v-row
v-if="clientSettings.trackSettings.newTrackSettings.mode === 'Detection'"
>
<v-col class="py-1">
<v-switch
v-model="
clientSettings.trackSettings.newTrackSettings.modeSettings.Detection.continuous"
class="my-0 ml-1 pt-0"
dense
label="Continuous"
hide-details
/>
</v-col>
<v-col
class="py-1 shrink"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.continuous }}</span>
</v-tooltip>
</v-col>
</v-row>
<v-divider class="my-2" />
<div class="subheading">
Deletion Settings
</div>
<v-row
align="end"
dense
>
<v-col class="py-1">
<v-switch
v-model="clientSettings.trackSettings.deletionSettings.promptUser"
class="my-0 ml-1 pt-0"
dense
label="Prompt User"
hide-details
/>
</v-col>
<v-col
cols="2"
class="py-1"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.prompt }}</span>
</v-tooltip>
</v-col>
</v-row>
<v-divider class="my-2" />
<div class="subheading">
Track List Settings
</div>
<v-row
align="end"
dense
>
<v-col class="py-1">
<v-switch
v-model="clientSettings.trackSettings.trackListSettings.filterDetectionsByFrame"
class="my-0 ml-1 pt-0"
dense
label="Filter Detections By Frame"
hide-details
/>
</v-col>
<v-col
cols="2"
class="py-1"
align="right"
>
<v-tooltip
open-delay="200"
max-width="200"
bottom
>
<template #activator="{ on }">
<v-icon
small
v-on="on"
>
mdi-help
</v-icon>
</template>
<span>{{ help.filterTracksByFrame }}</span>
</v-tooltip>
</v-col>
</v-row>
</v-card>
</div>
</template>