YOLOv6 icon indicating copy to clipboard operation
YOLOv6 copied to clipboard

训练自定义数据

Open yuanzhougege opened this issue 2 years ago • 5 comments

image

Traceback (most recent call last): File "tools/train.py", line 112, in main(args) File "tools/train.py", line 101, in main trainer = Trainer(args, cfg, device) File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 43, in init self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict) File "/docker_code/yolov6/YOLOv6-main/yolov6/core/engine.py", line 219, in get_data_loader train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size, File "/docker_code/yolov6/YOLOv6-main/yolov6/data/data_load.py", line 41, in create_dataloader dataset = TrainValDataset( File "/docker_code/yolov6/YOLOv6-main/yolov6/data/datasets.py", line 63, in init self.img_paths, self.labels = self.get_imgs_labels(self.img_dir) File "/docker_code/yolov6/YOLOv6-main/yolov6/data/datasets.py", line 307, in get_imgs_labels f"WARNING: No labels found in {osp.dirname(self.img_paths[0])}. " File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/dataset.py", line 83, in getattr raise AttributeError AttributeError

求帮助 看了一整天了

yuanzhougege avatar Jul 12 '22 03:07 yuanzhougege

Hi, what's the dataset structure you used? It seems the image is corrupt, can you open the image normally?

mtjhl avatar Jul 12 '22 03:07 mtjhl

请问怎么解决了 我也是这个问题 并且图片没有损坏

yuanzhougege avatar Jul 14 '22 08:07 yuanzhougege

Hi, what's the dataset structure you used? It seems the image is corrupt, can you open the image normally?

Hello, I have the same problem. I can open images normally in file explorer, and I can read images normally when training with other algorithms.

surlovely avatar Jul 15 '22 09:07 surlovely

请问怎么解决了 我也是这个问题 并且图片没有损坏

你数据集结构搞错了吧,没有找到label。你看下dataset.py的代码,有数据集结构要求的

zheng-yuwei avatar Jul 19 '22 04:07 zheng-yuwei

同样的问题 我查找百度是说是 PIL不支持TIF格式文件读取 ,楼主也是TIF格式图像吧? 暂时没找到解决方法

hichenjuntao avatar Aug 01 '22 14:08 hichenjuntao