diff --git a/history.json b/history.json index e69de29..f6d7ca2 100644 --- a/history.json +++ b/history.json @@ -0,0 +1,3 @@ +{"timestamp": 1771404681.3130648, "type": "general", "prompt": "海水", "final_prompt": "sea water", "status": "success", "result_path": "results/seg_highlight_332aab6cf1d14d8a9c587c78f4da1297.jpg", "details": "Detected: 0", "duration": 1.7648789882659912} +{"timestamp": 1771404760.5910246, "type": "general", "prompt": "船", "final_prompt": "boat", "status": "success", "result_path": "results/seg_highlight_bf62393b0b764d79b581340f869710d1.jpg", "details": "Detected: 1", "duration": 1.4884836673736572} +{"timestamp": 1771404842.4105697, "type": "general", "prompt": "云", "final_prompt": "cloud", "status": "success", "result_path": "results/seg_f7c6eabb361645939a78373eda4ec72d.jpg", "details": "Detected: 5", "duration": 2.393840789794922} diff --git a/static/admin.html b/static/admin.html index 47611f2..f349875 100644 --- a/static/admin.html +++ b/static/admin.html @@ -653,22 +653,87 @@

{{ segmentResult.status === 'success' ? '分割成功' : '分割失败' }}

-

{{ segmentResult.message }}

+

{{ segmentResult.message || (segmentResult.status === 'success' ? '图像分割任务已完成' : '发生未知错误') }}

+
+ + + +
+
+
+ +
+
+

检测数量 (Count)

+

{{ segmentResult.detected_count || 0 }}

+
+
+
+
+ +
+
+

最高置信度 (Max Score)

+

+ {{ segmentResult.scores && segmentResult.scores.length > 0 ? (Math.max(...segmentResult.scores) * 100).toFixed(1) + '%' : '-' }} +

+
+
+
+
+ +
+
+

平均置信度 (Avg)

+

+ {{ segmentResult.scores && segmentResult.scores.length > 0 ? ((segmentResult.scores.reduce((a,b)=>a+b,0) / segmentResult.scores.length) * 100).toFixed(1) + '%' : '-' }} +

+
-
+

可视化结果

-
- +
+ +
+ + 点击预览大图 + +
+
+
+ +
+

未检测到目标

+

当前 Prompt 可能未匹配到图像中的任何物体,或者置信度阈值 ({{ segmentConfidence }}) 设置过高。建议尝试降低阈值或更换 Prompt。

+
- + +
+

+ + 检测详情 (Scores) +

+
+
+ #{{ index + 1 }} + + {{ (score * 100).toFixed(1) }}% + +
+
+
+ +
@@ -690,9 +755,9 @@

- JSON 结果 + JSON 原始数据

-
{{ JSON.stringify(segmentResult, null, 2) }}
+
{{ JSON.stringify(segmentResult, null, 2) }}
diff --git a/static/results/seg_f7c6eabb361645939a78373eda4ec72d.jpg b/static/results/seg_f7c6eabb361645939a78373eda4ec72d.jpg new file mode 100644 index 0000000..57c5f79 Binary files /dev/null and b/static/results/seg_f7c6eabb361645939a78373eda4ec72d.jpg differ diff --git a/static/results/seg_highlight_332aab6cf1d14d8a9c587c78f4da1297.jpg b/static/results/seg_highlight_332aab6cf1d14d8a9c587c78f4da1297.jpg new file mode 100644 index 0000000..1ff9d3a Binary files /dev/null and b/static/results/seg_highlight_332aab6cf1d14d8a9c587c78f4da1297.jpg differ diff --git a/static/results/seg_highlight_bf62393b0b764d79b581340f869710d1.jpg b/static/results/seg_highlight_bf62393b0b764d79b581340f869710d1.jpg new file mode 100644 index 0000000..9556ec2 Binary files /dev/null and b/static/results/seg_highlight_bf62393b0b764d79b581340f869710d1.jpg differ