This commit is contained in:
2026-08-28 17:33:35 +08:00
parent ad17e915fc
commit df1eacbda8
21 changed files with 48 additions and 36 deletions
@@ -39,7 +39,7 @@ class CameraUiState {
/// 检测结果置信度分级与轨迹确认。
///
/// - [highConf]0.35):高于此分直接确认显示;真实鸡多为 0.1~0.2
/// - [highConf]0.35):高于此分直接确认显示;真实环颈雉鸡多为 0.1~0.2
/// 高于 0.35 视为强证据。
/// - 低于 0.35 的框:需要多帧稳定([confirmFrames] 帧)或 活动证据
/// (运动区域/背景新出现区域重叠)才确认显示。
@@ -105,7 +105,7 @@ class CameraViewModel extends ChangeNotifier {
visible.add(r.copyWith(confirmed: t.confirmed));
}
// 提醒:仅新确认的鸡轨迹(确认瞬间触发一次,10s 同类冷却在 Reminder 内)
// 提醒:仅新确认的环颈雉鸡轨迹(确认瞬间触发一次,10s 同类冷却在 Reminder 内)
for (final t in _tracks.values) {
if (t.label != 'pheasant' || !t.confirmed || t.reminded) continue;
final age = now - t.firstSeenMs;
@@ -152,7 +152,7 @@ class CameraViewModel extends ChangeNotifier {
for (final t in _tracks.values) {
if (matched.contains(t.id)) continue;
final d = _centerDist(t.result, r);
// 同标签宽松匹配;跨标签(鸡↔疑似 抖动)收紧到 60%
// 同标签宽松匹配;跨标签(环颈雉鸡↔疑似 抖动)收紧到 60%
final limit = t.label == r.label ? bestD : associateRadius * 0.6;
if (d < limit) {
bestD = d;
@@ -181,7 +181,7 @@ class CameraViewModel extends ChangeNotifier {
/// 显示判定(按类别策略):
/// - 疑似(生境预警):设计意图是常驻静态预警,始终显示(渲染侧弱化)
/// - 鸡:确认轨迹直接显示;未确认的只有在高分或活动证据时才显示
/// - 环颈雉鸡:确认轨迹直接显示;未确认的只有在高分或活动证据时才显示
bool _shouldDisplay(_Track t, List<MotionRegion> motionRegions,
List<MotionRegion> noveltyRegions) {
if (t.label == 'suspect') return true;
@@ -196,7 +196,7 @@ class CameraViewModel extends ChangeNotifier {
motionRegions.any((m) => MotionAggregator.centerInRegion(r, m)) ||
noveltyRegions.any((m) => MotionAggregator.centerInRegion(r, m));
/// 物理合理性过滤:宽高比与相对尺寸(鸡 20-100px@720 量级,参照标注脚本)
/// 物理合理性过滤:宽高比与相对尺寸(环颈雉鸡 20-100px@720 量级,参照标注脚本)
bool _plausible(DetectionResult r) {
final h = r.height;
final w = r.width;