airockchip / ultralytics_yolo11

GNU Affero General Public License v3.0
7 stars 0 forks source link

converting onnx to pt #2

Open SisroCodeke opened 2 days ago

SisroCodeke commented 2 days ago

Search before asking

Question

i tried to use provided pt models, trained my model with the trainer that provided from the repository, but when i converted it to onnx, i found same problem with Regular yolo11n.pt files. (having an unexpected layer more than acceptable size)so you cant convert it to rknn (with quantization or without it or with 2step quantization) there is always a problematic layer there with .pt models i tried to convert the onnx models (which had no problem with converting to rknn format)but wasn't successful at the end: 1- how can i found the correct yolo11n.pt file to train and make sure i could convert it to rknn format without any problem 2- how can i convert that pt model to onnx and then how to convert it rknn correctly

Additional

rknn-toolkit2==2.1.0 ultralytics==ultralytics_yolo11

jxx-xi commented 18 hours ago

Search before asking

  • [x] I have searched the Ultralytics YOLO issues and discussions and found no similar questions.

Question

i tried to use provided pt models, trained my model with the trainer that provided from the repository, but when i converted it to onnx, i found same problem with Regular yolo11n.pt files. (having an unexpected layer more than acceptable size)so you cant convert it to rknn (with quantization or without it or with 2step quantization) there is always a problematic layer there with .pt models i tried to convert the onnx models (which had no problem with converting to rknn format)but wasn't successful at the end: 1- how can i found the correct yolo11n.pt file to train and make sure i could convert it to rknn format without any problem 2- how can i convert that pt model to onnx and then how to convert it rknn correctly

Additional

rknn-toolkit2==2.1.0 ultralytics==ultralytics_yolo11

  1. pip install ultralytics==8.3.9
  2. Then execute the following code to automatically download the corresponding model
    from ultralytics import YOLO
    model = YOLO("yolo11n.pt")  # load an official model
  3. Convert the pt model to onnx, and then how to convert it to rknn, please refer to the document: https://github.com/airockchip/ultralytics_yolo11/blob/main/RKOPT_README.md