Skip to content

Commit

Permalink
feat(api): save output of each stage in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 29, 2023
1 parent 8f1cbc8 commit 680adc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/onnx_web/chain/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def stage_tile(tile: Image.Image, _dims) -> Image.Image:
logger.info('finished stage %s, result size: %sx%s',
name, image.width, image.height)

if is_debug():
image.save(path.join(ctx.output_path, 'last-stage.png'))

end = monotonic()
duration = timedelta(seconds=(end - start))
logger.info('finished pipeline in %s, result size: %sx%s',
Expand Down

0 comments on commit 680adc7

Please sign in to comment.