Merge pull request #145 from facok/patch-1

fix BBoxJoin merging bboxes at image-index level instead of per-image
This commit is contained in:
chflame163
2026-03-30 09:01:14 +08:00
committed by GitHub
+8 -7
View File
@@ -59,12 +59,13 @@ class LS_BBOXES_JOIN:
CATEGORY = '😺dzNodes/LayerMask'
def bboxes_join(self, bboxes_1, bboxes_2=None, bboxes_3=None, bboxes_4=None):
if bboxes_2 is not None:
bboxes_1.extend(bboxes_2)
if bboxes_3 is not None:
bboxes_1.extend(bboxes_3)
if bboxes_4 is not None:
bboxes_1.extend(bboxes_4)
all_inputs = [b for b in [bboxes_2, bboxes_3, bboxes_4] if b is not None]
for other in all_inputs:
for i in range(len(other)):
if i < len(bboxes_1):
bboxes_1[i].extend(other[i])
else:
bboxes_1.append(other[i])
return (bboxes_1,)
class LS_OBJECT_DETECTOR_FL2:
@@ -562,4 +563,4 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"LayerMask: ObjectDetectorMask": "LayerMask: Object Detector Mask(Advance)",
"LayerMask: ObjectDetectorYOLO8": "LayerMask: Object Detector YOLO8(Advance)",
"LayerMask: ObjectDetectorYOLOWorld": "LayerMask: Object Detector YOLO World(Obsolete)"
}
}