Spaces:
Runtime error
Runtime error
File size: 319 Bytes
4f8ad24 |
1 2 3 4 5 6 7 8 9 10 11 |
from imgutils.segment import segment_rgba_with_isnetis
from .base import ProcessAction
from ..model import ImageItem
class BackgroundRemovalAction(ProcessAction):
def process(self, item: ImageItem) -> ImageItem:
_, image = segment_rgba_with_isnetis(item.image)
return ImageItem(image, item.meta)
|