mirror of
https://github.com/mii443/usls.git
synced 2025-08-22 15:45:41 +00:00
* Using Rayon to accelarate YOLO post-processing * Refactor YOLO with outputs format * Optimize `conf * clss` for yolov5 v6 v7 * Add depth-anything-v2 * Update README.md * Update CHANGELOG.md
9 lines
278 B
Python
9 lines
278 B
Python
import onnx
|
|
from pathlib import Path
|
|
from onnxconverter_common import float16
|
|
|
|
model_f32 = "onnx_model.onnx"
|
|
model_f16 = float16.convert_float_to_float16(onnx.load(model_f32))
|
|
saveout = Path(model_f32).with_name(Path(model_f32).stem + "-f16.onnx")
|
|
onnx.save(model_f16, saveout)
|