Giter VIP home page Giter VIP logo

Comments (32)

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024 1

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

Screenshot from 2022-06-25 13-58-30
i don't think i make a mistake in organizing the datasets.

from yolov6.

Chilicyy avatar Chilicyy commented on September 25, 2024

Maybe you can try changing the relative path to absolute path in data/coco.yaml.

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

Sorry to bother you again,i tried to use the absolute path in coco.yaml, but this issue still exists,like this:
this is my coco.yaml
Screenshot from 2022-06-25 15-24-31
this is the issue :
Screenshot from 2022-06-25 15-24-12
how to fix this issue.i'm very confused now .

from yolov6.

meituan-gengyifei avatar meituan-gengyifei commented on September 25, 2024

Maybe you can try ‘ls + data-path' to verify the absolute path that is correct?Judging from the current problem, it should still be the problem that the path is not written correctly, thanks

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

ok, i have solved it, thanks a lot

from yolov6.

ruoyuchen0903 avatar ruoyuchen0903 commented on September 25, 2024

ok, i have solved it, thanks a lot

想问问怎么解决的可以嘛?可以用voc数据集的格式嘛?

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

ruoyuchen0903 avatar ruoyuchen0903 commented on September 25, 2024

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

shenshi19 avatar shenshi19 commented on September 25, 2024

voc的话好像得改很多东西,这个用的应该就是Coco格式的数据集,应该是数据集组织不对,我把数据集文件的组织树关系按照终端上的提示改了一下,就好了,但是跑起来loss就一个有数字,其他都为0,模型跑不出来,也不知道为啥,

---Original--- From: @.> Date: Mon, Jun 27, 2022 11:02 AM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is aninvalid directory path! (Issue #48) 噢噢好的,能具体说说数据集的格式是哪出问题了嘛?要修改哪里?其他yolo训练用这个完全没问题呀。 2022-06-27 00:46:04LiJiahang617 @.>写道: 不可以,要用coco的。最后还是发现是路径有问题,按照terminal里面的提示把一些参数文件放到指定的位置就可以了,不过这个项目目前有bug,我训练的map还有loss那些全是0,解决不了
---Original--- From: @.
> Date: Sun, Jun 26, 2022 23:15 PM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is an invalid directory path! (Issue #48) ok, i have solved it, thanks a lot 想问问怎么解决的可以嘛?可以用voc数据集的格式嘛? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

Traceback (most recent call last):
File "tools/train.py", line 87, in
main(args)
File "tools/train.py", line 76, in main
trainer = Trainer(args, cfg, device)
File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 40, in init
self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict)
File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 206, in get_data_loader
train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size,
File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/data_load.py", line 23, in create_dataloader
dataset = TrainValDataset(path, img_size, batch_size,
File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 39, in init
self.img_paths, self.labels = self.get_imgs_labels(self.img_dir)
File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 184, in get_imgs_labels
assert osp.exists(label_dir), f'{label_dir} is an invalid directory path!'
AssertionError: /home/lrq/yolotest/YOLOv6-main/YOLOv6-main/data/coco/labels/train2017 is an invalid directory path!
大神,您可以帮我看一下我需要改哪里吗?

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

shenshi19 avatar shenshi19 commented on September 25, 2024

你看看最后两行,你对应的那个路径里面有相应的文件嘛,那个路径你应该是没放东西,往那个路径里面放对应的东西就可以了

---Original--- From: @.> Date: Mon, Jun 27, 2022 15:20 PM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is an invalid directory path! (Issue #48) voc的话好像得改很多东西,这个用的应该就是Coco格式的数据集,应该是数据集组织不对,我把数据集文件的组织树关系按照终端上的提示改了一下,就好了,但是跑起来loss就一个有数字,其他都为0,模型跑不出来,也不知道为啥, … ---Original--- From: @.> Date: Mon, Jun 27, 2022 11:02 AM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is aninvalid directory path! (Issue #48) 噢噢好的,能具体说说数据集的格式是哪出问题了嘛?要修改哪里?其他yolo训练用这个完全没问题呀。 2022-06-27 00:46:04LiJiahang617 @.>写道: 不可以,要用coco的。最后还是发现是路径有问题,按照terminal里面的提示把一些参数文件放到指定的位置就可以了,不过这个项目目前有bug,我训练的map还有loss那些全是0,解决不了 ---Original--- From: @.> Date: Sun, Jun 26, 2022 23:15 PM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is an invalid directory path! (Issue #48) ok, i have solved it, thanks a lot 想问问怎么解决的可以嘛?可以用voc数据集的格式嘛? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> Traceback (most recent call last): File "tools/train.py", line 87, in main(args) File "tools/train.py", line 76, in main trainer = Trainer(args, cfg, device) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 40, in init self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 206, in get_data_loader train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/data_load.py", line 23, in create_dataloader dataset = TrainValDataset(path, img_size, batch_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 39, in init self.img_paths, self.labels = self.get_imgs_labels(self.img_dir) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 184, in get_imgs_labels assert osp.exists(label_dir), f'{label_dir} is an invalid directory path!' AssertionError: /home/lrq/yolotest/YOLOv6-main/YOLOv6-main/data/coco/labels/train2017 is an invalid directory path! 大神,您可以帮我看一下我需要改哪里吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
已经解决,感谢感谢

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

ruoyuchen0903 avatar ruoyuchen0903 commented on September 25, 2024

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

shenshi19 avatar shenshi19 commented on September 25, 2024

您好,我的数据集是这么排列的,怎样改呢? --data --annotations --instance train --instance val --images --train --val --test --labels --train --val --test 2022-06-27 15:20:36shenshi19 @.>写道: voc的话好像得改很多东西,这个用的应该就是Coco格式的数据集,应该是数据集组织不对,我把数据集文件的组织树关系按照终端上的提示改了一下,就好了,但是跑起来loss就一个有数字,其他都为0,模型跑不出来,也不知道为啥, … ---Original--- From: @.> Date: Mon, Jun 27, 2022 11:02 AM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is aninvalid directory path! (Issue #48) 噢噢好的,能具体说说数据集的格式是哪出问题了嘛?要修改哪里?其他yolo训练用这个完全没问题呀。 2022-06-27 00:46:04LiJiahang617 @.>写道: 不可以,要用coco的。最后还是发现是路径有问题,按照terminal里面的提示把一些参数文件放到指定的位置就可以了,不过这个项目目前有bug,我训练的map还有loss那些全是0,解决不了 ---Original--- From: @.> Date: Sun, Jun 26, 2022 23:15 PM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is an invalid directory path! (Issue #48) ok, i have solved it, thanks a lot 想问问怎么解决的可以嘛?可以用voc数据集的格式嘛? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> Traceback (most recent call last): File "tools/train.py", line 87, in main(args) File "tools/train.py", line 76, in main trainer = Trainer(args, cfg, device) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 40, in init self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 206, in get_data_loader train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/data_load.py", line 23, in create_dataloader dataset = TrainValDataset(path, img_size, batch_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 39, in init self.img_paths, self.labels = self.get_imgs_labels(self.img_dir) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 184, in get_imgs_labels assert osp.exists(label_dir), f'{label_dir} is an invalid directory path!' AssertionError: /home/lrq/yolotest/YOLOv6-main/YOLOv6-main/data/coco/labels/train2017 is an invalid directory path! 大神,您可以帮我看一下我需要改哪里吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

删掉images试试

from yolov6.

ruoyuchen0903 avatar ruoyuchen0903 commented on September 25, 2024

from yolov6.

ruoyuchen0903 avatar ruoyuchen0903 commented on September 25, 2024

from yolov6.

shenshi19 avatar shenshi19 commented on September 25, 2024

删掉了还是显示AssertionError: Results do not correspond to current coco set。头疼 2022-06-27 16:29:59shenshi19 @.>写道: 您好,我的数据集是这么排列的,怎样改呢? --data --annotations --instance train --instance val --images --train --val --test --labels --train --val --test 2022-06-27 15:20:36shenshi19 @.>写道: voc的话好像得改很多东西,这个用的应该就是Coco格式的数据集,应该是数据集组织不对,我把数据集文件的组织树关系按照终端上的提示改了一下,就好了,但是跑起来loss就一个有数字,其他都为0,模型跑不出来,也不知道为啥, … ---Original--- From: @.> Date: Mon, Jun 27, 2022 11:02 AM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is aninvalid directory path! (Issue #48) 噢噢好的,能具体说说数据集的格式是哪出问题了嘛?要修改哪里?其他yolo训练用这个完全没问题呀。 2022-06-27 00:46:04LiJiahang617 @.>写道: 不可以,要用coco的。最后还是发现是路径有问题,按照terminal里面的提示把一些参数文件放到指定的位置就可以了,不过这个项目目前有bug,我训练的map还有loss那些全是0,解决不了 ---Original--- From: @.> Date: Sun, Jun 26, 2022 23:15 PM To: @.>; Cc: @.@.>; Subject: Re: [meituan/YOLOv6] AssertionError: ../coco/images/train2017 is an invalid directory path! (Issue #48) ok, i have solved it, thanks a lot 想问问怎么解决的可以嘛?可以用voc数据集的格式嘛? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> Traceback (most recent call last): File "tools/train.py", line 87, in main(args) File "tools/train.py", line 76, in main trainer = Trainer(args, cfg, device) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 40, in init self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/core/engine.py", line 206, in get_data_loader train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/data_load.py", line 23, in create_dataloader dataset = TrainValDataset(path, img_size, batch_size, File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 39, in init self.img_paths, self.labels = self.get_imgs_labels(self.img_dir) File "/home/lrq/yolotest/YOLOv6-main/YOLOv6-main/yolov6/data/datasets.py", line 184, in get_imgs_labels assert osp.exists(label_dir), f'{label_dir} is an invalid directory path!' AssertionError: /home/lrq/yolotest/YOLOv6-main/YOLOv6-main/data/coco/labels/train2017 is an invalid directory path! 大神,您可以帮我看一下我需要改哪里吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> 删掉images试试 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
我记得是train2017

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

shenshi19 avatar shenshi19 commented on September 25, 2024

Maybe you can try ‘ls + data-path' to verify the absolute path that is correct?Judging from the current problem, it should still be the problem that the path is not written correctly, thanks

我遇到了同样的问题,损失,map都是0

from yolov6.

AhmedEmadEldinHussin avatar AhmedEmadEldinHussin commented on September 25, 2024

I have the same problem
ls directory is working fine
AssertionError: /home/ahmed/yolov6/images/labels/ is an invalid directory path!

from yolov6.

noreenanwar avatar noreenanwar commented on September 25, 2024

ok, i have solved it, thanks a lot

how you solve this?

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

noreenanwar avatar noreenanwar commented on September 25, 2024

I did the same but I am facing error

from yolov6.

geekdreamer04 avatar geekdreamer04 commented on September 25, 2024

python tools/train.py --batch 32 --conf configs/yolov6s.py --data data/coco.yaml --device 0
training args are: Namespace(batch_size=32, check_images=False, check_labels=False, conf_file='configs/yolov6s.py', data_path='data/coco.yaml', device='0', dist_url='env://', epochs=400, eval_final_only=False, eval_interval=20, gpu_count=0, heavy_eval_range=50, img_size=640, local_rank=-1, name='exp', output_dir='./runs/train', rank=-1, resume=None, workers=8, world_size=1)

Using 1 GPU for training...
Traceback (most recent call last):
File "tools/train.py", line 94, in
main(args)
File "tools/train.py", line 83, in main
trainer = Trainer(args, cfg, device)
File "/home/ubuntu/YOLOv6/yolov6/core/engine.py", line 40, in init
self.train_loader, self.val_loader = self.get_data_loader(args, cfg, self.data_dict)
File "/home/ubuntu/YOLOv6/yolov6/core/engine.py", line 222, in get_data_loader
train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size,
File "/home/ubuntu/YOLOv6/yolov6/data/data_load.py", line 41, in create_dataloader
dataset = TrainValDataset(
File "/home/ubuntu/YOLOv6/yolov6/data/datasets.py", line 63, in init
self.img_paths, self.labels = self.get_imgs_labels(self.img_dir)
File "/home/ubuntu/YOLOv6/yolov6/data/datasets.py", line 256, in get_imgs_labels
assert osp.exists(label_dir), f"{label_dir} is an invalid directory path!"
AssertionError: ../coco/labels/train2014 is an invalid directory path!

I have the same issue. images are loading but the annotations are not loading. I downloaded the coco dataset from the official website and using it directly. Will I have to convert COCO annotations to .txt format? If I have to do that as well, how am I supposed to do it?

from yolov6.

geekdreamer04 avatar geekdreamer04 commented on September 25, 2024

ok, i have solved it, thanks a lot

How did you solve the issue? I have the same issue. Apart from .json annotations do we also need .txt labels?

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

geekdreamer04 avatar geekdreamer04 commented on September 25, 2024

After placing the .txt labels in the folder structure, this issue got resolved for me.

from yolov6.

LiJiahang617 avatar LiJiahang617 commented on September 25, 2024

from yolov6.

noreenanwar avatar noreenanwar commented on September 25, 2024

I have .txt in label folder but still have same error.

from yolov6.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.