mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-22 22:56:34 +00:00
add onnx inference
This commit is contained in:
+3
-2
@@ -6,7 +6,6 @@ from ultralytics import YOLO
|
||||
|
||||
|
||||
def export_rknn(model_path):
|
||||
# model_onnx = export_onnx(model_path)
|
||||
model = YOLO(model_path)
|
||||
model.export(format="rknn", name="rk3588", simplify=True)
|
||||
model_stem = Path(model_path).stem
|
||||
@@ -25,10 +24,12 @@ def export_onnx(model_path):
|
||||
nms=True)
|
||||
return Path(model_path).stem + '.onnx'
|
||||
|
||||
|
||||
def show_model(model: str = None):
|
||||
netron.start(model)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
show_model('azaion_2025-03-10.rknn')
|
||||
export_onnx('azaion-2024-10-26.pt')
|
||||
show_model('azaion-2024-10-26.onnx')
|
||||
# export_rknn('azaion_2025-03-10.pt')
|
||||
Reference in New Issue
Block a user