Skip to content

Commit 19be5d0

Browse files
Connectomics Teamcopybara-github
authored andcommitted
internal
PiperOrigin-RevId: 977976803
1 parent 2564541 commit 19be5d0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ffn/input/volume.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def sample_coordinates(
280280
'coord': [1, 3] XYZ int64 array
281281
'volname': [1] string array
282282
"""
283-
if config.sampling.bounding_boxes:
283+
if config.sampling.bounding_boxes:
284284
boxes_cfg = []
285285
volume_names = []
286286
# Compile boxes and volumes strings.
@@ -317,7 +317,10 @@ def _filter_coordinates_by_bbox(
317317
) -> tf.Tensor:
318318
ret = tf.numpy_function(
319319
lambda c, v: _coord_in_bboxes_np(c, v, bboxes),
320-
[item['coord'][0], tf.reshape(item['volname'], [-1])[0]],
320+
[
321+
tf.reshape(item['coord'], [-1, 3])[0],
322+
tf.reshape(item['volname'], [-1])[0],
323+
],
321324
tf.bool,
322325
)
323326
ret.set_shape([])

0 commit comments

Comments
 (0)