|
@@ -18,9 +18,10 @@
|
|
|
>
|
|
|
批量删除
|
|
|
</el-button>
|
|
|
- <el-button type="primary" icon="View" @click="showCompareResult"> 对比结果 </el-button>
|
|
|
+ <el-button type="primary" icon="View" @click="showCompareResult"> 验证指标对比 </el-button>
|
|
|
<!-- <el-button type="primary" icon="View" @click="showValResult(true)"> 验证结果 </el-button>-->
|
|
|
<el-button type="primary" icon="View" @click="showValResult(false)"> 测试结果 </el-button>
|
|
|
+ <el-button type="primary" icon="View" @click="showValResult(true)"> 验证结果 </el-button>
|
|
|
</template>
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="scope">
|
|
@@ -36,9 +37,13 @@
|
|
|
|
|
|
<el-button type="primary" link icon="finished" @click="showResult(scope.row)"> 执行结果 </el-button>
|
|
|
|
|
|
- <el-button v-show="scope.row.name.indexOf('训练') === -1" type="primary" link icon="search" @click="showExecutedTime(scope.row)"> 执行时间 </el-button>
|
|
|
+ <el-button v-show="scope.row.name.indexOf('训练') === -1" type="primary" link icon="search" @click="showExecutedTime(scope.row)">
|
|
|
+ 执行时间
|
|
|
+ </el-button>
|
|
|
|
|
|
- <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)"> 执行训练 </el-button>
|
|
|
+ <el-button v-if="scope.row.name.indexOf('训练') === -1" type="primary" link icon="Refresh" @click="reRunTask(scope.row)">
|
|
|
+ 执行训练
|
|
|
+ </el-button>
|
|
|
<el-button v-else type="primary" link icon="Refresh" @click="startTask(scope.row)"> 开始训练 </el-button>
|
|
|
|
|
|
<el-button type="primary" link icon="Refresh" @click="exportData(scope.row)"> 导出结果 </el-button>
|
|
@@ -57,14 +62,14 @@
|
|
|
|
|
|
<el-dialog v-model="executedTimeVisible" title="执行时间统计" width="70%">
|
|
|
<el-container v-for="(item, index) in executedTimeData" :key="index">
|
|
|
- <el-container style="display: flex;flex-direction: column">
|
|
|
- <h4 v-if="index === 0"> 单幅图像最短运行时间 </h4>
|
|
|
- <h4 v-else-if="index === 1"> 单幅图像最短运行时间 </h4>
|
|
|
- <h4 v-else-if="index === 2"> 单幅图像最短运行时间 </h4>
|
|
|
+ <el-container style="display: flex; flex-direction: column">
|
|
|
+ <h4 v-if="index === 0">单幅图像最短运行时间</h4>
|
|
|
+ <h4 v-else-if="index === 1">单幅图像最短运行时间</h4>
|
|
|
+ <h4 v-else-if="index === 2">单幅图像最短运行时间</h4>
|
|
|
<div style="display: flex; flex-direction: row">
|
|
|
- <h5> 前处理用时: {{ item['preprocess'] }} </h5>
|
|
|
- <h5> 推理用时: {{ item['inference'] }} </h5>
|
|
|
- <h5> 后处理用时: {{ item['postprocess'] }} </h5>
|
|
|
+ <h5>前处理用时: {{ item['preprocess'] }} </h5>
|
|
|
+ <h5>推理用时: {{ item['inference'] }} </h5>
|
|
|
+ <h5>后处理用时: {{ item['postprocess'] }}</h5>
|
|
|
</div>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
@@ -168,10 +173,10 @@
|
|
|
</el-card>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog v-model="compareDialogVisible" title="执行结果对比">
|
|
|
+ <el-dialog v-model="compareDialogVisible" title="验证指标对比">
|
|
|
<!-- style="width: 70vw"-->
|
|
|
<el-container style="display: flex; flex-direction: row">
|
|
|
- <el-container v-for="(item, index) in listData" :key="index" style="display: flex; flex-direction: column">
|
|
|
+ <el-container v-for="(item, index) in valListData" :key="index" style="display: flex; flex-direction: column">
|
|
|
<!-- <el-button @click="console.log(item)">test</el-button>-->
|
|
|
<span style="font-size: 18px"> {{ item.name }} </span>
|
|
|
<el-card :body-style="{ padding: '0px' }" style="margin-top: 3px">
|
|
@@ -212,16 +217,25 @@
|
|
|
<!-- <el-button @click="console.log(item)">test</el-button>-->
|
|
|
|
|
|
<el-container v-for="(_item, _index) in item" :key="_index">
|
|
|
- <span v-if="_item.name" style="width: 80px; margin-right: 20px"> {{ _item.name }} </span>
|
|
|
- <el-image v-if="_item.srcUrl" :src="_item.srcUrl" style=" width: 200px;height: 200px"></el-image>
|
|
|
+ <span
|
|
|
+ v-if="_item.name"
|
|
|
+ :style="{
|
|
|
+ color: _item.color ? _item.color : '#ffffff',
|
|
|
+ width: '80px',
|
|
|
+ 'margin-right': '20px'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ {{ _item.name }}
|
|
|
+ </span>
|
|
|
+ <el-image v-if="_item.srcUrl" :src="_item.srcUrl" style="width: 200px; height: 200px"></el-image>
|
|
|
<span v-if="_item.imgUrl">标签</span>
|
|
|
<ImgMaker
|
|
|
- style=" width: 200px;height: 200px"
|
|
|
+ :canvas-id="_item.name + '_' + _index"
|
|
|
+ style="width: 200px; height: 200px"
|
|
|
ref="imgMaker"
|
|
|
v-if="_item.imgUrl"
|
|
|
:is-pic-only="true"
|
|
|
:src="_item.imgUrl"
|
|
|
- :area="area"
|
|
|
:width="200"
|
|
|
:height="200"
|
|
|
:c-width="200"
|
|
@@ -229,7 +243,7 @@
|
|
|
:class-def="typeDefs"
|
|
|
:json-data="_item.jsonData"
|
|
|
></ImgMaker>
|
|
|
- <el-image v-if="_item.resUrl" :src="_item.resUrl" style=" width: 200px;height: 200px"></el-image>
|
|
|
+ <el-image v-if="_item.resUrl" :src="_item.resUrl" style="width: 200px; height: 200px"></el-image>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
@@ -270,24 +284,22 @@ const PATH_PREFIX = 'api/profile/task'
|
|
|
let resultDialogVisible = ref(false)
|
|
|
let refSelectData = ref(reactive({}))
|
|
|
const reRunTask = row => {
|
|
|
- http.post<any>('/identification/identificationSubtaskDetails/execute', { taskId: row.id }, { loading: false })
|
|
|
- .then(res => {
|
|
|
- if (res.code !== 200) {
|
|
|
- ElMessage.error(res.msg)
|
|
|
- } else {
|
|
|
- ElMessage.success('启动成功')
|
|
|
- }
|
|
|
- })
|
|
|
+ http.post<any>('/identification/identificationSubtaskDetails/execute', { taskId: row.id }, { loading: false }).then(res => {
|
|
|
+ if (res.code !== 200) {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ } else {
|
|
|
+ ElMessage.success('启动成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
const startTask = row => {
|
|
|
- http.post<any>('/identification/identificationSubtaskDetails/startTask', { taskId: row.id }, { loading: false })
|
|
|
- .then(res => {
|
|
|
- if (res.code !== 200) {
|
|
|
- ElMessage.error(res.msg)
|
|
|
- } else {
|
|
|
- ElMessage.success('启动成功')
|
|
|
- }
|
|
|
- })
|
|
|
+ http.post<any>('/identification/identificationSubtaskDetails/startTask', { taskId: row.id }, { loading: false }).then(res => {
|
|
|
+ if (res.code !== 200) {
|
|
|
+ ElMessage.error(res.msg)
|
|
|
+ } else {
|
|
|
+ ElMessage.success('启动成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
const typeDefs = ref(reactive([]))
|
|
|
|
|
@@ -323,7 +335,7 @@ const showExecutedTime = row => {
|
|
|
try {
|
|
|
executedTimeData.value = JSON.parse(row.remarks)
|
|
|
} catch (e) {
|
|
|
- ElMessage.error("解析JSON错误,请检查任务是否已完成")
|
|
|
+ ElMessage.error('解析JSON错误,请检查任务是否已完成')
|
|
|
return
|
|
|
}
|
|
|
executedTimeVisible.value = true
|
|
@@ -352,7 +364,7 @@ const showValResult = async isVal => {
|
|
|
jList[jList.length - 1] = 'txt'
|
|
|
let obj = {
|
|
|
name: res.data[j],
|
|
|
- srcUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/' + res.data[j]
|
|
|
+ srcUrl: 'api/profile/task' + listData.value[i].preprocessPath + (isVal ? '/images/' : '/') + res.data[j]
|
|
|
// imgUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/images/' + res.data[j],
|
|
|
// labelUrl: 'api/profile/task' + listData.value[i].preprocessPath + '/labels/' + jList.join('.')
|
|
|
}
|
|
@@ -371,27 +383,53 @@ const showValResult = async isVal => {
|
|
|
subPath: 'images'
|
|
|
})
|
|
|
console.log(res.data)
|
|
|
+ if (isVal) {
|
|
|
+ await loadVerifyResult(listData.value[i].name, '/profile/task' + listData.value[i].preprocessPath + '/result/verify_result.txt')
|
|
|
+ }
|
|
|
+ console.log('load result', verifyResult.value)
|
|
|
imgDataList.value.push([])
|
|
|
for (let j = 0; j < res.data.length; j++) {
|
|
|
+ console.log('temp log', verifyResult.value)
|
|
|
let jList = res.data[j].split('.')
|
|
|
jList[jList - 1] = 'txt'
|
|
|
imgDataList.value[imgDataList.value.length - 1].push({
|
|
|
resUrl: 'api/profile/task' + listData.value[i].resultPath + '/' + res.data[j],
|
|
|
- name: listData.value[i].name
|
|
|
+ name: listData.value[i].name,
|
|
|
+ picName: res.data[j],
|
|
|
+ color: verifyResult.value[res.data[j]] ? '#00ff00' : '#ff0000'
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- console.log(imgDataList)
|
|
|
+ console.log('datalist', imgDataList)
|
|
|
valDialogVisible.value = true
|
|
|
}
|
|
|
|
|
|
+const verifyResult = ref({})
|
|
|
+const loadVerifyResult = async (name, filepath) => {
|
|
|
+ // console.log('filepath', filepath)
|
|
|
+ try {
|
|
|
+ verifyResult.value = {}
|
|
|
+ let res = await http.get(filepath)
|
|
|
+ console.log(res)
|
|
|
+ // verifyResult.value[name] = {}
|
|
|
+ let arr = res.replace('\r', '').split('\n')
|
|
|
+ arr.forEach(str => {
|
|
|
+ let vals = str.split(' ')
|
|
|
+ verifyResult.value[vals[0]] = vals[1] === '1'
|
|
|
+ })
|
|
|
+ console.log('verifyResult', verifyResult.value)
|
|
|
+ } catch (e) {
|
|
|
+ verifyResult.value = {}
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const setDetail = obj => {
|
|
|
http.get<any>(obj.labelUrl).then(res => {
|
|
|
obj.jsonData = []
|
|
|
- console.log('result', res)
|
|
|
- let arr = res.split('\r\n')
|
|
|
- console.log(arr)
|
|
|
+ // console.log('result', res)
|
|
|
+ let arr = res.replace('\r', '').split('\n')
|
|
|
+ // console.log(arr)
|
|
|
for (let i = 0; i < arr.length; i++) {
|
|
|
let subArr = arr[i].split(' ')
|
|
|
// console.log(subArr)
|
|
@@ -407,6 +445,7 @@ const setDetail = obj => {
|
|
|
const ww = 200
|
|
|
const hh = 200
|
|
|
obj.jsonData.push({
|
|
|
+ subArr: subArr,
|
|
|
pathString:
|
|
|
'M ' +
|
|
|
subArr[1] * ww +
|
|
@@ -437,10 +476,15 @@ const setDetail = obj => {
|
|
|
}
|
|
|
|
|
|
let compareDialogVisible = ref(false)
|
|
|
+const valListData = ref([])
|
|
|
let listData = ref(reactive([]))
|
|
|
const showCompareResult = () => {
|
|
|
console.log(listData.value)
|
|
|
+ valListData.value = listData.value.filter(item => {
|
|
|
+ return item.name.includes('验证')
|
|
|
+ })
|
|
|
compareDialogVisible.value = true
|
|
|
+ console.log('vallist', valListData.value)
|
|
|
}
|
|
|
const showResult = row => {
|
|
|
refSelectData.value = reactive(row)
|