修复bug,过滤不允许的类别
This commit is contained in:
parent
fad554632e
commit
be99472837
@ -723,6 +723,10 @@ class MultiYoloTrtDetectorTrackId_TRT10_YOLO11:
|
|||||||
elif isinstance(model_class_names, dict):
|
elif isinstance(model_class_names, dict):
|
||||||
class_name = model_class_names.get(class_id, "unknown")
|
class_name = model_class_names.get(class_id, "unknown")
|
||||||
|
|
||||||
|
# 过滤不允许的类别
|
||||||
|
if allowed and class_name not in allowed:
|
||||||
|
continue
|
||||||
|
|
||||||
# 创建DetectionResult对象
|
# 创建DetectionResult对象
|
||||||
detection = DetectionResult(
|
detection = DetectionResult(
|
||||||
bbox=box,
|
bbox=box,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user