Spaces:
Runtime error
Runtime error
File size: 352 Bytes
64dbbc4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import cv2
from source.cartoonize import Cartoonizer
import os
def process():
algo = Cartoonizer(dataroot='damo/cv_unet_person-image-cartoon_compound-models')
img = cv2.imread('input.png')[...,::-1]
result = algo.cartoonize(img)
cv2.imwrite('res.png', result)
print('finished!')
if __name__ == '__main__':
process()
|