Closed zengzhaoyang closed 1 year ago
Training your own dataset with detrex models, all you need to do is to convert your dataset into coco format and register your dataset in config file as:
# coco_detr.py from detectron2.data.datasets import register_coco_instances register_coco_instances("my_dataset_train", {}, '/path/to/train.json', '/path/to/train/images') register_coco_instances("my_dataset_test", {}, '/path/to/test.json', '/path/to/test/images')
Then modify the dataloader config:
dataloader.train = L(build_detection_train_loader)( dataset=L(get_detection_dataset_dicts)(names="my_dataset_train"), ... dataloader.test = L(build_detection_test_loader)( dataset=L(get_detection_dataset_dicts)(names="my_dataset_test", filter_empty=False), ...
Simple Tutorial
Training your own dataset with detrex models, all you need to do is to convert your dataset into coco format and register your dataset in config file as:
Then modify the dataloader config: