Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert(features[0].count == 255 * 13 * 13) crash #72

Open
moderateepheezy opened this issue Apr 1, 2021 · 1 comment
Open

assert(features[0].count == 255 * 13 * 13) crash #72

moderateepheezy opened this issue Apr 1, 2021 · 1 comment

Comments

@moderateepheezy
Copy link

Hi @hollance, thank you for this wonderful demo.

I tried to add the implementation you did for YOLO to my own model, and the line below crashed in the YOLO.swift file.

assert(features[0].count == 255 * 13 * 13)

If I comment out the assert, I can see the bounding box in the app, but are not placed correctly.

Please what do I need to look into that could cause the assert method to fail, and also why the bounding box are not correctly placed on the object I'm detecting.

Thank you.

@hollance
Copy link
Owner

hollance commented Apr 1, 2021

Your YOLO model probably doesn't have a 13x13 output grid, or it has fewer detectors per grid, or it doesn't have the same number of classes. You'll need to tweak these numbers in the code to suit your own version of YOLO.

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

No branches or pull requests

2 participants