formatting

This commit is contained in:
Blake Blackshear 2023-07-09 09:47:28 -05:00
parent 938e387356
commit d21471e892

View File

@ -212,7 +212,11 @@ class TrackedObject:
# populate the sub_label for car with highest scoring logo # populate the sub_label for car with highest scoring logo
if self.obj_data["label"] == "car": if self.obj_data["label"] == "car":
recognized_logos = {k: self.attributes[k] for k in ["ups", "fedex", "amazon"] if k in self.attributes} recognized_logos = {
k: self.attributes[k]
for k in ["ups", "fedex", "amazon"]
if k in self.attributes
}
if len(recognized_logos) > 0: if len(recognized_logos) > 0:
max_logo = max(recognized_logos, key=recognized_logos.get) max_logo = max(recognized_logos, key=recognized_logos.get)
self.obj_data["sub_label"] = (max_logo, recognized_logos[max_logo]) self.obj_data["sub_label"] = (max_logo, recognized_logos[max_logo])