Skip to content

Commit

Permalink
fix(api): ensure spiral grid coords are always whole pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Apr 6, 2023
1 parent c8382dc commit 1cfc538
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/onnx_web/chain/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ def generate_tile_spiral(
# exhaust the current direction, then turn
while accum_width < walk_width and accum_height < walk_height:
# add a tile
# logger.trace(
print(
logger.trace(
"adding tile at %s:%s, %s:%s, %s:%s",
tile_left,
tile_top,
Expand All @@ -146,7 +145,7 @@ def generate_tile_spiral(
walk_height,
spacing,
)
tile_coords.append((tile_left, tile_top))
tile_coords.append((int(tile_left), int(tile_top)))

# move to the next
tile_top += dir_height * spacing * tile
Expand Down

0 comments on commit 1cfc538

Please sign in to comment.