mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 00:26:35 +00:00
add rknn conversion - install and use scripts, auto convert to rknn after AI training is done and put pt and rknn models to /azaion/models directory
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
# Use converter PT to ONNX
|
||||
cd rknn-convert/ultralytics_yolov8/
|
||||
cp --verbose /azaion/models/azaion.pt .
|
||||
source env/bin/activate
|
||||
pip install onnx
|
||||
export PYTHONPATH=./
|
||||
python ./ultralytics/engine/exporter.py
|
||||
cp --verbose azaion.onnx ../
|
||||
cd ..
|
||||
deactivate
|
||||
|
||||
# Use converter ONNX to RKNN
|
||||
|
||||
source ~/miniconda/bin/activate
|
||||
conda activate toolkit2
|
||||
cd rknn_model_zoo/examples/yolov8/python
|
||||
python convert.py ../../../../azaion.onnx rk3588 i8
|
||||
cp --verbose ../model/yolov8.rknn /azaion/models/azaion.rknn
|
||||
conda deactivate
|
||||
conda deactivate
|
||||
Reference in New Issue
Block a user