-
Notifications
You must be signed in to change notification settings - Fork 211
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 can I use a custom dataset for training? #186
Comments
You can use this functions: register_coco_instances to register your dataset in config file, and then update the dataset name |
Here is an example: # dataset config
from detectron2.data.datasets import register_coco_instances
register_coco_instances("my_dataset", {}, "path/to/json", "path/to/image_root")
dataloader.train = L(build_detection_train_loader)(
dataset=L(get_detection_dataset_dicts)(names="my_dataset"),
... |
Please refer to custom.py to see how to register and use coco-like datasets in detrex and d2~ |
I see. Thank you very much for your reply. |
You're welcome~ |
File "/workspace/detrex/detectron2/detectron2/evaluation/coco_evaluation.py", line 240, in _eval_predictions I use a custom dataset for training, but meet the error. |
I had the same problem. I need help. |
Maybe can help you. #267 (comment) |
您好,你的邮件我已经收到~
|
After modifying the custom.py file, run python tools/train_net.py --config-file projects/dab_detr/configs/models/dab_detr_r50.py, A Missing key train error occurred |
ERROR [09/30 16:04:15 d2.config.instantiate]: Error when instantiating detectron2.data.build.build_detection_train_loader! |
How can I use a custom dataset for training?
I have made the data in COCO2017 format, but the number of classes and class names are different from COCO, which file should I change?
The text was updated successfully, but these errors were encountered: