mirror of
https://github.com/azaion/ai-training.git
synced 2026-04-23 02:56:36 +00:00
fix augmentation - correct bboxes to be within borders+margin
Add classes = 80 as default number in yaml file
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# prerequisites
|
||||
sudo apt install python3.12-venv python-is-python3
|
||||
if [ ! -f azaion.pt ]; then
|
||||
echo "----ERROR!----"
|
||||
echo "Script requires azaion.pt file model in this folder!!!"
|
||||
echo "----ERROR!----"
|
||||
exit
|
||||
fi
|
||||
|
||||
# convert PT to ONNX
|
||||
git clone https://github.com/airockchip/ultralytics_yolov8
|
||||
cd ultralytics_yolov8
|
||||
python -m venv env
|
||||
source env/bin/activate
|
||||
pip install .
|
||||
|
||||
cp ../azaion.pt .
|
||||
sed -i -E "s/(model:).*$/\1 azaion.pt/" ultralytics/cfg/default.yaml
|
||||
export PYTHONPATH=./
|
||||
python ./ultralytics/engine/exporter.py
|
||||
cp azaion.onnx ../
|
||||
cd ..
|
||||
|
||||
exit
|
||||
|
||||
# convert ONNX to RKNN
|
||||
wget -c https://mirrors.bfsu.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||
chmod +x Miniconda3-latest-Linux-x86_64.sh
|
||||
bash Miniconda3-latest-Linux-x86_64.sh
|
||||
source ~/miniconda3/bin/activate
|
||||
conda create -n toolkit2 python=3.11
|
||||
conda activate toolkit2
|
||||
git clone https://github.com/rockchip-linux/rknn-toolkit2.git
|
||||
cd rknn-toolkit2/rknn-toolkit2/packages
|
||||
pip install -r requirements_cp311-1.6.0.txt
|
||||
pip install rknn_toolkit2-1.6.0+81f21f4d-cp311-cp311-linux_x86_64.whl
|
||||
cd ~/opi5-rknn
|
||||
git clone https://github.com/airockchip/rknn_model_zoo.git
|
||||
cd rknn_model_zoo/examples/yolov8/python
|
||||
python convert.py ~/azaion/models/azaion-2024-08-13.onnx rk3588 i8
|
||||
cp ../model/yolov8.rknn ~/azaion/models/azaion-2024-08-13.rknn # Output file form convert script is hard-coded...
|
||||
Reference in New Issue
Block a user