移除人员在场判定方法
This commit is contained in:
parent
2197f740cb
commit
8ceb2cb57b
@ -14,7 +14,6 @@ public static class ConditionMethodLabels
|
||||
ConditionMethod.HandNearObject => "手靠近物体",
|
||||
ConditionMethod.ObjectPresent => "物体出现在画面中",
|
||||
ConditionMethod.ObjectInZone => "物体在区域内",
|
||||
ConditionMethod.PersonPresent => "人员在场",
|
||||
_ => method ?? "",
|
||||
});
|
||||
}
|
||||
|
||||
@ -107,7 +107,6 @@ public class RecipeNode : EditorNode
|
||||
ConditionMethod.HandNearObject,
|
||||
ConditionMethod.ObjectPresent,
|
||||
ConditionMethod.ObjectInZone,
|
||||
ConditionMethod.PersonPresent,
|
||||
];
|
||||
|
||||
Hands = ["any", "left", "right"];
|
||||
|
||||
@ -130,14 +130,6 @@ public class ConditionEvaluator
|
||||
: No($"{condition.TargetObject} 未在 {condition.Region} 内");
|
||||
}
|
||||
|
||||
case ConditionMethod.PersonPresent:
|
||||
{
|
||||
var target = string.IsNullOrWhiteSpace(condition.TargetObject) ? "person" : condition.TargetObject;
|
||||
var hit = FindDetection(frame, target, conf);
|
||||
|
||||
return hit is null ? No($"未检出 {target}") : Yes($"{target} 在场 {hit.Confidence:F2}");
|
||||
}
|
||||
|
||||
case ConditionMethod.HandInRegion:
|
||||
{
|
||||
var region = Region(condition.Region);
|
||||
|
||||
@ -216,9 +216,6 @@ public static class ConditionMethod
|
||||
/// <summary>手-物相邻(3 次)</summary>
|
||||
public const string HandNearObject = "hand_near_object";
|
||||
|
||||
/// <summary>人在场(7 次,走 COCO 的 person)</summary>
|
||||
public const string PersonPresent = "person_present";
|
||||
|
||||
/// <summary>持续计时(16 次,最常用)</summary>
|
||||
public const string TimeElapsed = "time_elapsed";
|
||||
}
|
||||
|
||||
@ -88,7 +88,6 @@ public static partial class SopConfigLoader
|
||||
ConditionMethod.HandInRegion,
|
||||
ConditionMethod.HandMove,
|
||||
ConditionMethod.HandNearObject,
|
||||
ConditionMethod.PersonPresent,
|
||||
ConditionMethod.TimeElapsed,
|
||||
};
|
||||
|
||||
@ -156,7 +155,6 @@ public static partial class SopConfigLoader
|
||||
{
|
||||
ConditionMethod.ObjectPresent => true,
|
||||
ConditionMethod.ObjectInZone => true,
|
||||
ConditionMethod.PersonPresent => true,
|
||||
ConditionMethod.HandNearObject => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user