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

[BUG] IMX500 examples : 'tuple' object has no attribute 'x' #1121

Open
camilaodsouza opened this issue Sep 19, 2024 · 2 comments
Open

[BUG] IMX500 examples : 'tuple' object has no attribute 'x' #1121

camilaodsouza opened this issue Sep 19, 2024 · 2 comments

Comments

@camilaodsouza
Copy link

Please only report one bug per issue!

Describe the bug
Running examples imx500_classification_demo.py and imx500_object_detection_demo.py now return an error for some models.

File "/home/pi/git/picamera2/examples/imx500/imx500_classification_demo.py", line 62, in draw_classification_results
cv2.putText(m.array, "ROI", (b.x + 5, b.y + 15), cv2.FONT_HERSHEY_SIMPLEX,
^^^
AttributeError: 'tuple' object has no attribute 'x'
Aborted

This happens because imx500.get_roi_scaled now returns a tuple, so the code must be adjusted to reflect that change.

To Reproduce
imx500_classification_demo.py --model /usr/share/imx500-models/imx500_network_efficientnetv2_b0.rpk --preserve-aspect-ratio

Expected behaviour
A clear and concise description of what you expected to happen.

Console Output, Screenshots
If applicable, any console output or screenshots that show the problem and associated error messages.

Hardware :
AI Camera, RPi5

Additional context
Add any other context about the problem here.

@davidplowman
Copy link
Collaborator

Thanks for the report. We'll look into it!

@naushir
Copy link
Collaborator

naushir commented Sep 23, 2024

Should be fixed now.

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

3 participants