Skip to content

Commit

Permalink
Fix infer point bug
Browse files Browse the repository at this point in the history
Signed-off-by: heyufan1995 <[email protected]>
  • Loading branch information
heyufan1995 committed Jul 17, 2024
1 parent d71a2d1 commit 1090efb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ def infer(
batch_data = list_data_collate([batch_data])
self.batch_data = batch_data
if point is not None:
if type(point) is list:
point = np.array(point)[np.newaxis, ...]
point_label = np.array(point_label)[np.newaxis, ...]
point = self.transform_points(
point,
np.linalg.inv(batch_data["image"].affine[0])
Expand Down

0 comments on commit 1090efb

Please sign in to comment.