Compare commits
2 Commits
36016684a3
...
81ecb383e9
| Author | SHA1 | Date | |
|---|---|---|---|
| 81ecb383e9 | |||
| a5ccfc5468 |
@ -117,8 +117,8 @@
|
|||||||
<span>当前模式参数</span>
|
<span>当前模式参数</span>
|
||||||
<el-button :icon="Refresh" text type="primary" @click.stop="restorePreset">恢复默认</el-button>
|
<el-button :icon="Refresh" text type="primary" @click.stop="restorePreset">恢复默认</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item label="抽取帧数">
|
<el-form-item label="采样帧率(帧/秒)">
|
||||||
<el-slider v-model="formData.analysisTuning.maxFrames" :min="2" :max="16" :step="1" show-input />
|
<el-slider v-model="formData.analysisTuning.sampleFps" :min="0.25" :max="6" :step="0.25" show-input />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片最大宽度">
|
<el-form-item label="图片最大宽度">
|
||||||
<el-slider v-model="formData.analysisTuning.maxWidth" :min="640" :max="1280" :step="64" show-input />
|
<el-slider v-model="formData.analysisTuning.maxWidth" :min="640" :max="1280" :step="64" show-input />
|
||||||
@ -171,9 +171,9 @@ const advancedSections = ref([])
|
|||||||
* fallbackToAccurate 仅 AUTO 模式有意义,表示快速分析置信度不足时是否升级为精确分析。
|
* fallbackToAccurate 仅 AUTO 模式有意义,表示快速分析置信度不足时是否升级为精确分析。
|
||||||
*/
|
*/
|
||||||
const analysisPresets = {
|
const analysisPresets = {
|
||||||
FAST: { maxFrames: 6, maxWidth: 896, confidenceThreshold: 0.7, fallbackToAccurate: false },
|
FAST: { sampleFps: 1, maxWidth: 896, confidenceThreshold: 0.7, fallbackToAccurate: false },
|
||||||
AUTO: { maxFrames: 8, maxWidth: 960, confidenceThreshold: 0.75, fallbackToAccurate: true },
|
AUTO: { sampleFps: 2, maxWidth: 960, confidenceThreshold: 0.75, fallbackToAccurate: true },
|
||||||
ACCURATE: { maxFrames: 10, maxWidth: 1120, confidenceThreshold: 0.8, fallbackToAccurate: false },
|
ACCURATE: { sampleFps: 3, maxWidth: 1120, confidenceThreshold: 0.8, fallbackToAccurate: false },
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 表单使用一个稳定的 reactive 对象,initData 只更新字段而不替换对象,保证 Element Plus
|
* 表单使用一个稳定的 reactive 对象,initData 只更新字段而不替换对象,保证 Element Plus
|
||||||
@ -340,7 +340,7 @@ const clamp = (value, minimum, maximum, fallback) => {
|
|||||||
const normalizeStoredTuning = (value, preset) => {
|
const normalizeStoredTuning = (value, preset) => {
|
||||||
const stored = parseStoredTuning(value)
|
const stored = parseStoredTuning(value)
|
||||||
return {
|
return {
|
||||||
maxFrames: Math.round(clamp(stored.maxFrames, 2, 16, preset.maxFrames)),
|
sampleFps: Math.round(clamp(stored.sampleFps, 0.25, 6, preset.sampleFps) * 100) / 100,
|
||||||
maxWidth: Math.round(clamp(stored.maxWidth, 640, 1280, preset.maxWidth)),
|
maxWidth: Math.round(clamp(stored.maxWidth, 640, 1280, preset.maxWidth)),
|
||||||
confidenceThreshold: clamp(stored.confidenceThreshold, 0.5, 0.95, preset.confidenceThreshold),
|
confidenceThreshold: clamp(stored.confidenceThreshold, 0.5, 0.95, preset.confidenceThreshold),
|
||||||
fallbackToAccurate: typeof stored.fallbackToAccurate === 'boolean'
|
fallbackToAccurate: typeof stored.fallbackToAccurate === 'boolean'
|
||||||
|
|||||||
@ -556,7 +556,7 @@ function handler(params) {
|
|||||||
{ name: "videoUrl", type: "quote", input: "", quote: "", required: true, disabled: true },
|
{ name: "videoUrl", type: "quote", input: "", quote: "", required: true, disabled: true },
|
||||||
{ name: "instruction", type: "input", input: "", required: true, disabled: true },
|
{ name: "instruction", type: "input", input: "", required: true, disabled: true },
|
||||||
{ name: "analysisMode", type: "input", input: "AUTO", required: false, disabled: true },
|
{ name: "analysisMode", type: "input", input: "AUTO", required: false, disabled: true },
|
||||||
{ name: "analysisTuning", type: "input", input: { maxFrames: 8, maxWidth: 960, confidenceThreshold: 0.75, fallbackToAccurate: true }, required: false, disabled: true },
|
{ name: "analysisTuning", type: "input", input: { sampleFps: 2, maxWidth: 960, confidenceThreshold: 0.75, fallbackToAccurate: true }, required: false, disabled: true },
|
||||||
],
|
],
|
||||||
outputType: "json",
|
outputType: "json",
|
||||||
outputParams: [
|
outputParams: [
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user