Skip to content

Commit 3a0ff63

Browse files
update demo and sam
1 parent 7adcf81 commit 3a0ff63

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

models/image_segmentation_efficientsam/demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
import numpy as np
33
import cv2 as cv
4-
from efficientSAM import EfficientSam
4+
from efficientSAM import EfficientSAM
55

66
# Check OpenCV version
77
assert cv.__version__ >= "4.9.0", \
@@ -79,7 +79,7 @@ def select(event, x, y, flags, param):
7979
backend_id = backend_target_pairs[args.backend_target][0]
8080
target_id = backend_target_pairs[args.backend_target][1]
8181
# Load the EfficientSAM model
82-
model = EfficientSam(modelPath=args.model)
82+
model = EfficientSAM(modelPath=args.model)
8383

8484
if args.input is not None:
8585
# Read image

models/image_segmentation_efficientsam/efficientSAM.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ def _postprocess(self, outputBlob):
6868

6969
mask_uint8 = (mask * 255).astype(np.uint8)
7070
# change to real image size
71-
mask_uint8 = cv.resize(mask_uint8, dsize=(self._currentInputSize[0], self._currentInputSize[1]), interpolation=2)
71+
mask_uint8 = cv.resize(mask_uint8, dsize=self._currentInputSize, interpolation=2)
7272

7373
return mask_uint8

0 commit comments

Comments
 (0)