Browse Source

fix process_clip

Blake Blackshear 3 years ago
parent
commit
93f418ac0b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      process_clip.py

+ 5 - 0
process_clip.py

@@ -162,9 +162,12 @@ class ProcessClip:
             )
             )
             total_regions += len(regions)
             total_regions += len(regions)
             total_motion_boxes += len(motion_boxes)
             total_motion_boxes += len(motion_boxes)
+            top_score = 0
             for id, obj in self.camera_state.tracked_objects.items():
             for id, obj in self.camera_state.tracked_objects.items():
                 if not obj.false_positive:
                 if not obj.false_positive:
                     object_ids.add(id)
                     object_ids.add(id)
+                    if obj.top_score > top_score:
+                        top_score = obj.top_score
 
 
             total_frames += 1
             total_frames += 1
 
 
@@ -175,6 +178,7 @@ class ProcessClip:
             "total_motion_boxes": total_motion_boxes,
             "total_motion_boxes": total_motion_boxes,
             "true_positive_objects": len(object_ids),
             "true_positive_objects": len(object_ids),
             "total_frames": total_frames,
             "total_frames": total_frames,
+            "top_score": top_score,
         }
         }
 
 
     def save_debug_frame(self, debug_path, frame_time, tracked_objects):
     def save_debug_frame(self, debug_path, frame_time, tracked_objects):
@@ -277,6 +281,7 @@ def process(path, label, output, debug_path):
 
 
         frigate_config = FrigateConfig(**json_config)
         frigate_config = FrigateConfig(**json_config)
         runtime_config = frigate_config.runtime_config
         runtime_config = frigate_config.runtime_config
+        runtime_config.cameras["camera"].create_ffmpeg_cmds()
 
 
         process_clip = ProcessClip(c, frame_shape, runtime_config)
         process_clip = ProcessClip(c, frame_shape, runtime_config)
         process_clip.load_frames()
         process_clip.load_frames()