Skip to content

Commit

Permalink
Unify canvas interface between internal and OSS implementation.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712589357
  • Loading branch information
mjanusz authored and copybara-github committed Jan 7, 2025
1 parent fdf2cc4 commit aac280f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ffn/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def __init__(
exec_client: executor.ExecutorClient,
image,
options,
voxel_size_zyx: tuple[int, int, int] = (1, 1, 1),
counters=None,
restrictor=None,
movement_policy_fn=None,
Expand All @@ -157,6 +158,7 @@ def __init__(
exec_client: client for the executor interface
image: 3d ndarray-like of shape (z, y, x)
options: InferenceOptions proto
voxel_size_zyx: 3-tuple defining the voxel size as (z, y, x)
counters: (optional) counter container, where __getitem__ returns a
counter compatible with the MR Counter API
restrictor: (optional) a MovementRestrictor object which can exclude some
Expand All @@ -179,6 +181,7 @@ def __init__(
self.image = image
self._exec_client = exec_client
self._exec_client_id = None
self.voxel_size_zyx = voxel_size_zyx

self.options = inference_pb2.InferenceOptions()
self.options.CopyFrom(options)
Expand Down

0 comments on commit aac280f

Please sign in to comment.