Invert color channels in anime image
This commit is contained in:
parent
30d8247273
commit
ca9163d134
3
main.py
3
main.py
@ -55,7 +55,8 @@ def get_top_results(all_metrics: list[dict], metric='correlation', count=1):
|
|||||||
|
|
||||||
def transfer_to_anime(img: np.ndarray):
|
def transfer_to_anime(img: np.ndarray):
|
||||||
algo = Cartoonizer(dataroot='DCT-Net/damo/cv_unet_person-image-cartoon_compound-models')
|
algo = Cartoonizer(dataroot='DCT-Net/damo/cv_unet_person-image-cartoon_compound-models')
|
||||||
return algo.cartoonize(img).astype(np.uint8)
|
model_out = algo.cartoonize(img).astype(np.uint8)
|
||||||
|
return cv2.cvtColor(model_out, cv2.COLOR_BGR2RGB)
|
||||||
|
|
||||||
|
|
||||||
def validate(test_set, anime_faces_set, metric='correlation'):
|
def validate(test_set, anime_faces_set, metric='correlation'):
|
||||||
|
Loading…
Reference in New Issue
Block a user