Files
AiDA_Python/app/service/design/items/pipelines/segmentation.py

15 lines
424 B
Python
Raw Normal View History

2024-05-28 15:22:11 +08:00
from ..builder import PIPELINES
from ...utils.design_ensemble import get_seg_result
@PIPELINES.register_module()
class Segmentation(object):
def __init__(self, device='cpu', show=False, debug=None):
self.show = show
self.device = device
self.debug = debug
def __call__(self, result):
result['seg_result'] = get_seg_result(result["image_id"], result['image'])
return result