-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_python.py
More file actions
34 lines (26 loc) · 957 Bytes
/
Copy pathtest_python.py
File metadata and controls
34 lines (26 loc) · 957 Bytes
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
"""
@file test_python.py
@author Aidan Mohammed-Ali
@brief Test script to verify Python ctypes -> C engine inference.
@date 2026-08-03
"""
# =============================
# System Headers
# =============================
import os
# =============================
# Custom Modules
# =============================
import src.pixelboost as PB
# Paths relative to project root
model_path = "models/super_resolution_int8.onnx"
input_image = "sample_imgs/lowres.jpg"
output_image = "sample_imgs/python_lowres_output_4x.png"
print(f"[*] Initialising PixelBoost engine using: {model_path}")
engine = PB.PixelBoost(model_path)
print(f"[*] Executing 4x super-resolution on: {input_image}")
# Runs tiled upscaling by default
result_img = engine.upscale(input_image, tiled=True, tile_size=256, overlap=16)
print(f"[*] Saving output image to: {output_image}")
result_img.save(output_image)
print("[+] Done! Upscaling completed successfully via Python bindings.")