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

Error download LOCO dataset using mt-yolov6 format #270

Open
1 of 2 tasks
vidaldani opened this issue Apr 11, 2024 · 0 comments
Open
1 of 2 tasks

Error download LOCO dataset using mt-yolov6 format #270

vidaldani opened this issue Apr 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vidaldani
Copy link

Search before asking

  • I have searched the Roboflow Notebooks issues and found no similar bug report.

Notebook name

train-yolov6-object-detection-on-custom-data.ipynb

Bug

When I try to download the LOCO dataset in mt-yolov6 format I get the following error for all the training labels.

WARNING: LOCO-ROBOFLOW-3/labels/train/997935-8254_jpg.rf.0c48370dc703a5f0fb7d15e50253fac1.txt: ignoring invalid labels: LOCO-ROBOFLOW-3/labels/train/997935-8254_jpg.rf.0c48370dc703a5f0fb7d15e50253fac1.txt: wrong label format
Traceback (most recent call last):
  File "/content/YOLOv6/YOLOv6/tools/train.py", line 143, in <module>
    main(args)
  File "/content/YOLOv6/YOLOv6/tools/train.py", line 128, in main
    trainer = Trainer(args, cfg, device)
  File "/content/YOLOv6/YOLOv6/yolov6/core/engine.py", line 91, in __init__
    self.train_loader, self.val_loader = self.get_data_loader(self.args, self.cfg, self.data_dict)
  File "/content/YOLOv6/YOLOv6/yolov6/core/engine.py", line 387, in get_data_loader
    train_loader = create_dataloader(train_path, args.img_size, args.batch_size // args.world_size, grid_size,
  File "/content/YOLOv6/YOLOv6/yolov6/data/data_load.py", line 46, in create_dataloader
    dataset = TrainValDataset(
  File "/content/YOLOv6/YOLOv6/yolov6/data/datasets.py", line 82, in __init__
    self.img_paths, self.labels = self.get_imgs_labels(self.img_dir)
  File "/content/YOLOv6/YOLOv6/yolov6/data/datasets.py", line 433, in get_imgs_labels
    img_paths, labels = list(
ValueError: not enough values to unpack (expected 2, got 0)

Therefore the model never trains

Environment

Google Collab GPU T4

Minimal Reproducible Example

!git clone https://github.com/meituan/YOLOv6
%cd YOLOv6
!pip install -r requirements.txt
!pip install roboflow

from roboflow import Roboflow
rf = Roboflow(api_key="api-key")
project = rf.workspace("loco-fml").project("loco-fml")
version = project.version(3)
dataset = version.download("mt-yolov6")
!python tools/train.py --batch 32 --conf configs/yolov6s.py --epochs 100 --img-size 416 --data {dataset.location}/data.yaml --device 0 

Additional

The format obtained has 8 values instead of 4:

1 0.995417 0.702962962962963 0.995417 0.95639 0.735 0.95639 0.735 0.702962962

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@vidaldani vidaldani added the bug Something isn't working label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant