Add object detection, tracking, mobile notifications, and search to any security camera.
clean
roryclearb1f65e41af04
diff --git a/llm/qwen3vl.py b/llm/qwen3vl.pyindex b970188..253161d 100644--- a/llm/qwen3vl.py+++ b/llm/qwen3vl.py@@ -153,21 +153,19 @@ def meshgrid(x, y):return grid_x.reshape(-1, 1), grid_y.reshape(-1, 1)def get_vision_bilinear_indices_and_weights(h: int, w: int, num_grid_per_side: int, merge_size: int ) -> tuple[Tensor, Tensor]:- side = num_grid_per_side-- h_grid = Tensor.linspace(0, side - 1, h)- w_grid = Tensor.linspace(0, side - 1, w)+ h_grid = Tensor.linspace(0, num_grid_per_side - 1, h)+ w_grid = Tensor.linspace(0, num_grid_per_side - 1, w)h_floor = h_grid.cast(dtypes.int)w_floor = w_grid.cast(dtypes.int)- h_ceil = (h_floor + 1).clamp(max_=side - 1)- w_ceil = (w_floor + 1).clamp(max_=side - 1)+ h_ceil = (h_floor + 1).clamp(max_=num_grid_per_side - 1)+ w_ceil = (w_floor + 1).clamp(max_=num_grid_per_side - 1)h_frac = h_grid - h_floorw_frac = w_grid - w_floor- h_floor_offset = h_floor * side- h_ceil_offset = h_ceil * side+ h_floor_offset = h_floor * num_grid_per_side+ h_ceil_offset = h_ceil * num_grid_per_sidecorner_indices = Tensor.stack((h_floor_offset[:, None] + w_floor[None, :]).flatten(),