Skip to content

Commit

Permalink
Update transforms.py (#32)
Browse files Browse the repository at this point in the history
Resolved SAM2 inference error reporting issue
  • Loading branch information
petercham authored Dec 27, 2024
1 parent 81f1414 commit f4a2b84
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sam2/utils/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ def __init__(
self.mean = [0.485, 0.456, 0.406]
self.std = [0.229, 0.224, 0.225]
self.to_tensor = ToTensor()
self.transforms = torch.jit.script(
nn.Sequential(
self.transforms = nn.Sequential(
Resize((self.resolution, self.resolution)),
Normalize(self.mean, self.std),
)
)

def __call__(self, x):
Expand Down

0 comments on commit f4a2b84

Please sign in to comment.