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

How to train on new dataset. #21

Closed
SuiyvSYC opened this issue Apr 4, 2024 · 1 comment
Closed

How to train on new dataset. #21

SuiyvSYC opened this issue Apr 4, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@SuiyvSYC
Copy link

SuiyvSYC commented Apr 4, 2024

@w1oves
Thanks for sharing your code, I was wondering which part of the code I should modify if I want to train my own data set? Because your code is complicated, I am not sure if it is ok to modify only train_dataloader? And I don't know how to modify train_dataloader properly
Now, can you choose one of the following questions to answer me?
First question: How do you train the model without using mmengine
Second question: If you have to use mmengine, how many parameter Settings in your config file are redundant? In other words, how many of the parameters in configs/dinov2/rein_dinov2_mask2former_512x512_bs1x4.py can be removed during training?

If you could answer my question, I would be very grateful for it.

@w1oves w1oves changed the title How to train my own dataset。 How to train on new dataset. Apr 5, 2024
@w1oves
Copy link
Owner

w1oves commented Apr 5, 2024

If you intend to train a model on a new dataset, follow these steps:

  1. Create a new configuration file Cfg1 by copying and pasting the configuration from configs/dinov2/rein_dinov2_mask2former_512x512_bs1x4.py.
  2. Create a new dataset configuration Cfg2 in configs/_base_/datasets/.
    • For standard settings, link it to configs/_base_/datasets/cityscapes_512x512.py.
    • For domain generalization settings, link it to configs/_base_/datasets/dg_gta_512x512.py.
  3. Adjust certain parameters in Cfg2, such as train_pipeline (especially for scale), data_root, data_prefix, data_suffix, img_suffix, and seg_map_suffix. Also, modify num_classes in Cfg1.
  4. Replace the imported dataset in the _base_ section of Cfg1.

For more detailed information, refer to the documentation.

@w1oves w1oves pinned this issue Apr 5, 2024
@w1oves w1oves closed this as completed Apr 6, 2024
@w1oves w1oves added the documentation Improvements or additions to documentation label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants