|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="options-bar">
|
|
|
<div ref="draw_box"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="draw bounding box (Q)"
|
|
|
:class="{active: interaction === 'draw-box'}"
|
|
|
@click="$emit('interaction', 'draw-box')">
|
|
@@ -10,7 +10,7 @@
|
|
|
|
|
|
|
|
|
<div ref="estimate_box"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="estimate bounding box (W)"
|
|
|
:class="{active: interaction === 'estimate-box'}"
|
|
|
@click="$emit('interaction', 'estimate-box')">
|
|
@@ -18,7 +18,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div ref="extreme_clicking"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="extreme clicking (E)"
|
|
|
:class="{active: interaction === 'extreme-clicking'}"
|
|
|
@click="$emit('interaction', interaction === 'extreme-clicking' ? 'draw-box' : 'extreme-clicking')">
|
|
@@ -30,7 +30,7 @@
|
|
|
<div class="spacer"/>
|
|
|
|
|
|
<div ref="move_box"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="move and resize bounding box (R)"
|
|
|
:class="{active: interaction === 'move-box'}"
|
|
|
@click="$emit('interaction', 'move-box')">
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<div v-if="labelsEnabled"
|
|
|
ref="labels"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="label bounding box (T)"
|
|
|
:class="{active: interaction === 'label-box'}"
|
|
|
@click="$emit('labelSelector')">
|
|
@@ -47,15 +47,23 @@
|
|
|
</div>
|
|
|
|
|
|
<div ref="confirm_box"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="confirm bounding box (G)"
|
|
|
:class="{active: interaction === 'confirm-box'}"
|
|
|
@click="$emit('interaction', 'confirm-box')">
|
|
|
<img alt="confirm bounding box" src="@/assets/icons/check-circle.svg">
|
|
|
</div>
|
|
|
|
|
|
+ <div ref="confirm_all"
|
|
|
+ class="icon"
|
|
|
+ title="confirm all bounding boxes (H)"
|
|
|
+ :class="{active: interaction === 'confirm-box'}"
|
|
|
+ @click="confirmAll">
|
|
|
+ <img alt="confirm all bounding boxes" src="@/assets/icons/check-all.svg">
|
|
|
+ </div>
|
|
|
+
|
|
|
<div ref="remove_box"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="remove bounding box (F)"
|
|
|
:class="{active: interaction === 'remove-box'}"
|
|
|
@click="$emit('interaction', 'remove-box')">
|
|
@@ -65,7 +73,7 @@
|
|
|
<div class="spacer"/>
|
|
|
|
|
|
<div ref="crop_info"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="Show info of a bounding box (I)"
|
|
|
:class="{active: interaction === 'info-box'}"
|
|
|
@click="$emit('interaction', 'info-box')">
|
|
@@ -74,7 +82,7 @@
|
|
|
|
|
|
<!--
|
|
|
<div ref="zoom_annotation"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="zoom bounding box (X)"
|
|
|
:class="{active: interaction === 'zoom-box' || zoomBox}"
|
|
|
@click="$emit(zoomBox ? 'unzoom' : 'interaction', 'zoom-box')">
|
|
@@ -82,14 +90,14 @@
|
|
|
</div>
|
|
|
|
|
|
<div ref="zoom_prev_annotation"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="zoom previous bounding box (C)"
|
|
|
@click="$emit('prevzoom', true)">
|
|
|
<img alt="zoom previous bounding box" src="@/assets/icons/chevron-left.svg">
|
|
|
</div>
|
|
|
|
|
|
<div ref="zoom_next_annotation"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="zoom next bounding box (V)"
|
|
|
@click="$emit('nextzoom', true)">
|
|
|
<img alt="zoom next bounding box" src="@/assets/icons/chevron-right.svg">
|
|
@@ -99,7 +107,7 @@
|
|
|
<div class="spacer"/>
|
|
|
|
|
|
<div ref="show_user_annotations"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="show user annotations"
|
|
|
:class="{active: filter && filter.includes('user')}"
|
|
|
@click="invertFilter('user')">
|
|
@@ -107,7 +115,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div ref="show_pipeline_annotations"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="show pipeline annotations"
|
|
|
:class="{active: filter && filter.includes('pipeline')}"
|
|
|
@click="invertFilter('pipeline')">
|
|
@@ -117,7 +125,7 @@
|
|
|
<div class="spacer"/>
|
|
|
|
|
|
<div ref="create_predictions"
|
|
|
- class="image"
|
|
|
+ class="icon"
|
|
|
title="create predictions (B)"
|
|
|
:class="{active: isPredictionRunning}"
|
|
|
@click="predict">
|
|
@@ -177,14 +185,17 @@ export default {
|
|
|
else
|
|
|
this.$emit('filter', [...this.filter, name]);
|
|
|
},
|
|
|
+
|
|
|
predict: function () {
|
|
|
- if (!this.isPredictionRunning) {
|
|
|
- // TODO then / error
|
|
|
- this.$root.socket.post(`/data/${this.file.identifier}/predict`, {
|
|
|
- predict: true
|
|
|
- });
|
|
|
- }
|
|
|
+ if (this.isPredictionRunning)
|
|
|
+ return
|
|
|
+ this.$emit("predict", this.file.identifier);
|
|
|
},
|
|
|
+
|
|
|
+ confirmAll: function() {
|
|
|
+ this.$emit("confirmAll", this.file.identifier);
|
|
|
+ },
|
|
|
+
|
|
|
keypressEvent: function (event) {
|
|
|
switch (event.key) {
|
|
|
case 'r':
|
|
@@ -209,7 +220,10 @@ export default {
|
|
|
case 'g':
|
|
|
this.$refs.confirm_box.click();
|
|
|
break;
|
|
|
- case 'b':
|
|
|
+ case 'h':
|
|
|
+ this.$refs.confirm_all.click();
|
|
|
+ break;
|
|
|
+ case 'p':
|
|
|
this.$refs.create_predictions.click();
|
|
|
break;
|
|
|
case 'i':
|
|
@@ -260,10 +274,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
.spacer {
|
|
|
- border-top: 1px solid rgba(255, 255, 255, 0.25);
|
|
|
+ border-top: 2px solid rgba(255, 255, 255, 0.25);
|
|
|
}
|
|
|
|
|
|
-.image {
|
|
|
+.icon {
|
|
|
display: flex;
|
|
|
justify-content: center;
|
|
|
align-items: center;
|
|
@@ -278,9 +292,12 @@ export default {
|
|
|
height: 1.6rem;
|
|
|
}
|
|
|
|
|
|
-.image.active {
|
|
|
+.icon.active {
|
|
|
background-color: rgba(0, 0, 0, 0.2);
|
|
|
- box-shadow: inset 0 0 5px 0 rgba(0, 0, 0, 0.2);
|
|
|
+}
|
|
|
+
|
|
|
+.icon:hover {
|
|
|
+ background-color: rgba(0, 0, 0, 0.3);
|
|
|
}
|
|
|
|
|
|
img {
|