Apply attribute logic to all label types

This commit is contained in:
Nicolas Mowen 2025-05-20 12:47:26 -06:00
parent d6c273dc99
commit 34f1d875ab

View File

@ -650,8 +650,9 @@ class TrackedObjectAttribute:
best_object_id = obj["id"] best_object_id = obj["id"]
best_object_label = obj["label"] best_object_label = obj["label"]
else: else:
if best_object_label == "car" and obj["label"] == "car": if best_object_label == obj["label"]:
# if multiple cars are overlapping with the same label then the label will not be assigned # if multiple objects of the same type are overlapping
# then the attribute will not be assigned
return None return None
elif object_area < best_object_area: elif object_area < best_object_area:
# if a car and person are overlapping then assign the label to the smaller object (which should be the person) # if a car and person are overlapping then assign the label to the smaller object (which should be the person)