update upload inference
This commit is contained in:
parent
84520ef566
commit
e8d1e88e13
@ -88,7 +88,7 @@ export default {
|
|||||||
"mtl_path": seqData.mtl_path,
|
"mtl_path": seqData.mtl_path,
|
||||||
}
|
}
|
||||||
this.seq_frame_data = seqData.seq_frame_data;
|
this.seq_frame_data = seqData.seq_frame_data;
|
||||||
this.model_pts = seqData.model_pts;
|
//this.model_pts = seqData.model_pts;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ export default {
|
|||||||
new_point_cloud: [],
|
new_point_cloud: [],
|
||||||
|
|
||||||
best_seq: null,
|
best_seq: null,
|
||||||
|
hasImg: false,
|
||||||
|
|
||||||
curr_frame_info: {
|
curr_frame_info: {
|
||||||
"step": 0,
|
"step": 0,
|
||||||
@ -112,8 +113,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
seqFrameData(val) {
|
seqFrameData(val) {
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
this.rpCurrDepth = val[0].data.depth;
|
// this.rpCurrDepth = val[0].data.depth;
|
||||||
this.rpCurrMask = val[0].data.mask;
|
// this.rpCurrMask = val[0].data.mask;
|
||||||
this.curr_step = 0;
|
this.curr_step = 0;
|
||||||
this.curr_frame_info["step"] = 0;
|
this.curr_frame_info["step"] = 0;
|
||||||
this.curr_frame_info["frame_id"] = val[0]["frame_id"];
|
this.curr_frame_info["frame_id"] = val[0]["frame_id"];
|
||||||
@ -131,8 +132,8 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
curr_step (val) {
|
curr_step (val) {
|
||||||
this.rpCurrDepth = this.seqFrameData[val]["data"]["depth"];
|
// this.rpCurrDepth = this.seqFrameData[val]["data"]["depth"];
|
||||||
this.rpCurrMask = this.seqFrameData[val]["data"]["mask"];
|
// this.rpCurrMask = this.seqFrameData[val]["data"]["mask"];
|
||||||
this.curr_frame_info["step"] = val;
|
this.curr_frame_info["step"] = val;
|
||||||
this.curr_frame_info["frame_id"] = this.seqFrameData[val]["frame_id"];
|
this.curr_frame_info["frame_id"] = this.seqFrameData[val]["frame_id"];
|
||||||
this.curr_frame_info["coverage_rate"] = this.seqFrameData[val]["data"]["coverage_rate"];
|
this.curr_frame_info["coverage_rate"] = this.seqFrameData[val]["data"]["coverage_rate"];
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<p style="font-size: 16px; color: #464c5b; font-weight: bold;">Select Inference Result:</p>
|
<p style="font-size: 16px; color: #464c5b; font-weight: bold;">Select Inference Result:</p>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span="12">
|
<Col span="12">
|
||||||
<Select v-model="localSceneName" style="width: 100%;" @on-change="handleSceneChange"
|
<Select v-model="localSceneName" style="width: 100%;"
|
||||||
placeholder="please select..." :disabled="localDisableBtn" disabled>
|
placeholder="please select..." :disabled="localDisableBtn" disabled>
|
||||||
<Option v-for="item in sceneNameList" :value="item" :key="item">{{ item }}</Option>
|
<Option v-for="item in sceneNameList" :value="item" :key="item">{{ item }}</Option>
|
||||||
</Select>
|
</Select>
|
||||||
@ -53,24 +53,38 @@
|
|||||||
<Row style="width: 100%;">
|
<Row style="width: 100%;">
|
||||||
<Col style="margin-bottom: 10px; margin-left: 10px; margin-right: 10px; width: 100%;">
|
<Col style="margin-bottom: 10px; margin-left: 10px; margin-right: 10px; width: 100%;">
|
||||||
<p>
|
<p>
|
||||||
<Badge status="success" /><span style="font-weight: bold;">sequence length</span>: {{ localSeqLen }}
|
<Badge status="success" /><span style="font-weight: bold;">pred sequence length</span>: {{ localSeqLen }}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<Badge status="success" /><span style="font-weight: bold;">gt sequence length</span>: {{ localBestSeqLen }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<Badge status="success" /><span style="font-weight: bold;">max coverage rate</span>: {{ localMaxCoverageRate
|
<Badge status="success" /><span style="font-weight: bold;">max coverage rate</span>: {{ localMaxCoverageRate
|
||||||
}}%
|
}}%
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<Badge status="success" /><span style="font-weight: bold;">best sequence length</span>: {{ localBestSeqLen }}
|
<Badge status="success" /><span style="font-weight: bold;">pred max coverage rate</span>: {{ localPredMaxCoverageRate
|
||||||
|
}}%
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p v-if="duplicatedFrame.length==0">
|
||||||
<Badge status="success" /><span style="font-weight: bold;">best sequence</span>:
|
<Badge status="success" /><span style="font-weight: bold;">duplicated frame num</span>: {{ duplicatedFrame.length }}
|
||||||
|
</p>
|
||||||
|
<p v-if="duplicatedFrame.length>0">
|
||||||
|
<Badge status="error" /><span style="font-weight: bold;">duplicated frame num</span>: <span style="color: red;">{{ duplicatedFrame.length }}</span>
|
||||||
|
</p>
|
||||||
|
<p v-if="errorFrame.length==0">
|
||||||
|
<Badge status="success" /><span style="font-weight: bold;">error frame num</span>: {{ errorFrame.length }}
|
||||||
|
</p>
|
||||||
|
<p v-if="errorFrame.length>0">
|
||||||
|
<Badge status="error" /><span style="font-weight: bold;">error frame num</span>: <span style="color: red;">{{ errorFrame.length }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Card style="margin:10px;max-height: 200px; overflow-y: auto;">
|
<Card style="margin:10px;max-height: 200px; overflow-y: auto;">
|
||||||
<Row v-for="(item, index) in localBestSeq" :key="item['frame']" style="margin-left: 20px;">
|
<Row v-for="(item, index) in seqFrameData" :key="item['frame']" style="margin-left: 20px;">
|
||||||
<p style="width: 10%;">[<span style="color: red;">{{ index }}</span>]</p>
|
<p style="width: 10%;">[<span style="color: red;">{{ index }}</span>]</p>
|
||||||
<p style="width: 30%;">frame id: <span style="color: green;">{{ item['frame'] }}</span></p>
|
<p style="width: 30%;">frame id: <span style="color: green;">{{ item['frame_id'] }}</span></p>
|
||||||
<p style="width: 40%;">coverage rate: <span style="color: blue;">{{ item['coverage_rate'] }}%</span></p>
|
<p style="width: 40%;">coverage rate: <span style="color: blue;">{{ (item["data"]['coverage_rate']*100).toFixed(2) }}%</span></p>
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
@ -78,12 +92,6 @@
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<Divider />
|
<Divider />
|
||||||
<Row type="flex" justify="center">
|
|
||||||
<Button type="success" style="width:60%" :disabled="!localSceneName || localDisableBtn" @click="handleLoadSeq"
|
|
||||||
:loading="localDisableBtn">
|
|
||||||
Load Sequence
|
|
||||||
</Button>
|
|
||||||
</Row>
|
|
||||||
</Card>
|
</Card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -97,66 +105,26 @@ export default {
|
|||||||
localSceneName: null,
|
localSceneName: null,
|
||||||
localSeqLen: 0,
|
localSeqLen: 0,
|
||||||
localMaxCoverageRate: 0,
|
localMaxCoverageRate: 0,
|
||||||
localBestSeqLen: 0,
|
|
||||||
localBestSeq: null,
|
|
||||||
localDisableBtn: false,
|
localDisableBtn: false,
|
||||||
|
localPredMaxCoverageRate: 0,
|
||||||
|
localBestSeqLen: 0,
|
||||||
sceneNameList: null,
|
sceneNameList: null,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
||||||
seqFrameData: []
|
seqFrameData: [],
|
||||||
|
duplicatedFrame: [],
|
||||||
|
errorFrame: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getSceneList();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSceneList() {
|
|
||||||
const params = { dataset_name: this.localDatasetName };
|
|
||||||
this.$ajax.postjson('/get_scene_list', params)
|
|
||||||
.then((data) => {
|
|
||||||
if (data.success == true) {
|
|
||||||
this.sceneNameList = data.scene_list;
|
|
||||||
} else {
|
|
||||||
this.$Message.error("error");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleSceneChange(val) {
|
|
||||||
this.localSceneName = val;
|
|
||||||
const params = { dataset_name: this.localDatasetName, scene_name: val };
|
|
||||||
this.$ajax.postjson('/get_scene_info', params)
|
|
||||||
.then((data) => {
|
|
||||||
if (data.success == true) {
|
|
||||||
this.localSeqLen = data.sequence_length;
|
|
||||||
this.localMaxCoverageRate = data.max_coverage_rate;
|
|
||||||
this.localBestSeqLen = data.best_sequence_length;
|
|
||||||
this.localBestSeq = data.best_sequence;
|
|
||||||
} else {
|
|
||||||
this.$Message.error("error");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleLoadSeq() {
|
|
||||||
const params = { dataset_name: this.localDatasetName, scene_name: this.localSceneName, sequence: this.localBestSeq };
|
|
||||||
this.localDisableBtn = true;
|
|
||||||
this.$emit('set-loading', true);
|
|
||||||
this.$ajax.postjson('/get_frame_data', params)
|
|
||||||
.then((data) => {
|
|
||||||
if (data.success == true) {
|
|
||||||
this.seqFrameData = data.seq_frame_data;
|
|
||||||
} else {
|
|
||||||
this.$Message.error("error");
|
|
||||||
}
|
|
||||||
this.localDisableBtn = false;
|
|
||||||
this.$emit('update-seq', data);
|
|
||||||
this.$emit('set-loading', false);
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
beforeUploadInferenceResultFile(file) {
|
beforeUploadInferenceResultFile(file) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
this.$emit('set-loading', true);
|
||||||
const isPkl = file.name.endsWith('.pkl');
|
const isPkl = file.name.endsWith('.pkl');
|
||||||
if (!isPkl) {
|
if (!isPkl) {
|
||||||
this.$Notice.warning({
|
this.$Notice.warning({
|
||||||
@ -171,11 +139,21 @@ export default {
|
|||||||
this.$ajax.postfile('/analysis_inference_result', formData)
|
this.$ajax.postfile('/analysis_inference_result', formData)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
if (data.success == true) {
|
if (data.success == true) {
|
||||||
|
this.localMaxCoverageRate = data.max_coverage_rate;
|
||||||
|
this.seqFrameData = data.seq_frame_data;
|
||||||
|
this.localSceneName = data.scene_name;
|
||||||
|
this.localSeqLen = this.seqFrameData.length;
|
||||||
|
this.duplicatedFrame = data.retry_duplication_pose;
|
||||||
|
this.errorFrame = data.retry_no_pts_pose;
|
||||||
|
this.localPredMaxCoverageRate = data.pred_max_coverage_rate;
|
||||||
|
this.localBestSeqLen = data.best_seq_len;
|
||||||
this.$Notice.success({
|
this.$Notice.success({
|
||||||
title: 'Successfully parsed the file',
|
title: 'Successfully parsed the file',
|
||||||
desc: 'inference results are found in the uploaded file.'
|
desc: this.seqFrameData.length + ' inference results are found in the uploaded file.(scene: '+ this.scene_name + ')'
|
||||||
});
|
});
|
||||||
|
this.$emit('update-seq', data);
|
||||||
|
this.$emit('set-loading', false);
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
} else {
|
} else {
|
||||||
console.log(data.success, data.message)
|
console.log(data.success, data.message)
|
||||||
|
@ -78,6 +78,7 @@ export default {
|
|||||||
vdCurrMask: null,
|
vdCurrMask: null,
|
||||||
chosen_frame_id: null,
|
chosen_frame_id: null,
|
||||||
selected_idx: 0,
|
selected_idx: 0,
|
||||||
|
hasImg: false,
|
||||||
|
|
||||||
scene: null,
|
scene: null,
|
||||||
camera: null,
|
camera: null,
|
||||||
@ -99,8 +100,8 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
seqFrameData(val) {
|
seqFrameData(val) {
|
||||||
if (val.length > 0) {
|
if (val.length > 0) {
|
||||||
this.vdCurrDepth = val[0].data.depth;
|
// this.vdCurrDepth = val[0].data.depth;
|
||||||
this.vdCurrMask = val[0].data.mask;
|
// this.vdCurrMask = val[0].data.mask;
|
||||||
for (let i = 0; i < this.frustums.length; i++) {
|
for (let i = 0; i < this.frustums.length; i++) {
|
||||||
this.scene.remove(this.frustums[i]);
|
this.scene.remove(this.frustums[i]);
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,6 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
seqFrameData: Array,
|
seqFrameData: Array,
|
||||||
hasImg: Boolean,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -64,7 +64,7 @@ export default {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
var res = axios.post(`${url}`, params).then((res) => {
|
var res = axios.post(`${baseURL}${url}`, params).then((res) => {
|
||||||
console.log("res:", res)
|
console.log("res:", res)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
if (res.data.exception != undefined && res.data.exception) {
|
if (res.data.exception != undefined && res.data.exception) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user