Skip to content

Commit

Permalink
fix(api): log tile size and overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jul 2, 2023
1 parent 4b84188 commit eef055e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/onnx_web/chain/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from PIL import Image

from onnx_web.params import ImageParams, Size, SizeChart, StageParams
from onnx_web.server.context import ServerContext
from onnx_web.worker.context import WorkerContext
from ..params import ImageParams, Size, SizeChart, StageParams
from ..server.context import ServerContext
from ..worker.context import WorkerContext


class BaseStage:
Expand Down
8 changes: 8 additions & 0 deletions api/onnx_web/chain/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ def process_tile_grid(
tiles_x = ceil(width / adj_tile)
tiles_y = ceil(height / adj_tile)
total = tiles_x * tiles_y
logger.debug(
"processing %s tiles (%s x %s) with adjusted size of %s, %s overlap",
total,
tiles_x,
tiles_y,
adj_tile,
overlap,
)

tiles: List[Tuple[int, int, Image.Image]] = []

Expand Down

0 comments on commit eef055e

Please sign in to comment.