rockchip-linux / rknn-toolkit2

BSD 3-Clause "New" or "Revised" License
865 stars 154 forks source link

yolov8n conversion problem #230

Open JoshuaJakowlew opened 12 months ago

JoshuaJakowlew commented 12 months ago

Hi there! I'm struggling with yolov8n model porting to rk3568.

I use this code to convert model to onnx format

from ultralytics import YOLO

# Load a model
model = YOLO("yolov8n.pt")  # load a pretrained model (recommended for training)
success = model.export(format="onnx", opset=12, simplify=True)  # export the model to onnx format
assert success

After converrsion I run RKNN convertor as it is in yolov5 example. Unfortunately I get tons of log messages like this:

D RKNN: [17:07:42.545] DatainEntries overflow, need to tiling more, datain_entries: 2264, limitation: 2048
D RKNN: [17:07:42.545] DatainEntries overflow, need to tiling more, datain_entries: 2263, limitation: 2048
D RKNN: [17:07:42.545] DatainEntries overflow, need to tiling more, datain_entries: 2262, limitation: 2048
D RKNN: [17:07:42.545] DatainEntries overflow, need to tiling more, datain_entries: 2261, limitation: 2048

So, the question is: how to do conversion properly? Also, i don't understand how to postprocess results. Looks like they are somewhat different from yolov5.

Guemann-ui commented 10 months ago

@JoshuaJakowlew Check this repo, it could be useful for you: https://github.com/laitathei/YOLOv8-ONNX-RKNN-HORIZON-TensorRT-Segmentation