Skip to content

Commit

Permalink
Revert TRT class id filtering (blakeblackshear#8497)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 committed Nov 7, 2023
1 parent 92906a5 commit f29e152
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions frigate/detectors/plugins/tensorrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,6 @@ def detect_raw(self, tensor_input):
# raw_detections: Nx7 numpy arrays of
# [[x, y, w, h, box_confidence, class_id, class_prob],

# throw out any detections with negative class IDs
valid_detections = []
for r in raw_detections:
if r[5] >= 0:
valid_detections.append(r)
else:
logger.warning(f"Found TensorRT detection with invalid class id {r}")

raw_detections = valid_detections

# Calculate score as box_confidence x class_prob
raw_detections[:, 4] = raw_detections[:, 4] * raw_detections[:, 6]
# Reorder elements by the score, best on top, remove class_prob
Expand Down

0 comments on commit f29e152

Please sign in to comment.