We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26adf96 commit 21dd3c7Copy full SHA for 21dd3c7
main.py
@@ -16,15 +16,11 @@
16
17
image = cv2.imread(args.filepath)
18
19
+ model_path = f"Models\{args.algorithm}.pb"
20
+ algorithm_arguments = args.algorithm.split('_x')
21
22
super_resolution_algorithm = cv2.dnn_superres.DnnSuperResImpl_create()
-
- path = f"Models\{args.algorithm}.pb"
23
24
- super_resolution_algorithm.readModel(path)
25
26
- algorithm_arguments = args.algorithm.split('_x')
27
+ super_resolution_algorithm.readModel(model_path)
28
super_resolution_algorithm.setModel(algorithm_arguments[0].lower(),int(algorithm_arguments[1]))
29
30
result = super_resolution_algorithm.upsample(image)
0 commit comments