Resize

Resize#

%cd ../../..
import set_env
from d2py.utils.file import mkdir
temp_dir = ".temp"
mkdir(temp_dir)
# import onnx
# import tvm
# from tvm import relay
# # path = "/media/pc/data/lxw/BaiduNetdiskDownload/电信N合一算法模型评估/product_models/vehicle/model2out/det_traffic/ultralytics/engine/model_pt/yolov8n-c3_384_640_.onnx"
# path = "/media/pc/data/board/arria10/lxw/tasks/tools/npu_user_demos/models/telecom/vehile_det_traffic_yolov8n_c3/yolov8n-c3_384_640_.onnx"
# onnx_model = onnx.load(path)
# mod, params = relay.frontend.from_onnx(onnx_model, {"images": (1, 3, 384, 640)}, freeze_params=True)
# # with tvm.transform.PassContext(opt_level=3):
# #     mod = relay.quantize.prerequisite_optimize(mod, params)
# mod.show()