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

demo.py运行onnx模型时报错 #24

Open
TJW-XMUT opened this issue Jun 3, 2024 · 2 comments
Open

demo.py运行onnx模型时报错 #24

TJW-XMUT opened this issue Jun 3, 2024 · 2 comments

Comments

@TJW-XMUT
Copy link

TJW-XMUT commented Jun 3, 2024

image
请问大佬,有碰到这个报错吗,怎么解决?非常感谢!

@TJW-XMUT TJW-XMUT changed the title demo.py运行报错 demo.py运行onnx模型时报错 Jun 3, 2024
@jason-li-831202
Copy link
Owner

你先檢查一下coco_label.txt是不是80類別或是沒有讀到檔案, 'unknown'是我在detect這邊做的,當處理到沒有正確index才會有的異常labal。

try :
predicted_class = self.class_names[class_ids[i]]
except :
predicted_class = "unknown"

@TJW-XMUT
Copy link
Author

TJW-XMUT commented Jun 5, 2024

你先檢查一下coco_label.txt是不是80類別或是沒有讀到檔案, 'unknown'是我在detect這邊做的,當處理到沒有正確index才會有的異常labal。

try :
predicted_class = self.class_names[class_ids[i]]
except :
predicted_class = "unknown"

大佬,我检查了一下,我的coco_label.txt没有问题。我这个报错是在core.py中出现的,而且是color=self.class_colors[class_id]这个语句的问题,不知道什么原因。还请大佬有空帮我看看,谢谢。

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