Browse Source

提交自动标注的代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1
zouap 4 years ago
parent
commit
3eb0435540
2 changed files with 14 additions and 59 deletions
  1. +8
    -51
      public/self/labelTaskPage.js
  2. +6
    -8
      templates/repo/datasets/label/index.tmpl

+ 8
- 51
public/self/labelTaskPage.js View File

@@ -121,34 +121,7 @@ function countLabel(){
}

function display_createdatasetlabel(type){
var html="";
for (var i=0;i<dataSetTaskData.length;i++){
if (i==0){
var row = "<option value=\""+dataSetTaskData[i].id+
"\" selected=\"\">"+dataSetTaskData[i].task_name+
"</option>";
if(type == 1){
$("#autolabeltaskname").attr({value:dataSetTaskData[i].task_name + "-自动标注"});
}else{
$("#datasetlabeltaskname").attr({value:dataSetTaskData[i].task_name + "-人工标注"});
}
}else{
var row = "<option value=\""+dataSetTaskData[i].id+
"\">"+dataSetTaskData[i].task_name+
"</option>";
}
html=html+row;
}
console.log(html);
if(type ==1){
document.getElementById('dataset_list_auto').innerHTML=html;
}else{
document.getElementById('dataset_list').innerHTML=html;
}
}



function setPredictTask(){
@@ -187,11 +160,11 @@ function displayModelTask(){
for (var i=0;i<modelListData.length;i++){
if (i==0){
var row = "<option value=\""+modelListData[i].id+
"\" selected=\"\">"+modelListData[i].name+
"\" selected=\"\">"+modelListData[i].model_name +
"</option>";
}else{
var row = "<option value=\""+modelListData[i].id+
"\">"+modelListData[i].name+
"\">"+modelListData[i].model_name+
"</option>";
}
html=html+row;
@@ -199,8 +172,6 @@ function displayModelTask(){
console.log(html);

document.getElementById('model_list').innerHTML=html;
}


@@ -229,27 +200,13 @@ function dataset_sele_Change(sele){
$("#datasetlabeltaskname").attr({value:dataset_listName+"-人工标注"});
}



function display_createlabel(sindex=-1){
var html="";
for (var i=0;i<preDictTaskData.length;i++){
if (i==sindex){
var row = "<option value=\""+preDictTaskData[i].id+
"\" selected=\"\">"+preDictTaskData[i].task_name+
"</option>";
$("#labeltaskname").attr({value:preDictTaskData[i].task_name + "-人工标注"});
}else{
var row = "<option value=\""+preDictTaskData[i].id+
"\">"+preDictTaskData[i].task_name+
"</option>";
}
html=html+row;
}
console.log(html);
document.getElementById('pre_predict_task_for_label').innerHTML=html;
function dataset_auto_sele_Change(sele){
var dataset_listName = $('#dataset_list_auto option:selected').text();
console.log("select dataset_list_auto =" + dataset_listName);
$("#autolabeltaskname").attr({value:dataset_listName+"-自动标注"});
}


var createsucced;

function submit_datasettask(){


+ 6
- 8
templates/repo/datasets/label/index.tmpl View File

@@ -67,7 +67,6 @@
<div class="field">
<label for="exampleInputPassword1">选择数据集对象<font color=red>*</font></label>
<select name="pre_predict_task" id="dataset_list" onchange="dataset_sele_Change(this)">
<option value="" selected="">请选择</option>
{{if .Attachments}}
{{range .Attachments}}
<option value="{{.UUID}}">{{.Name}}</option>
@@ -122,7 +121,6 @@
<div class="field">
<label for="exampleInputPassword1">选择数据集对象<font color=red>*</font></label>
<select name="pre_predict_task" id="dataset_list_auto" onchange="dataset_auto_sele_Change(this)">
<option value="" selected="">请选择</option>
{{if .Attachments}}
{{range .Attachments}}
<option value="{{.UUID}}">{{.Name}}</option>
@@ -136,7 +134,7 @@
<option value="" selected="">请选择</option>
</select>
</div>
<div class="form-group">
<div class="field" >
<label for="exampleInputEmail1">自动标注任务名称<font color=red>*</font></label>
<input type="" class="form-control" id="autolabeltaskname" placeholder="标注任务名称,不超过32个字符" maxlength="32">
</div>
@@ -148,11 +146,11 @@
</select>
</div>

<div class="form-group" style="display:none">
<label id = "labelInfo" for="exampleInputFile">标注类别属性,请输入符合格式Json字符串 </label>
<select class="form-control" name="labelpropertytask" id="labelpropertytask_auto">
<option value="" selected="">请选择</option>
</select>
<div class="field" style="display:none">
<label id = "labelInfo" for="exampleInputFile">标注类别(也可以直接在标注界面上进行设置)</label>
<select name="labelpropertytask" id="labelpropertytask_dataset_auto" >
<option value="" selected="">请选择</option>
</select>
</div>
<button type="button" onclick="submit_autolabeltask();">提交</button>


Loading…
Cancel
Save