We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 94fec52 + 52b3602 commit 9cd771dCopy full SHA for 9cd771d
inference/core/workflows/core_steps/common/query_language/operations/detections/base.py
@@ -172,11 +172,11 @@ def select_detections(
172
173
174
def extract_x_coordinate_of_detections_center(detections: sv.Detections) -> np.ndarray:
175
- return detections.xyxy[:, 0] + (detections.xyxy[:, 2] - detections.xyxy[:, 0]) / 2
+ return (detections.xyxy[:, 0] + detections.xyxy[:, 2]) * 0.5
176
177
178
def extract_y_coordinate_of_detections_center(detections: sv.Detections) -> np.ndarray:
179
- return detections.xyxy[:, 1] + (detections.xyxy[:, 3] - detections.xyxy[:, 1]) / 2
+ return (detections.xyxy[:, 1] + detections.xyxy[:, 3]) * 0.5
180
181
182
SORT_PROPERTIES_EXTRACT = {
0 commit comments