mirror of https://github.com/menyifang/DCT-Net
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
347 B
Python
13 lines
347 B
Python
3 years ago
|
import cv2
|
||
|
from modelscope.pipelines import pipeline
|
||
|
from modelscope.utils.constant import Tasks
|
||
|
|
||
|
img_cartoon = pipeline(Tasks.image_portrait_stylization, 'damo/cv_unet_person-image-cartoon_compound-models')
|
||
|
img_cartoon = pipeline('image-portrait-stylization')
|
||
|
result = img_cartoon('input.png')
|
||
|
|
||
|
cv2.imwrite('result.png', result['output_img'])
|
||
|
|
||
|
|
||
|
|