mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
clarify log message
This commit is contained in:
parent
646c3fb5c4
commit
1b952ae3ba
@ -515,7 +515,9 @@ class PtzAutoTracker:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not coefficients_valid:
|
if not coefficients_valid:
|
||||||
logger.warning(f"{camera}: Autotracking calibration failed")
|
logger.warning(
|
||||||
|
f"{camera}: Autotracking calibration failed. See the Frigate documentation."
|
||||||
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# If coefficients are valid, proceed with updates
|
# If coefficients are valid, proceed with updates
|
||||||
@ -1000,10 +1002,10 @@ class PtzAutoTracker:
|
|||||||
logger.debug(f"{camera}: Zoom test: at max zoom: {at_max_zoom}")
|
logger.debug(f"{camera}: Zoom test: at max zoom: {at_max_zoom}")
|
||||||
logger.debug(f"{camera}: Zoom test: at min zoom: {at_min_zoom}")
|
logger.debug(f"{camera}: Zoom test: at min zoom: {at_min_zoom}")
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f'{camera}: Zoom test: zoom in hysteresis limit: {zoom_in_hysteresis} value: {AUTOTRACKING_ZOOM_IN_HYSTERESIS} original: {self.tracked_object_metrics[camera]["original_target_box"]} max: {self.tracked_object_metrics[camera]["max_target_box"]} target: {calculated_target_box if calculated_target_box else self.tracked_object_metrics[camera]["target_box"]}'
|
f"{camera}: Zoom test: zoom in hysteresis limit: {zoom_in_hysteresis} value: {AUTOTRACKING_ZOOM_IN_HYSTERESIS} original: {self.tracked_object_metrics[camera]['original_target_box']} max: {self.tracked_object_metrics[camera]['max_target_box']} target: {calculated_target_box if calculated_target_box else self.tracked_object_metrics[camera]['target_box']}"
|
||||||
)
|
)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f'{camera}: Zoom test: zoom out hysteresis limit: {zoom_out_hysteresis} value: {AUTOTRACKING_ZOOM_OUT_HYSTERESIS} original: {self.tracked_object_metrics[camera]["original_target_box"]} max: {self.tracked_object_metrics[camera]["max_target_box"]} target: {calculated_target_box if calculated_target_box else self.tracked_object_metrics[camera]["target_box"]}'
|
f"{camera}: Zoom test: zoom out hysteresis limit: {zoom_out_hysteresis} value: {AUTOTRACKING_ZOOM_OUT_HYSTERESIS} original: {self.tracked_object_metrics[camera]['original_target_box']} max: {self.tracked_object_metrics[camera]['max_target_box']} target: {calculated_target_box if calculated_target_box else self.tracked_object_metrics[camera]['target_box']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Zoom in conditions (and)
|
# Zoom in conditions (and)
|
||||||
@ -1086,7 +1088,7 @@ class PtzAutoTracker:
|
|||||||
pan = ((centroid_x / camera_width) - 0.5) * 2
|
pan = ((centroid_x / camera_width) - 0.5) * 2
|
||||||
tilt = (0.5 - (centroid_y / camera_height)) * 2
|
tilt = (0.5 - (centroid_y / camera_height)) * 2
|
||||||
|
|
||||||
logger.debug(f'{camera}: Original box: {obj.obj_data["box"]}')
|
logger.debug(f"{camera}: Original box: {obj.obj_data['box']}")
|
||||||
logger.debug(f"{camera}: Predicted box: {tuple(predicted_box)}")
|
logger.debug(f"{camera}: Predicted box: {tuple(predicted_box)}")
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f"{camera}: Velocity: {tuple(np.round(average_velocity).flatten().astype(int))}"
|
f"{camera}: Velocity: {tuple(np.round(average_velocity).flatten().astype(int))}"
|
||||||
@ -1196,7 +1198,7 @@ class PtzAutoTracker:
|
|||||||
)
|
)
|
||||||
zoom = (ratio - 1) / (ratio + 1)
|
zoom = (ratio - 1) / (ratio + 1)
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f'{camera}: limit: {self.tracked_object_metrics[camera]["max_target_box"]}, ratio: {ratio} zoom calculation: {zoom}'
|
f"{camera}: limit: {self.tracked_object_metrics[camera]['max_target_box']}, ratio: {ratio} zoom calculation: {zoom}"
|
||||||
)
|
)
|
||||||
if not result:
|
if not result:
|
||||||
# zoom out with special condition if zooming out because of velocity, edges, etc.
|
# zoom out with special condition if zooming out because of velocity, edges, etc.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user