jason-li-831202 / Vehicle-CV-ADAS

The project can achieve FCWS, LDWS, and LKAS functions solely using only visual sensors. using YOLOv5 / YOLOv5-lite / YOLOv6 / YOLOv7 / YOLOv8 / YOLOv9 / EfficientDet and Ultra-Fast-Lane-Detection-v2 .
GNU General Public License v3.0
161 stars 37 forks source link

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

Open TJW-XMUT opened 3 months ago

TJW-XMUT commented 3 months ago

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

jason-li-831202 commented 3 months ago

你先檢查一下coco_label.txt是不是80類別或是沒有讀到檔案, 'unknown'是我在detect這邊做的,當處理到沒有正確index才會有的異常labal。 https://github.com/jason-li-831202/Vehicle-CV-ADAS/blob/5852d162abf9d3a26a7e42080fc9fc9d2021efbc/ObjectDetector/yoloDetector.py#L143-L146

TJW-XMUT commented 3 months ago

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

https://github.com/jason-li-831202/Vehicle-CV-ADAS/blob/5852d162abf9d3a26a7e42080fc9fc9d2021efbc/ObjectDetector/yoloDetector.py#L143-L146

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