feat: per-class exemplar preview, class hide toggle, container NMS flag (REQ-182, REQ-183, REQ-184)
This commit is contained in:
1 parent
1a99f2ffe4
commit
96a00267d9
18 files changed
+537
-124
No files matched your search
@@ -166,6 +166,10 @@ def _run_autolabel(job) -> None:
|
||||
|
||||
name_to_class_id = {item["name"].strip().lower(): item["class_id"] for item in project["classes"]}
|
||||
allowed_classes_set = {c.strip().lower() for c in target_class_names} if target_class_names else None
|
||||
# REQ-184: classes marked container keep boxes that sit inside them. The
|
||||
# prompt pass above still sees prompt-index ids, so it gets the index-aligned set.
|
||||
container_ids = {c["class_id"] for c in project["classes"] if c.get("container")}
|
||||
prompt_container_ids = {i for i, c in enumerate(sam3_target_classes) if c.get("container")}
|
||||
|
||||
job.log(f"Starting auto-labeling with {selected_engine}...")
|
||||
|
||||
@@ -249,6 +253,7 @@ def _run_autolabel(job) -> None:
|
||||
thresholds=thr_list,
|
||||
iou_by_class=dict(enumerate(iou_list)) if iou_list else None,
|
||||
min_box_fracs=mb_list,
|
||||
container_ids=prompt_container_ids,
|
||||
)
|
||||
if not res.error and res.detections:
|
||||
for det in res.detections:
|
||||
@@ -267,7 +272,8 @@ def _run_autolabel(job) -> None:
|
||||
and "iou_threshold" in per_class[c["name"].strip().lower()]
|
||||
}
|
||||
kept = labeling.deduplicate(all_raw_detections, iou_threshold=iou_thresh,
|
||||
iou_by_class=iou_by_class_proj or None)
|
||||
iou_by_class=iou_by_class_proj or None,
|
||||
container_ids=container_ids)
|
||||
items = []
|
||||
for det in kept:
|
||||
if project["label_type"] == "bbox" or det.mask is None:
|
||||
|
||||
Reference in new issue
Block a user