Skip to content

Commit b8663d0

Browse files
authored
Del salient obj det model (#340)
1 parent 9bb50a6 commit b8663d0

2 files changed

Lines changed: 1 addition & 18 deletions

File tree

src/python/model_api/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
ZSLVisualPromptingResult,
2626
)
2727
from .sam_models import SAMDecoder, SAMImageEncoder
28-
from .segmentation import SalientObjectDetectionModel, SegmentationModel
28+
from .segmentation import SegmentationModel
2929
from .ssd import SSD
3030
from .utils import (
3131
OutputTransform,

src/python/model_api/models/segmentation.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -235,23 +235,6 @@ def get_contours(
235235
return combined_contours
236236

237237

238-
class SalientObjectDetectionModel(SegmentationModel):
239-
__model__ = "Salient_Object_Detection"
240-
241-
def postprocess(self, outputs: dict, meta: dict) -> cv2.Mat:
242-
input_image_height = meta["original_shape"][0]
243-
input_image_width = meta["original_shape"][1]
244-
result = outputs[self.output_blob_name].squeeze()
245-
result = 1 / (1 + np.exp(-result))
246-
return cv2.resize(
247-
result,
248-
(input_image_width, input_image_height),
249-
0,
250-
0,
251-
interpolation=cv2.INTER_NEAREST,
252-
)
253-
254-
255238
_feature_vector_name = "feature_vector"
256239

257240

0 commit comments

Comments
 (0)