Skip to content

Commit

Permalink
Adjust centroids
Browse files Browse the repository at this point in the history
  • Loading branch information
gitttt-1234 committed Dec 16, 2024
1 parent 058a861 commit ad03905
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sleap/nn/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ def call(self, example_gt: Dict[str, tf.Tensor]) -> Dict[str, tf.Tensor]:
full_imgs = example_gt["image"]
if self.input_scale != 1.0:
full_imgs = sleap.nn.data.resizing.resize_image(full_imgs, self.input_scale)
example_gt["centroids"] *= self.input_scale
crop_sample_inds = example_gt["centroids"].value_rowids() # (n_peaks,)
n_peaks = tf.shape(crop_sample_inds)[0] # total number of peaks in the batch
centroid_points = example_gt["centroids"].flat_values # (n_peaks, 2)
Expand Down

0 comments on commit ad03905

Please sign in to comment.