diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 0409e1afd..55f494d55 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -108,7 +108,12 @@ def is_better_thumbnail(label, current_thumb, new_obj, frame_shape) -> bool: class TrackedObject: def __init__( - self, camera, colormap, camera_config: CameraConfig, frame_cache, obj_data: dict[str, any] + self, + camera, + colormap, + camera_config: CameraConfig, + frame_cache, + obj_data: dict[str, any], ): # set the score history then remove as it is not part of object state self.score_history = obj_data["score_history"] @@ -238,7 +243,10 @@ class TrackedObject: max_logo = max(recognized_logos, key=recognized_logos.get) # don't overwrite sub label if it is already set - if self.obj_data.get("sub_label") is None or self.obj_data["sub_label"][0] == max_logo: + if ( + self.obj_data.get("sub_label") is None + or self.obj_data["sub_label"][0] == max_logo + ): self.obj_data["sub_label"] = (max_logo, recognized_logos[max_logo]) # check for significant change diff --git a/frigate/track/object_attribute.py b/frigate/track/object_attribute.py index a836b7ddd..54433c5f3 100644 --- a/frigate/track/object_attribute.py +++ b/frigate/track/object_attribute.py @@ -41,4 +41,4 @@ class ObjectAttribute: best_object_area = object_area best_object_id = obj["id"] - return best_object_id \ No newline at end of file + return best_object_id diff --git a/frigate/video.py b/frigate/video.py index 01985c416..e8c6fd088 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -752,11 +752,15 @@ def process_frames( all_objects: list[dict[str, any]] = object_tracker.tracked_objects.values() for attributes in attribute_detections.values(): for attribute in attributes: - filtered_objects = filter(lambda o: o["label"] in attribute_detections.keys(), all_objects) + filtered_objects = filter( + lambda o: o["label"] in attribute_detections.keys(), all_objects + ) selected_object_id = attribute.find_best_object(filtered_objects) if selected_object_id is not None: - detections[selected_object_id]["attributes"].append(attribute.get_tracking_data()) + detections[selected_object_id]["attributes"].append( + attribute.get_tracking_data() + ) # debug object tracking if False: