Skip to content

Commit 21dd3c7

Browse files
author
Oscar Guillamon Rojo
committed
Reorder main.py
1 parent 26adf96 commit 21dd3c7

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

main.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616

1717
image = cv2.imread(args.filepath)
1818

19+
model_path = f"Models\{args.algorithm}.pb"
20+
algorithm_arguments = args.algorithm.split('_x')
1921

2022
super_resolution_algorithm = cv2.dnn_superres.DnnSuperResImpl_create()
21-
22-
path = f"Models\{args.algorithm}.pb"
23-
24-
super_resolution_algorithm.readModel(path)
25-
26-
algorithm_arguments = args.algorithm.split('_x')
27-
23+
super_resolution_algorithm.readModel(model_path)
2824
super_resolution_algorithm.setModel(algorithm_arguments[0].lower(),int(algorithm_arguments[1]))
2925

3026
result = super_resolution_algorithm.upsample(image)

0 commit comments

Comments
 (0)