forked from yuyuyzl/EasyVtuber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
45 lines (37 loc) · 787 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
from pyanime4k import ac
import pyanime4k
parameters = ac.Parameters()
# enable HDN for ACNet
parameters.HDN = True
a = ac.AC(
type=ac.ProcessorType.CPU_ACNet,
)
a.set_arguments(parameters)
import cv2
img = cv2.imread("character/test41.png")
a.load_image_from_numpy(img,input_type=ac.AC_INPUT_BGR)
a.get_processor_info()
# start processing
a.process()
a.show_image()
# preview upscaled image
# img=a.save_image_to_numpy()
#
# print(img)
# import cv2
# import numpy as np
#
# rgb=[
# [[1,2,3],[2,2,3],[3,2,3],[4,2,3]],
# [[1,2,3],[2,2,3],[3,2,3],[4,2,3]],
# [[1,2,3],[2,2,3],[3,2,3],[4,2,3]],
# [[1,2,3],[2,2,3],[3,2,3],[4,2,3]]
# ]
# a=[
# [1,2,3,4],
# [1,2,3,4],
# [1,2,3,4],
# [1,2,3,4],
# ]
#
# print(cv2.merge((np.array(rgb),np.array(a))))