火灾检测模型由基于YOLOv10的火灾烟雾检测模型改为复合模型[基于YOLOv8的火灾检测模型(单火焰检测)+YOLOv10-M,专用火灾烟雾模型]

This commit is contained in:
2026-06-10 14:18:43 +08:00
parent 30ea6eb0fb
commit 0e011dacfd
6 changed files with 206 additions and 21 deletions

View File

@@ -117,6 +117,36 @@
<div class="slider-value">{{ config.iou.toFixed(2) }}</div>
</el-form-item>
<!-- 复合检测开关仅对火灾检测模型显示 -->
<el-form-item v-if="isFireDetectionModel">
<template #label>
<span>复合火灾检测</span>
<el-tooltip placement="top" :show-after="200">
<template #content>
<div style="max-width: 300px; line-height: 1.6;">
<p><strong>复合火灾检测是什么</strong></p>
<p>同时检测火焰和烟雾提高火灾识别准确率</p>
<p style="margin: 8px 0;"><strong>检测内容</strong></p>
<ul style="margin: 8px 0; padding-left: 16px;">
<li>火焰检测识别明火区域</li>
<li>烟雾检测识别烟雾区域</li>
<li>综合判断根据两者结果评估火灾等级</li>
</ul>
<p><strong>建议火灾检测场景建议开启</strong></p>
</div>
</template>
<el-icon class="help-icon"><QuestionFilled /></el-icon>
</el-tooltip>
</template>
<el-switch
v-model="config.composite"
active-text="开启"
inactive-text="关闭"
:active-value="true"
:inactive-value="false"
/>
</el-form-item>
<!-- 算法配置仅对人员检测模型显示 -->
<AlgorithmConfig
v-model="config.algorithmConfig"
@@ -129,7 +159,7 @@
</template>
<script setup>
import { ref, watch } from 'vue'
import { ref, watch, computed } from 'vue'
import {
Setting,
Picture,
@@ -167,9 +197,15 @@ const config = ref({
model: props.defaultModel || (props.models.length > 0 ? props.models[0].id : ''),
confidence: 0.5,
iou: 0.45,
composite: false,
algorithmConfig: {}
})
// 判断当前是否是火灾检测模型
const isFireDetectionModel = computed(() => {
return config.value.model === 'fire_detection'
})
const formatConfidence = (value) => {
return `置信度: ${value.toFixed(2)}`
}
@@ -191,9 +227,16 @@ watch(configType, (newType) => {
})
// 监听配置变化
watch(() => [config.value.model, config.value.confidence, config.value.iou], () => {
watch(() => [config.value.model, config.value.confidence, config.value.iou, config.value.composite], () => {
emit('config-change', config.value)
}, { deep: true })
// 监听模型变化,如果不是火灾模型,关闭复合检测
watch(() => config.value.model, (newModel) => {
if (newModel !== 'fire_detection') {
config.value.composite = false
}
})
</script>
<style scoped>