Skip to content

Fix IndexError when label file has fewer entries than predicted classes#4037

Open
szd5654125 wants to merge 1 commit intoopenvinotoolkit:masterfrom
szd5654125:fix-action-recognition-label-index
Open

Fix IndexError when label file has fewer entries than predicted classes#4037
szd5654125 wants to merge 1 commit intoopenvinotoolkit:masterfrom
szd5654125:fix-action-recognition-label-index

Conversation

@szd5654125
Copy link
Copy Markdown

Reproduced issue #4003 where using action-recognition-0001 model with driver_actions.txt causes an IndexError in result_renderer.py.
This patch adds a bounds check as a minimal fix to prevent label indexing from exceeding the label list length.
Fixes #4003

@workflow-lab
Copy link
Copy Markdown

Can one of the admins verify this patch?

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.

action_recognition_demo.py -- IndexError: list index out of range

2 participants