towhee
/
image-decode
copied
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions
14 lines
297 B
14 lines
297 B
# encoding=utf-8
|
|
|
|
from towhee import register, ops
|
|
from towhee.operator import Operator
|
|
|
|
|
|
@register(output_schema='image')
|
|
class ImageDecode(Operator):
|
|
|
|
def __init__(self):
|
|
self._op = ops.image_decode.cv2()
|
|
|
|
def __call__(self, image_path: str):
|
|
return self._op(image_path)
|