🐛 Restore automatic WiLoR HandPose semantics

This commit is contained in:
eust-w 2026-08-25 11:00:40 +08:00
parent 8f911ff8db
commit feaaf80e11
16 changed files with 65 additions and 99 deletions

View File

@ -359,7 +359,7 @@ class RuntimeFileContractTests(unittest.TestCase):
self.assertEqual(MODULE.select_handler("DexYCB 数据集校验"), "dexycb_dataset_validate")
self.assertEqual(MODULE.select_handler("HO3D/H2O3D 数据集校验"), "ho3d_dataset_validate")
self.assertEqual(MODULE.select_handler("WiLoR 3D手部姿态估计"), "wilor_hand_pose")
self.assertEqual(MODULE.select_handler("WiLoR 手部预标(标手辅助)"), "wilor_hand_pose")
self.assertEqual(MODULE.select_handler("WiLoR 3D HandPose(自动)"), "wilor_hand_pose")
self.assertEqual(MODULE.select_handler("Hand Removal 视频去手"), "hand_removal")
self.assertEqual(MODULE.select_handler("手-物体姿态标注校验"), "hand_object_pose_validate")
self.assertEqual(MODULE.select_handler("PartNet-Mobility 资产校验"), "partnet_mobility_asset_validate")

View File

@ -423,14 +423,13 @@ def _run_fanyu_v5(run_id: str, node_id: str, output_dir: Any, node_data: dict[st
if handpose_segment is not None:
helpers["write_json_artifact"](run_id, node_id, package_dir, "handpose.json", handpose_segment, output=binding)
segment_manifest["handpose"] = {"file": "handpose.json", "frameCount": handpose_segment["frameCount"]}
segment_manifest["handPrelabel"] = {"file": "handpose.json", "frameCount": handpose_segment["frameCount"], "reviewRequired": True}
helpers["write_json_artifact"](run_id, node_id, package_dir, "segment.json", segment_manifest, output=binding)
source_video = _source_video_name(item)
quality = {"clip_id": clip_id, "source_video": source_video, **(item.get("quality", {}) if isinstance(item.get("quality"), dict) else {})}
package_items.append({"packageName": package_dir.name, "clipId": clip_id, "clipName": video_path.name, "rightClipName": right_video_manifest["name"] if right_video_manifest else "", "sourceVideo": source_video, "sourceRightVideo": right_video_manifest["sourceVideo"] if right_video_manifest else "", "stereo": right_video_manifest is not None, "storagePath": str(package_dir), "startSecond": start, "endSecond": end, "clipDuration": end - start, "duration": end - start, "fileCount": len([path for path in package_dir.iterdir() if path.is_file()]), "quality": quality, "annotation": annotation, "segmentManifest": segment_manifest})
if not package_items:
raise RuntimeError("package produced zero final segment packages")
manifest = {"schemaVersion": "droboticflow.delivery.manifest/v3", "datasetType": "fanyu-v5-final-segments", "packageCount": len(package_items), "stereoDelivery": all(item["stereo"] for item in package_items), "headposeIncluded": headpose is not None, "handposeIncluded": handpose is not None and handpose.get("enabled", True), "handPrelabelIncluded": handpose is not None and handpose.get("enabled", True), "items": package_items, "trainingEnabled": False}
manifest = {"schemaVersion": "droboticflow.delivery.manifest/v3", "datasetType": "fanyu-v5-final-segments", "packageCount": len(package_items), "stereoDelivery": all(item["stereo"] for item in package_items), "headposeIncluded": headpose is not None, "handposeIncluded": handpose is not None and handpose.get("enabled", True), "items": package_items, "trainingEnabled": False}
artifacts = [helpers["write_json_artifact"](run_id, node_id, output, "packages-manifest.json", manifest, output=binding)]
artifacts.extend(_collect_unique_package_artifacts(run_id, node_id, output / "packages", node_data, binding, helpers))
return artifacts
@ -595,7 +594,7 @@ def _run_multiport(
manifest_path = output / "packages-manifest.json"
manifest = json.loads(manifest_path.read_text(encoding="utf-8")) if manifest_path.exists() else {}
params = helpers["hyperparams"](node_data)
summary = {"packageCount": int(manifest.get("packageCount", 0) or 0), "trainingEnabled": False, "poseFree": _bool(params, "POSE_FREE", False), "stereoDelivery": bool(manifest.get("stereoDelivery")), "headposeIncluded": bool(manifest.get("headposeIncluded")), "handposeIncluded": bool(manifest.get("handposeIncluded")), "handPrelabelIncluded": bool(manifest.get("handPrelabelIncluded", manifest.get("handposeIncluded"))), "finalAcceptanceRequired": _bool(params, "REQUIRE_FINAL_ACCEPTANCE", False)}
summary = {"packageCount": int(manifest.get("packageCount", 0) or 0), "trainingEnabled": False, "poseFree": _bool(params, "POSE_FREE", False), "stereoDelivery": bool(manifest.get("stereoDelivery")), "headposeIncluded": bool(manifest.get("headposeIncluded")), "handposeIncluded": bool(manifest.get("handposeIncluded")), "finalAcceptanceRequired": _bool(params, "REQUIRE_FINAL_ACCEPTANCE", False)}
result.append(helpers["write_json_artifact"](run_id, node_id, output, "delivery-summary.json", summary, output=_output(node_data, helpers, "deliverySummary")))
return result

View File

@ -655,9 +655,9 @@ def run(
{
"schemaVersion": "droboticflow.wilor.hand_pose_result/v1",
"operator": "wilor_hand_pose",
"presentation": "hand_annotation_prelabel",
"taskType": "hand_annotation",
"requiresHumanReview": True,
"presentation": "3d_hand_pose",
"taskType": "hand_pose_estimation",
"requiresHumanReview": False,
"enabled": False,
"status": "skipped_by_delivery_options",
"items": [],
@ -739,9 +739,9 @@ def run(
manifest = {
"schemaVersion": "droboticflow.wilor.hand_pose_result/v1",
"operator": "wilor_hand_pose",
"presentation": "hand_annotation_prelabel",
"taskType": "hand_annotation",
"requiresHumanReview": True,
"presentation": "3d_hand_pose",
"taskType": "hand_pose_estimation",
"requiresHumanReview": False,
"enabled": True,
"status": result.get("status"),
"mediaKind": media_kind,

View File

@ -7679,7 +7679,7 @@
"value": "false"
},
{
"description": "是否强制要求已经进入人工质检的 WiLoR 手部预标(兼容键名)",
"description": "是否强制要求自动生成的 WiLoR 3D HandPose",
"key": "REQUIRE_HANDPOSE",
"type": "boolean",
"value": "false"
@ -7691,7 +7691,7 @@
"value": "false"
},
{
"description": "是否启用 pose-free 契约;启用后拒绝 HeadPose 和手部预标输入",
"description": "是否启用 pose-free 契约;启用后拒绝 HeadPose 和 HandPose 输入",
"key": "POSE_FREE",
"type": "boolean",
"value": "false"
@ -7757,7 +7757,7 @@
},
{
"container": "single",
"description": "已经进入人工质检的 WiLoR 手部预标(标手辅助,兼容端口名)",
"description": "自动生成的 WiLoR 3D HandPose 逐帧结果",
"id": "handpose",
"name": "handpose",
"payloadMode": "ref",
@ -7830,7 +7830,7 @@
},
{
"container": "collection",
"description": "按最终片段裁切的手部预标 JSON 集合(兼容端口名)",
"description": "按最终片段裁切的 HandPose JSON 集合",
"id": "handposeFiles",
"name": "handposeFiles",
"payloadMode": "ref",
@ -12800,7 +12800,7 @@
"python",
"/app/backend/operator-runner/main.py"
],
"description": "调用 WiLoR GPU 推理服务生成手部位置与姿态预标、叠加视频和关键点证据,作为标手人工质检的辅助输入,不可绕过人工审核直接视为最终标注。",
"description": "调用 WiLoR GPU 推理服务,对图片或视频自动执行 3D HandPose 定位与重建,输出手部关键点、MANO 姿态/形状、叠加媒体和运行证据。",
"hyperparams": [
{
"description": "WiLoR 推理服务地址",
@ -12863,7 +12863,7 @@
"value": "119"
},
{
"description": "分块覆盖完整视频并拒绝任何截断分块,确保后段候选区间也有手部预标数据",
"description": "分块覆盖完整视频并拒绝任何截断分块,确保后段候选区间也有 HandPose 数据",
"key": "REQUIRE_FULL_VIDEO_COVERAGE",
"type": "boolean",
"value": "true"
@ -12922,10 +12922,10 @@
"type": "json"
}
],
"name": "WiLoR 手部预标(标手辅助)",
"name": "WiLoR 3D HandPose(自动)",
"outputs": [
{
"description": "供标手质检使用的 WiLoR 预标 manifest、叠加媒体和关键点 JSON",
"description": "WiLoR 3D HandPose manifest、叠加媒体、关键点与 MANO 重建结果",
"id": "out-1",
"name": "wilorResult",
"transmission": "bus",
@ -12980,7 +12980,7 @@
},
"runtimeHandler": "builtin_wilor_hand_pose",
"runtimeSource": "operator-repos/builtin/wilor_hand_pose/src/operator.py",
"skillDefinition": "WiLoR 手部预标(标手辅助)算子;读取图片或视频引用,调用已部署的 WiLoR GPU 服务生成手部位置、姿态、关键点和叠加媒体,结果必须进入人工标手质检后才能交付。",
"skillDefinition": "WiLoR 3D HandPose 自动算子;读取图片或视频引用,通过手部检测、左右手识别和 MANO 参数回归生成 3D 手部姿态、网格、关键点及叠加媒体,不依赖人工质检。",
"type": "builtin"
},
{

View File

@ -1308,12 +1308,12 @@ func wilorPackageItem(run domain.RunRecord, manifest domain.ExecutionArtifact, p
}
}
annotation := map[string]any{
"type": "hand_annotation_prelabel",
"type": "wilor_hand_pose",
"mediaKind": mediaKind,
"handCount": intValue(result["handCount"]),
"frameCount": intValue(result["frameCount"]),
"status": stringValue(payload["status"]),
"requiresHumanReview": true,
"requiresHumanReview": false,
}
if task := mapValue(result["wilorTask"]); task != nil {
annotation["task"] = task
@ -1331,7 +1331,7 @@ func wilorPackageItem(run domain.RunRecord, manifest domain.ExecutionArtifact, p
"sourceVideo": sourceName,
"clipDuration": 0,
"fileCount": len(rawFiles),
"pipelineTags": []any{"wilor", "hand_prelabel", mediaKind},
"pipelineTags": []any{"wilor", "hand_pose", mediaKind},
"storagePath": storagePath,
"quality": quality,
"annotation": annotation,

View File

@ -734,10 +734,10 @@ func (server *server) ensureFanyuDeliveryTemplateV56(ctx context.Context, organi
return server.store.UpsertWorkflowRelease(ctx, release)
}
// ensureFanyuDeliveryTemplateV57 corrects the business meaning of the pose
// branches: WiLoR is hand-annotation prelabel evidence (标手辅助), while
// 6DRepNet is a rendered HeadPose prelabel. Both are reviewed in the human gate
// before their per-segment data is included in the delivery package.
// ensureFanyuDeliveryTemplateV57 keeps HeadPose rendering available to human
// acceptance while treating WiLoR as an automatic 3D HandPose branch. HandPose
// bypasses human review and is cropped only after final segment boundaries are
// released to the package node.
func (server *server) ensureFanyuDeliveryTemplateV57(ctx context.Context, organizationID string) error {
organizationID = normalizedOrganizationID(organizationID)
base, err := server.store.GetTemplate(ctx, fanyuDeliveryTemplateV56ID+"-"+organizationID)
@ -762,8 +762,8 @@ func (server *server) ensureFanyuDeliveryTemplateV57(ctx context.Context, organi
node.Data.PublicationStatus = operator.PublicationStatus
}
case "fanyu-v56-handpose":
node.Data.Label = "WiLoR 手部预标(标手辅助)"
node.Data.Description = "使用 WiLoR 生成手部位置与姿态预标和叠加视频,结果必须进入人工质检,不能直接作为最终标手结果。"
node.Data.Label = "WiLoR 3D HandPose(自动)"
node.Data.Description = "自动估计逐帧 3D 手部姿态、关键点和 MANO 手部网格;不进入人工质检,按最终切片边界裁切后直接进入交付包。"
if operator, operatorErr := server.store.GetOperator(ctx, "operator-builtin-wilor-hand-pose"); operatorErr != nil {
return operatorErr
} else if operator != nil {
@ -773,17 +773,14 @@ func (server *server) ensureFanyuDeliveryTemplateV57(ctx context.Context, organi
node.Data.PublicationStatus = operator.PublicationStatus
}
case "fanyu-v56-human":
node.Data.Label = "人工调切→语义/标手质检→聚合确认"
node.Data.Description = "人工完成调切、剪切审核和语义标注,并对 HeadPose 与手部预标渲染结果进行质检后聚合确认。"
node.Data.Label = "人工调切→语义/HeadPose质检→聚合确认"
node.Data.Description = "人工完成调切、剪切审核和语义标注,并查看 HeadPose 渲染证据;自动 HandPose 不进入人工质检。"
case "fanyu-v56-package":
node.Data.Label = "双目同步裁切 + 已质检预标交付"
node.Data.Label = "双目同步裁切 + HeadPose/HandPose 交付"
}
}
edges := append([]domain.WorkflowEdge(nil), base.Edges...)
edges = append(edges,
fanyuEdge("fanyu-v57-e22", "fanyu-v56-headpose", "out-1", "fanyu-v56-human", "headpose"),
fanyuEdge("fanyu-v57-e23", "fanyu-v56-handpose", "out-1", "fanyu-v56-human", "handpose"),
)
edges = append(edges, fanyuEdge("fanyu-v57-e22", "fanyu-v56-headpose", "out-1", "fanyu-v56-human", "headpose"))
now := nowISO()
createdAt := now
if existing, existingErr := server.store.GetTemplate(ctx, templateID); existingErr != nil {
@ -792,8 +789,8 @@ func (server *server) ensureFanyuDeliveryTemplateV57(ctx context.Context, organi
createdAt = existing.CreatedAt
}
template := domain.TemplateRecord{
ID: templateID, OrganizationID: organizationID, Name: "01-双目裁切与手/头预标质检交付-v5.7",
Description: "左右相机去畸变和脱敏后同步裁切;6DRepNet HeadPose 与 WiLoR 手部预标(标手辅助)生成可视化证据并进入人工质检,通过后再按最终边界裁切预标数据进入交付包。",
ID: templateID, OrganizationID: organizationID, Name: "01-双目裁切与 HeadPose/HandPose 交付-v5.7",
Description: "左右相机去畸变和脱敏后同步裁切;6DRepNet HeadPose 提供可视化审核证据,WiLoR 自动生成真实 3D HandPose 且不进入人工质检;两类姿态数据均按最终边界裁切进入交付包。",
Type: domain.WorkflowTypeBatch, Kind: domain.WorkflowKindStandard, ExecutionScope: domain.WorkflowExecutionScopeProduction,
DefinitionState: domain.WorkflowDefinitionStateDraft, DefinitionVersion: 7, DefinitionFamilyID: fanyuDeliveryTemplateV5ID + "-" + organizationID, SupersedesTemplateID: fanyuDeliveryTemplateV56ID + "-" + organizationID,
MaxConcurrentRuns: 1, WorkflowInputs: append([]domain.WorkflowInputDefinition(nil), base.WorkflowInputs...), Nodes: nodes, Edges: edges, CreatedAt: createdAt, UpdatedAt: now,
@ -827,9 +824,9 @@ func (server *server) ensureFanyuDeliveryTemplateV57(ctx context.Context, organi
ID: releaseID, OrganizationID: organizationID, TemplateID: template.ID, Version: 7, Name: template.Name, Description: template.Description,
Type: template.Type, Kind: template.Kind, ExecutionScope: template.ExecutionScope, MaxConcurrentRuns: template.MaxConcurrentRuns,
WorkflowInputs: template.WorkflowInputs, Nodes: nodes, Edges: edges,
Capabilities: []string{"directory_input", "multiport_artifact_contract", "stereo_opencv_undistort", "stereo_yunet_face_anonymization", "qwen3vl_behavior_rough_cut", "human_cut_adjustment", "human_cut_review", "human_semantic_annotation", "headpose_prelabel_render", "hand_annotation_prelabel", "human_prelabel_review", "human_semantic_review", "human_acceptance", "stereo_synchronized_crop", "stereo_reviewed_prelabel_package"},
Capabilities: []string{"directory_input", "multiport_artifact_contract", "stereo_opencv_undistort", "stereo_yunet_face_anonymization", "qwen3vl_behavior_rough_cut", "human_cut_adjustment", "human_cut_review", "human_semantic_annotation", "headpose_render", "human_headpose_review", "wilor_3d_handpose", "automatic_handpose_delivery", "human_semantic_review", "human_acceptance", "stereo_synchronized_crop", "stereo_pose_package"},
RequiredPluginIDs: []string{pluginregistry.HumanLoopCoreID, pluginregistry.AnnotationQAID}, ContentDigest: workflowReleaseDigest(template),
ReleaseNotes: "v5.7 reclassifies WiLoR as hand-annotation prelabel evidence, adds browser-rendered HeadPose evidence, and routes both prelabels through human quality review before packaging",
ReleaseNotes: "v5.7 keeps browser-rendered HeadPose evidence in human review and restores WiLoR as an automatic 3D HandPose branch that bypasses human quality review",
PublishedByUserID: "system", PublishedAt: now, CreatedAt: now,
}
return server.store.UpsertWorkflowRelease(ctx, release)

View File

@ -489,13 +489,13 @@ func TestEnsureFanyuDeliveryTemplateV56BuildsStereoCropAndPoseTopology(t *testin
if v57Err != nil || v57 == nil {
t.Fatalf("v5.7 template=%#v err=%v", v57, v57Err)
}
if v57.DefinitionVersion != 7 || v57.SupersedesTemplateID != fanyuDeliveryTemplateV56ID+"-org-v56" || len(v57.Nodes) != 10 || len(v57.Edges) != 23 {
if v57.DefinitionVersion != 7 || v57.SupersedesTemplateID != fanyuDeliveryTemplateV56ID+"-org-v56" || len(v57.Nodes) != 10 || len(v57.Edges) != 22 {
t.Fatalf("unexpected v5.7 prelabel topology: %#v", v57)
}
v57HandPrelabel := fanyuTestNode(v57.Nodes, "fanyu-v56-handpose")
v57Headpose := fanyuTestNode(v57.Nodes, "fanyu-v56-headpose")
if v57HandPrelabel == nil || !strings.Contains(v57HandPrelabel.Data.Label, "手部预标") || v57Headpose == nil || !strings.Contains(v57Headpose.Data.Label, "带渲染") {
t.Fatalf("v5.7 must present hand/head outputs as reviewed prelabels: hand=%#v head=%#v", v57HandPrelabel, v57Headpose)
if v57HandPrelabel == nil || !strings.Contains(v57HandPrelabel.Data.Label, "3D HandPose") || v57Headpose == nil || !strings.Contains(v57Headpose.Data.Label, "带渲染") {
t.Fatalf("v5.7 must present automatic HandPose and rendered HeadPose: hand=%#v head=%#v", v57HandPrelabel, v57Headpose)
}
reviewEdges := map[string]bool{"head": false, "hand": false}
for _, edge := range v57.Edges {
@ -506,7 +506,7 @@ func TestEnsureFanyuDeliveryTemplateV56BuildsStereoCropAndPoseTopology(t *testin
reviewEdges["hand"] = true
}
}
if !reviewEdges["head"] || !reviewEdges["hand"] {
t.Fatalf("v5.7 prelabels must enter human review: %#v", reviewEdges)
if !reviewEdges["head"] || reviewEdges["hand"] {
t.Fatalf("v5.7 must review HeadPose but bypass human review for HandPose: %#v", reviewEdges)
}
}

View File

@ -423,14 +423,13 @@ def _run_fanyu_v5(run_id: str, node_id: str, output_dir: Any, node_data: dict[st
if handpose_segment is not None:
helpers["write_json_artifact"](run_id, node_id, package_dir, "handpose.json", handpose_segment, output=binding)
segment_manifest["handpose"] = {"file": "handpose.json", "frameCount": handpose_segment["frameCount"]}
segment_manifest["handPrelabel"] = {"file": "handpose.json", "frameCount": handpose_segment["frameCount"], "reviewRequired": True}
helpers["write_json_artifact"](run_id, node_id, package_dir, "segment.json", segment_manifest, output=binding)
source_video = _source_video_name(item)
quality = {"clip_id": clip_id, "source_video": source_video, **(item.get("quality", {}) if isinstance(item.get("quality"), dict) else {})}
package_items.append({"packageName": package_dir.name, "clipId": clip_id, "clipName": video_path.name, "rightClipName": right_video_manifest["name"] if right_video_manifest else "", "sourceVideo": source_video, "sourceRightVideo": right_video_manifest["sourceVideo"] if right_video_manifest else "", "stereo": right_video_manifest is not None, "storagePath": str(package_dir), "startSecond": start, "endSecond": end, "clipDuration": end - start, "duration": end - start, "fileCount": len([path for path in package_dir.iterdir() if path.is_file()]), "quality": quality, "annotation": annotation, "segmentManifest": segment_manifest})
if not package_items:
raise RuntimeError("package produced zero final segment packages")
manifest = {"schemaVersion": "droboticflow.delivery.manifest/v3", "datasetType": "fanyu-v5-final-segments", "packageCount": len(package_items), "stereoDelivery": all(item["stereo"] for item in package_items), "headposeIncluded": headpose is not None, "handposeIncluded": handpose is not None and handpose.get("enabled", True), "handPrelabelIncluded": handpose is not None and handpose.get("enabled", True), "items": package_items, "trainingEnabled": False}
manifest = {"schemaVersion": "droboticflow.delivery.manifest/v3", "datasetType": "fanyu-v5-final-segments", "packageCount": len(package_items), "stereoDelivery": all(item["stereo"] for item in package_items), "headposeIncluded": headpose is not None, "handposeIncluded": handpose is not None and handpose.get("enabled", True), "items": package_items, "trainingEnabled": False}
artifacts = [helpers["write_json_artifact"](run_id, node_id, output, "packages-manifest.json", manifest, output=binding)]
artifacts.extend(_collect_unique_package_artifacts(run_id, node_id, output / "packages", node_data, binding, helpers))
return artifacts
@ -595,7 +594,7 @@ def _run_multiport(
manifest_path = output / "packages-manifest.json"
manifest = json.loads(manifest_path.read_text(encoding="utf-8")) if manifest_path.exists() else {}
params = helpers["hyperparams"](node_data)
summary = {"packageCount": int(manifest.get("packageCount", 0) or 0), "trainingEnabled": False, "poseFree": _bool(params, "POSE_FREE", False), "stereoDelivery": bool(manifest.get("stereoDelivery")), "headposeIncluded": bool(manifest.get("headposeIncluded")), "handposeIncluded": bool(manifest.get("handposeIncluded")), "handPrelabelIncluded": bool(manifest.get("handPrelabelIncluded", manifest.get("handposeIncluded"))), "finalAcceptanceRequired": _bool(params, "REQUIRE_FINAL_ACCEPTANCE", False)}
summary = {"packageCount": int(manifest.get("packageCount", 0) or 0), "trainingEnabled": False, "poseFree": _bool(params, "POSE_FREE", False), "stereoDelivery": bool(manifest.get("stereoDelivery")), "headposeIncluded": bool(manifest.get("headposeIncluded")), "handposeIncluded": bool(manifest.get("handposeIncluded")), "finalAcceptanceRequired": _bool(params, "REQUIRE_FINAL_ACCEPTANCE", False)}
result.append(helpers["write_json_artifact"](run_id, node_id, output, "delivery-summary.json", summary, output=_output(node_data, helpers, "deliverySummary")))
return result

View File

@ -1,4 +1,4 @@
# WiLoR 手部预标(标手辅助)
# WiLoR 3D HandPose(自动)
独立 builtin 算子目录。该目录是 `operator-builtin-wilor-hand-pose` 的生产运行权威来源,包含镜像构建、运行契约、源码和验收输入定义。

View File

@ -655,9 +655,9 @@ def run(
{
"schemaVersion": "droboticflow.wilor.hand_pose_result/v1",
"operator": "wilor_hand_pose",
"presentation": "hand_annotation_prelabel",
"taskType": "hand_annotation",
"requiresHumanReview": True,
"presentation": "3d_hand_pose",
"taskType": "hand_pose_estimation",
"requiresHumanReview": False,
"enabled": False,
"status": "skipped_by_delivery_options",
"items": [],
@ -739,9 +739,9 @@ def run(
manifest = {
"schemaVersion": "droboticflow.wilor.hand_pose_result/v1",
"operator": "wilor_hand_pose",
"presentation": "hand_annotation_prelabel",
"taskType": "hand_annotation",
"requiresHumanReview": True,
"presentation": "3d_hand_pose",
"taskType": "hand_pose_estimation",
"requiresHumanReview": False,
"enabled": True,
"status": result.get("status"),
"mediaKind": media_kind,

View File

@ -1316,11 +1316,6 @@ export default function AnnotationOperations() {
const selectedEvidence = evidenceItems[selectedIndex] as Record<string, any> | undefined;
const selectedPoseSummary = (selectedEvidence?.poseSummary || {}) as Record<string, any>;
const headposeRender = poseEvidenceRefs(selectedPoseSummary, "headposeRenderArtifacts")[0];
const handPrelabelRender = poseEvidenceRefs(
selectedPoseSummary,
"handPrelabelRenderArtifacts",
"handposeRenderArtifacts",
)[0];
const selectedClipArtifactId = String(selectedEvidence?.clipArtifactId || "");
const claimedByMe = item.assignedUserId === currentUser?.id;
const acceptanceStatistics = prepackageAcceptanceDrafts[item.id] || emptyPrepackageAcceptanceStatistics;
@ -1377,7 +1372,7 @@ export default function AnnotationOperations() {
</button>
) : null}
</div>
<div className="grid gap-3 md:grid-cols-4">
<div className="grid gap-3 md:grid-cols-3">
<div className="rounded-lg bg-[#101114] p-3 text-xs text-gray-300">
HeadPose 预标:
{statistics.headposeEnabled === false
@ -1386,14 +1381,6 @@ export default function AnnotationOperations() {
? `${statistics.headposeFrameCount || 0} 帧`
: "缺失"}
</div>
<div className="rounded-lg bg-[#101114] p-3 text-xs text-gray-300">
手部预标(标手):
{statistics.handPrelabelEnabled === false && statistics.handposeEnabled === false
? "本次未启用"
: statistics.handPrelabelAvailable || statistics.handposeAvailable
? `${statistics.handPrelabelFrameCount || statistics.handposeFrameCount || 0} 帧`
: "缺失"}
</div>
<div className="rounded-lg bg-[#101114] p-3 text-xs text-gray-300">
供应商隔离:{item.vendorId || "-"}
</div>
@ -1407,21 +1394,13 @@ export default function AnnotationOperations() {
src={buildBrowserPlayableVideoURL(humanLoopApi.evidenceContentURL(item.id, selectedClipArtifactId))}
/>
) : null}
<div className="grid gap-4 xl:grid-cols-2">
<div>
<PoseEvidencePreview
itemId={item.id}
artifact={headposeRender}
title="HeadPose 姿态轴渲染"
frameCount={Number(selectedPoseSummary.headposeFrameCount || 0)}
/>
<PoseEvidencePreview
itemId={item.id}
artifact={handPrelabelRender}
title="手部预标(标手辅助)"
frameCount={Number(
selectedPoseSummary.handPrelabelFrameCount || selectedPoseSummary.handposeFrameCount || 0,
)}
/>
</div>
<div className="max-h-56 space-y-2 overflow-auto rounded-lg border border-[#2a2b2f] p-3 text-xs text-gray-300">
{evidenceItems.map((evidence, index) => {
@ -1435,9 +1414,8 @@ export default function AnnotationOperations() {
onClick={() => setSelectedAcceptanceEvidence({ itemId: item.id, index })}
className={`block w-full rounded border p-2 text-left ${selectedIndex === index ? "border-blue-500 bg-blue-500/10" : "border-[#2a2b2f]"}`}
>
切片任务 {index + 1} · {slices.length} 段 · {annotations.length} 条标签 · HeadPose 预标{" "}
{entry.poseSummary?.headposeFrameCount || 0} 帧 · 标手预标{" "}
{entry.poseSummary?.handPrelabelFrameCount || entry.poseSummary?.handposeFrameCount || 0} 帧
切片任务 {index + 1} · {slices.length} 段 · {annotations.length} 条标签 · HeadPose{" "}
{entry.poseSummary?.headposeFrameCount || 0} 帧
</button>
);
})}
@ -1643,11 +1621,8 @@ export default function AnnotationOperations() {
acceptanceStatistics?.headposeEnabled === false ? "未启用" : "已进入人工质检",
],
[
"手部预标(标手)",
acceptanceStatistics?.handPrelabelEnabled === false &&
acceptanceStatistics?.handposeEnabled === false
? "未启用"
: "已进入人工质检",
"HandPose",
acceptanceStatistics?.handposeEnabled === false ? "未启用" : "自动生成,无需人工质检",
],
].map(([label, value]) => (
<div key={String(label)} className="rounded-lg bg-[#101114] p-3">

View File

@ -1776,9 +1776,7 @@ export default function ProjectDetail() {
{input.id === "deliveryOptions" ? (
<label className="flex cursor-pointer items-center justify-between rounded-lg border border-blue-500/20 bg-blue-500/10 px-3 py-2.5">
<span>
<span className="block text-xs font-medium text-blue-100">
包含已质检的手部预标(标手)
</span>
<span className="block text-xs font-medium text-blue-100">包含自动 3D HandPose</span>
<span className="mt-0.5 block text-[10px] text-blue-200/60">
关闭时不调用 WiLoR,Headpose 仍为必选交付项。
</span>

View File

@ -8445,7 +8445,7 @@ export default function WorkflowEditor() {
<label className="flex cursor-pointer items-center justify-between rounded-lg border border-blue-500/20 bg-blue-500/10 px-3 py-2.5">
<span>
<span className="block text-xs font-medium text-blue-100">
包含已质检的手部预标(标手)交付
包含自动 3D HandPose 交付
</span>
<span className="mt-1 block text-[10px] text-blue-200/60">
关闭时不调用 WiLoR,Headpose 仍为必选交付项。
@ -9201,7 +9201,7 @@ export default function WorkflowEditor() {
<label className="flex cursor-pointer items-center justify-between rounded-lg border border-blue-500/20 bg-blue-500/10 px-3 py-3">
<span>
<span className="block text-xs font-medium text-blue-100">
包含已质检的手部预标(标手)交付
包含自动 3D HandPose 交付
</span>
<span className="mt-1 block text-[10px] text-blue-200/60">
关闭时不调用 WiLoR,Headpose 仍为必选交付项。

View File

@ -53,8 +53,8 @@ def test_wilor_disabled_does_not_resolve_media_or_call_service(tmp_path):
)
assert artifacts[0]["data"]["enabled"] is False
assert artifacts[0]["data"]["status"] == "skipped_by_delivery_options"
assert artifacts[0]["data"]["presentation"] == "hand_annotation_prelabel"
assert artifacts[0]["data"]["requiresHumanReview"] is True
assert artifacts[0]["data"]["presentation"] == "3d_hand_pose"
assert artifacts[0]["data"]["requiresHumanReview"] is False
def test_headpose_requires_real_service_metadata_and_validates_frames(tmp_path, monkeypatch):
@ -354,13 +354,11 @@ def test_v56_stereo_package_crops_both_cameras_and_pose_frames_with_same_boundar
assert segment["videos"]["right"]["durationSeconds"] == 1.0
assert segment["headpose"]["frameCount"] == 1
assert segment["handpose"]["frameCount"] == 1
assert segment["handPrelabel"] == {"file": "handpose.json", "frameCount": 1, "reviewRequired": True}
manifest = json.loads((tmp_path / "stereo-output" / "packages-manifest.json").read_text(encoding="utf-8"))
assert manifest["schemaVersion"] == "droboticflow.delivery.manifest/v3"
assert manifest["stereoDelivery"] is True
assert manifest["headposeIncluded"] is True
assert manifest["handposeIncluded"] is True
assert manifest["handPrelabelIncluded"] is True
@pytest.mark.parametrize("schema", ["droboticflow.headpose/v1", "droboticflow.wilor.hand_pose_result/v1"])

View File

@ -47,10 +47,10 @@ test("human roles see only their assigned navigation surfaces", async () => {
assert.doesNotMatch(sidebar, /path: "\/monitoring",\s+roles: \[.*"supplier_manager".*\]/);
});
test("workflow run input renders a per-run reviewed hand-prelabel switch", async () => {
test("workflow run input renders a per-run automatic HandPose switch", async () => {
const source = await readFile(workflowEditorURL, "utf8");
assert.match(source, /input\.id === "deliveryOptions"/);
assert.match(source, /包含已质检的手部预标(标手)交付/);
assert.match(source, /包含自动 3D HandPose 交付/);
assert.match(source, /includeHandpose: event\.target\.checked/);
});

View File

@ -36,14 +36,14 @@ test("cutter, annotator, and reviewer receive their required workbench routes",
assert.match(app, /path\.endsWith\("\/annotate"\) \|\| path\.endsWith\("\/clip-quality"\)/);
});
test("aggregate confirmation renders reviewed hand and head prelabels before packaging", async () => {
test("aggregate confirmation renders HeadPose while HandPose bypasses human review", async () => {
const source = await readFile(annotationURL, "utf8");
assert.match(source, /HeadPose 姿态轴渲染/);
assert.match(source, /手部预标(标手辅助)/);
assert.match(source, /headposeRenderArtifacts/);
assert.match(source, /handPrelabelRenderArtifacts/);
assert.match(source, /<PoseEvidencePreview/);
assert.match(source, /buildBrowserPlayableVideoURL\(evidenceURL\)/);
assert.match(source, /自动生成,无需人工质检/);
assert.doesNotMatch(source, /title="手部预标(标手辅助)"/);
assert.match(source, /确认验收并进入打包/);
assert.doesNotMatch(source, /确认验收并释放训练与打包/);
assert.match(source, /item\.itemIds\.length/);