mirror of
				https://github.com/MarcA711/frigate-rockchip.git
				synced 2025-10-31 20:22:36 +08:00 
			
		
		
		
	Revert TRT class id filtering (#8497)
This commit is contained in:
		| @@ -293,16 +293,6 @@ class TensorRtDetector(DetectionApi): | ||||
|         # 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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nicolas Mowen
					Nicolas Mowen