File tree Expand file tree Collapse file tree
src/python/model_api/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 ZSLVisualPromptingResult ,
2626)
2727from .sam_models import SAMDecoder , SAMImageEncoder
28- from .segmentation import SalientObjectDetectionModel , SegmentationModel
28+ from .segmentation import SegmentationModel
2929from .ssd import SSD
3030from .utils import (
3131 OutputTransform ,
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments