Explorar o código

once a true positive always a true positive

Blake Blackshear %!s(int64=4) %!d(string=hai) anos
pai
achega
606fa6f6d5
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      frigate/object_processing.py

+ 4 - 0
frigate/object_processing.py

@@ -65,6 +65,10 @@ class CameraState():
         self.callbacks = defaultdict(lambda: [])
 
     def false_positive(self, obj):
+        # once a true positive, always a true positive
+        if not obj.get('false_positive', True):
+            return False
+
         threshold = self.config['objects'].get('filters', {}).get(obj['label'], {}).get('threshold', 0.85)
         if obj['computed_score'] < threshold:
             return True