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

Is it possible to train from multiple data directory? #890

Closed
hardikdava opened this issue May 3, 2023 · 3 comments
Closed

Is it possible to train from multiple data directory? #890

hardikdava opened this issue May 3, 2023 · 3 comments

Comments

@hardikdava
Copy link

Hello, i am curious for new yolo nas model. I am new to super gradient. Is it possible to train a model on custom dataset which are prepared in yolov5/8 format specially in multiple directories?

@dagshub
Copy link

dagshub bot commented May 3, 2023

@Louis-Dupont
Copy link
Contributor

Louis-Dupont commented May 3, 2023

Hi @hardikdava!

When you say multiple directory, do you mean different for train/val and images/labels (which is the default yolov5/8 format) ?

        data_dir
        ├── train
        │   ├── images
        │   │      ├─ 0001.jpg
        │   │      ├─ 0002.jpg
        │   │      └─ ...
        │   └── labels
        │          ├─ 0001.txt
        │          ├─ 0002.txt
        │          └─ ...
        └── val
            ├── images
            │      ├─ 434343.jpg
            │      ├─ 434344.jpg
            │      └─ ...
            └── labels
                   ├─ 434343.txt
                   ├─ 434344.txt
                   └─ ...

We support this case and showcase how to do it in our demo notebooks.

Or do you mean something less common, where you would want to use images/labels from 2 different folders each (train_part_1/images + train_part_2/images), like in the following:

        data_dir
        ├── train_part_1
        │   ├── images
        │   │      ├─ 0001.jpg
        │   │      ├─ 0002.jpg
        │   │      └─ ...
        │   └── labels
        │          ├─ 0001.txt
        │          ├─ 0002.txt
        │          └─ ...
        └── train_part_2
            ├── images
            │      ├─ 434343.jpg
            │      ├─ 434344.jpg
            │      └─ ...
            └── labels
                   ├─ 434343.txt
                   ├─ 434344.txt
                   └─ ...

This case is not supported out of the box, but you can simply create a 3rd folder that would concatenate both into the same structure as the first case, and then use the code provided in our demo notebooks.

If it's something else, feel free to show the structure of the dataset you are talking about :)

@hardikdava
Copy link
Author

Thank you for your reply @Louis-Dupont . I want to train as per second option (train_part_1/images + train_part_2/images). I will accumulate all the data then try to run it. But thank you for your reply again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants