diff --git a/src/app.html b/src/app.html index 72b061432923a0a3ee28c486beafb3d590f68feb..e5db8fcd2d28b60a5204634f573b7bf6ec63be66 100644 --- a/src/app.html +++ b/src/app.html @@ -729,7 +729,7 @@ <div class="form-check form-switch"> <input class="form-check-input" type="checkbox" role="switch" id="settings_showScore" onchange="settings.showScore()" /> - <label class="form-check-label" for="settings_showScore">Show score (AI) in annotation + <label class="form-check-label" for="settings_showScore">Show confidence score in annotation list <small>(if the region is AI processed)</small> </label> </div> @@ -750,16 +750,16 @@ <div class="row mb-3 p-3"> <div class="card"> <div class="card-body"> - <h5 class="card-title">Scoring (AI)</h5> + <h5 class="card-title">Confidence Score (AI)</h5> <div class="col-auto"> - <label for="settings_scoring" class="col-form-label">Score threshold</label> + <label for="settings_scoring" class="col-form-label">Confidence score threshold</label> <input type="text" class="form-control" id="settings_scoring" placeholder="E.g. 0.1" /> </div> <div class="col-auto mt-2"> <div class="form-check form-switch"> <input class="form-check-input" type="checkbox" role="switch" id="settings_showScoreColor" onchange="settings.showScoreColor()" /> - <label class="form-check-label" for="settings_showScoreColor">Show score color in + <label class="form-check-label" for="settings_showScoreColor">Show confidence score color in annotation list <small>(if the region is AI processed)</small> </label> </div> diff --git a/src/js/servercom.js b/src/js/servercom.js index a7ba4225269f79c08ceb32335a2966944baac72c..c28173e8e32c005ee497b7d5bb60edf7eb891c90 100644 --- a/src/js/servercom.js +++ b/src/js/servercom.js @@ -73,8 +73,6 @@ Annotate.prototype.annotate_single_img = async function () { this.setProgressBar(this.progressNum); let image_index = _via_image_index; let img_id = _via_image_id_list[image_index]; - const imageElement = $("#bim" + image_index)[0]; - const imageBlob = await this.getImageBlobFromElement(imageElement); await this.isAnnotated(img_id).then((res) => { }); switch (this.reAnnotateCommand) { @@ -91,6 +89,8 @@ Annotate.prototype.annotate_single_img = async function () { default: break; } + const imageElement = $("#bim" + image_index)[0]; + const imageBlob = await this.getImageBlobFromElement(imageElement); await this.sendImage( imageBlob, _via_img_metadata[_via_image_id_list[image_index]].filename @@ -332,9 +332,12 @@ Annotate.prototype.sendImage = async function (img_blob, img_filename) { } zoom.resetZoom(); for (let file in response) { - let img_id = - _via_image_id_list[_via_image_filename_list.indexOf(file)]; - AutoAnnotator.addAnnotations(img_id, response[file]); + if(!file){ + continue; + } + let img_id = + _via_image_id_list[_via_image_filename_list.indexOf(file)]; + AutoAnnotator.addAnnotations(img_id, response[file]); } AutoAnnotator.setAllItemSuccess(); Message.show({ @@ -429,11 +432,14 @@ Annotate.prototype.sendImageAll = async function () { } zoom.resetZoom(); for (let file in response) { - let img_id = _via_image_id_list[_via_image_filename_list.indexOf(file)]; - if (reannotate) { - _via_img_metadata[img_id].regions = []; - } - AutoAnnotator.addAnnotations(img_id, response[file]); + if(!file){ + continue; + } + let img_id = _via_image_id_list[_via_image_filename_list.indexOf(file)]; + if (reannotate) { + _via_img_metadata[img_id].regions = []; + } + AutoAnnotator.addAnnotations(img_id, response[file]); } AutoAnnotator.setAllItemSuccess(); }.bind(this), diff --git a/src/js/settings.js b/src/js/settings.js index cf11b73eb9df7ca332a8c569f817e5c540aa10fd..76d0ccd62a4ebbd86937100d1e97f618f4bb6ca1 100644 --- a/src/js/settings.js +++ b/src/js/settings.js @@ -26,8 +26,8 @@ class Settings { this.is_scrolling = $("#settings_scrollToRow").is(":checked"); // attribute panel - this.attributeShowScore = false; - this.attributeShowScoreColor = false; + this.attributeShowScore = true; + this.attributeShowScoreColor = true; this.attributeShowPixelArea = false; this.attributeShowFile = false;