mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 00:06:36 +00:00
add conversion to rockchip
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
from ultralytics import YOLO
|
||||||
|
|
||||||
|
|
||||||
|
def export_rknn(model_path):
|
||||||
|
model = YOLO(model_path)
|
||||||
|
model.export(format="rknn", name="rk3588")
|
||||||
|
pass
|
||||||
@@ -20,6 +20,7 @@ from constants import (processed_images_dir,
|
|||||||
prefix, date_format,
|
prefix, date_format,
|
||||||
datasets_dir, models_dir,
|
datasets_dir, models_dir,
|
||||||
corrupted_images_dir, corrupted_labels_dir, sample_dir)
|
corrupted_images_dir, corrupted_labels_dir, sample_dir)
|
||||||
|
from exports.rockchip import export_rknn
|
||||||
from security import Security
|
from security import Security
|
||||||
from utils import Dotdict
|
from utils import Dotdict
|
||||||
|
|
||||||
@@ -207,6 +208,7 @@ def convert2rknn():
|
|||||||
model.export(format="onnx")
|
model.export(format="onnx")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def form_data_sample(size=300):
|
def form_data_sample(size=300):
|
||||||
images = []
|
images = []
|
||||||
with scandir(processed_images_dir) as imd:
|
with scandir(processed_images_dir) as imd:
|
||||||
|
|||||||
Reference in New Issue
Block a user