WongKinYiu / yolor

implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
GNU General Public License v3.0
1.99k stars 520 forks source link

使用BDD100K進行訓練問題 #182

Open ghost opened 2 years ago

ghost commented 2 years ago

您好 我目前使用BDD100k進行訓練時遇到bug想請問如何解決? 1.網路架構cfg檔已經修改完成 2.yaml檔格式如下 train and val datasets (image directory or *.txt file with image paths) train: ../BDD100k/images/train/ # 118k images val: ../BDD100k/images/val/ # 5k images test: ../BDD100k/images/test/ # 20k images for submission to https://competitions.codalab.org/competitions/20794

nc: 10

names: ['person', 'car', 'rider', 'bus', 'truck', 'bike', 'motor' ,'traffic light', 'traffic sign' ,'train']

跳出了`AssertionError: Image Not Found E:\Datasets\BDD100k\images\train\0000f77c-6257be58.jpg

codecs\src\loadsave.cpp (239) cv::findDecoder imread_('E:\Datasets\BDD100k\images\train\005ff190-5be4cdfa.jpg'): can't open/read file: check file path/integrity ` 基本上是讀檔問題,請問我是還有哪個部分程式需要修改呢?

Kaschi14 commented 11 months ago

In yolor/utils/dataset.py after line 928 (path = self.img_files[index]) add path = path.replace("\\", "/")

Quick and dirty solution, I didn't find the reason why it appends the path with backslash instead of forwards slash (worked fine with Windows, because backslash is normal for the windows path, but did not work in Linux Ubuntu)