Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ffn/input/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def sample_coordinates(
'coord': [1, 3] XYZ int64 array
'volname': [1] string array
"""
if config.sampling.bounding_boxes:
if config.sampling.bounding_boxes:
boxes_cfg = []
volume_names = []
# Compile boxes and volumes strings.
Expand Down Expand Up @@ -317,7 +317,10 @@ def _filter_coordinates_by_bbox(
) -> tf.Tensor:
ret = tf.numpy_function(
lambda c, v: _coord_in_bboxes_np(c, v, bboxes),
[item['coord'][0], tf.reshape(item['volname'], [-1])[0]],
[
tf.reshape(item['coord'], [-1, 3])[0],
tf.reshape(item['volname'], [-1])[0],
],
tf.bool,
)
ret.set_shape([])
Expand Down
Loading