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.
24 lines
352 B
Python
24 lines
352 B
Python
|
|
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()
|
|
|
|
|
|
|