Skip to content

fix: handle 3D tensor outputs from RKNN model in YOLOv8 post-processing - #3

Merged
litxaohu merged 1 commit into
Seeed-Projects:mainfrom
inteintegrity:feat/rk3576-yolov8-airborne
Aug 5, 2026
Merged

fix: handle 3D tensor outputs from RKNN model in YOLOv8 post-processing#3
litxaohu merged 1 commit into
Seeed-Projects:mainfrom
inteintegrity:feat/rk3576-yolov8-airborne

Conversation

@inteintegrity

Copy link
Copy Markdown
Contributor

RKNN model conversion flattens spatial dimensions (H,W) into N, causing 3D output tensors (1,C,N) instead of expected 4D (1,C,H,W). Added:

  • _infer_grid() helper to infer grid dimensions from flattened size
  • 3D->4D reshape in box_process()
  • 3D/4D compatibility in sp_flatten() and scores creation

RKNN model conversion flattens spatial dimensions (H,W) into N, causing
3D output tensors (1,C,N) instead of expected 4D (1,C,H,W). Added:
- _infer_grid() helper to infer grid dimensions from flattened size
- 3D->4D reshape in box_process()
- 3D/4D compatibility in sp_flatten() and scores creation
@litxaohu
litxaohu merged commit 2d1d0ef into Seeed-Projects:main Aug 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants