mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-04-19 23:08:08 +02:00
Cleanup onnx detector (#20128)
* Cleanup onnx detector * Fix * Fix classification cropping * Deprioritize openvino * Send model type * Use model type to decide if model can use full optimization * Clenanup * Cleanup
This commit is contained in:
@@ -133,9 +133,9 @@ class CustomStateClassificationProcessor(RealTimeProcessorApi):
|
||||
x:x2,
|
||||
]
|
||||
|
||||
if input.shape != (224, 224):
|
||||
if frame.shape != (224, 224):
|
||||
try:
|
||||
input = cv2.resize(input, (224, 224))
|
||||
frame = cv2.resize(frame, (224, 224))
|
||||
except Exception:
|
||||
logger.warning("Failed to resize image for state classification")
|
||||
return
|
||||
@@ -258,11 +258,11 @@ class CustomObjectClassificationProcessor(RealTimeProcessorApi):
|
||||
x:x2,
|
||||
]
|
||||
|
||||
if input.shape != (224, 224):
|
||||
if crop.shape != (224, 224):
|
||||
try:
|
||||
input = cv2.resize(input, (224, 224))
|
||||
crop = cv2.resize(crop, (224, 224))
|
||||
except Exception:
|
||||
logger.warning("Failed to resize image for object classification")
|
||||
logger.warning("Failed to resize image for state classification")
|
||||
return
|
||||
|
||||
input = np.expand_dims(crop, axis=0)
|
||||
|
||||
Reference in New Issue
Block a user