update upload inference
This commit is contained in:
parent
84520ef566
commit
e8d1e88e13
@ -88,7 +88,7 @@ export default {
|
||||
"mtl_path": seqData.mtl_path,
|
||||
}
|
||||
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: [],
|
||||
|
||||
best_seq: null,
|
||||
hasImg: false,
|
||||
|
||||
curr_frame_info: {
|
||||
"step": 0,
|
||||
@ -112,8 +113,8 @@ export default {
|
||||
watch: {
|
||||
seqFrameData(val) {
|
||||
if (val.length > 0) {
|
||||
this.rpCurrDepth = val[0].data.depth;
|
||||
this.rpCurrMask = val[0].data.mask;
|
||||
// this.rpCurrDepth = val[0].data.depth;
|
||||
// this.rpCurrMask = val[0].data.mask;
|
||||
this.curr_step = 0;
|
||||
this.curr_frame_info["step"] = 0;
|
||||
this.curr_frame_info["frame_id"] = val[0]["frame_id"];
|
||||
@ -131,8 +132,8 @@ export default {
|
||||
|
||||
},
|
||||
curr_step (val) {
|
||||
this.rpCurrDepth = this.seqFrameData[val]["data"]["depth"];
|
||||
this.rpCurrMask = this.seqFrameData[val]["data"]["mask"];
|
||||
// this.rpCurrDepth = this.seqFrameData[val]["data"]["depth"];
|
||||
// this.rpCurrMask = this.seqFrameData[val]["data"]["mask"];
|
||||
this.curr_frame_info["step"] = val;
|
||||
this.curr_frame_info["frame_id"] = this.seqFrameData[val]["frame_id"];
|
||||
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>
|
||||
</Col>
|
||||
<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>
|
||||
<Option v-for="item in sceneNameList" :value="item" :key="item">{{ item }}</Option>
|
||||
</Select>
|
||||
@ -53,24 +53,38 @@
|
||||
<Row style="width: 100%;">
|
||||
<Col style="margin-bottom: 10px; margin-left: 10px; margin-right: 10px; width: 100%;">
|
||||
<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>
|
||||
<Badge status="success" /><span style="font-weight: bold;">max coverage rate</span>: {{ localMaxCoverageRate
|
||||
}}%
|
||||
</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>
|
||||
<Badge status="success" /><span style="font-weight: bold;">best sequence</span>:
|
||||
<p v-if="duplicatedFrame.length==0">
|
||||
<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>
|
||||
|
||||
<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: 30%;">frame id: <span style="color: green;">{{ item['frame'] }}</span></p>
|
||||
<p style="width: 40%;">coverage rate: <span style="color: blue;">{{ item['coverage_rate'] }}%</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["data"]['coverage_rate']*100).toFixed(2) }}%</span></p>
|
||||
</Row>
|
||||
</Card>
|
||||
</Col>
|
||||
@ -78,12 +92,6 @@
|
||||
</Card>
|
||||
|
||||
<Divider />
|
||||
<Row type="flex" justify="center">
|
||||
<Button type="success" style="width:60%" :disabled="!localSceneName || localDisableBtn" @click="handleLoadSeq"
|
||||
:loading="localDisableBtn">
|
||||
Load Sequence
|
||||
</Button>
|
||||
</Row>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
@ -97,66 +105,26 @@ export default {
|
||||
localSceneName: null,
|
||||
localSeqLen: 0,
|
||||
localMaxCoverageRate: 0,
|
||||
localBestSeqLen: 0,
|
||||
localBestSeq: null,
|
||||
localDisableBtn: false,
|
||||
localPredMaxCoverageRate: 0,
|
||||
localBestSeqLen: 0,
|
||||
sceneNameList: null,
|
||||
loading: false,
|
||||
|
||||
seqFrameData: []
|
||||
seqFrameData: [],
|
||||
duplicatedFrame: [],
|
||||
errorFrame: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
this.getSceneList();
|
||||
},
|
||||
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) {
|
||||
this.loading = true;
|
||||
this.$emit('set-loading', true);
|
||||
const isPkl = file.name.endsWith('.pkl');
|
||||
if (!isPkl) {
|
||||
this.$Notice.warning({
|
||||
@ -171,11 +139,21 @@ export default {
|
||||
this.$ajax.postfile('/analysis_inference_result', formData)
|
||||
.then((data) => {
|
||||
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({
|
||||
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;
|
||||
} else {
|
||||
console.log(data.success, data.message)
|
||||
|
@ -78,6 +78,7 @@ export default {
|
||||
vdCurrMask: null,
|
||||
chosen_frame_id: null,
|
||||
selected_idx: 0,
|
||||
hasImg: false,
|
||||
|
||||
scene: null,
|
||||
camera: null,
|
||||
@ -99,8 +100,8 @@ export default {
|
||||
watch: {
|
||||
seqFrameData(val) {
|
||||
if (val.length > 0) {
|
||||
this.vdCurrDepth = val[0].data.depth;
|
||||
this.vdCurrMask = val[0].data.mask;
|
||||
// this.vdCurrDepth = val[0].data.depth;
|
||||
// this.vdCurrMask = val[0].data.mask;
|
||||
for (let i = 0; i < this.frustums.length; i++) {
|
||||
this.scene.remove(this.frustums[i]);
|
||||
}
|
||||
|
@ -51,7 +51,6 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
|
||||
export default {
|
||||
props: {
|
||||
seqFrameData: Array,
|
||||
hasImg: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
return data;
|
||||
}
|
||||
];
|
||||
var res = axios.post(`${url}`, params).then((res) => {
|
||||
var res = axios.post(`${baseURL}${url}`, params).then((res) => {
|
||||
console.log("res:", res)
|
||||
if (res.status == 200) {
|
||||
if (res.data.exception != undefined && res.data.exception) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user