Skip to content

Commit

Permalink
add root
Browse files Browse the repository at this point in the history
  • Loading branch information
LutingWang committed Nov 20, 2024
1 parent c9ae2dd commit dca6274
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 8 additions & 7 deletions configs/datasets/pretrain.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
root = '/mnt/data1/wlt/workspace/OADP/'
split = '_mini'
# split = ''
train_batch_size_per_gpu = 2
Expand Down Expand Up @@ -107,23 +108,23 @@
type='MultiModalDataset',
dataset=dict(
type='YOLOv5Objects365V2Dataset',
data_root='data/objects365v2/',
data_root=f'{root}data/objects365v2/',
ann_file=f'annotations/zhiyuan_objv2_train{split}.json',
data_prefix=dict(img='train/'),
filter_cfg=dict(filter_empty_gt=False, min_size=32)),
class_text_path='data/texts/obj365v2_class_texts.json',
class_text_path=f'{root}data/texts/obj365v2_class_texts.json',
pipeline=train_pipeline_stage1)

mixgrounding_train = dict(type='YOLOv5MixedGroundingDataset',
data_root='data/mixed_grounding/',
data_root=f'{root}data/mixed_grounding/',
ann_file=f'annotations/final_mixed_train_no_coco{split}.json',
data_prefix=dict(img='images/'),
filter_cfg=dict(filter_empty_gt=False, min_size=32),
pipeline=train_pipeline_stage1)

flickr_train = dict(
type='YOLOv5MixedGroundingDataset',
data_root='data/flickr/',
data_root=f'{root}data/flickr/',
ann_file=f'annotations/final_flickr_separateGT_train{split}.json',
data_prefix=dict(img='images/'),
filter_cfg=dict(filter_empty_gt=True, min_size=32),
Expand All @@ -144,13 +145,13 @@
type='MultiModalDataset',
dataset=dict(
type='YOLOv5LVISV1Dataset',
data_root='data/lvis/',
data_root=f'{root}data/lvis/',
test_mode=True,
ann_file=f'annotations/lvis_v1_minival_inserted_image_name{split}.json',
data_prefix=dict(img=''),
batch_shapes_cfg=None
),
class_text_path='data/texts/lvis_v1_class_texts.json',
class_text_path=f'{root}data/texts/lvis_v1_class_texts.json',
pipeline=val_pipeline
)

Expand All @@ -173,6 +174,6 @@

val_evaluator = dict(
type='mmdet.LVISMetric',
ann_file=f'data/lvis/annotations/lvis_v1_minival_inserted_image_name{split}.json',
ann_file=f'{root}data/lvis/annotations/lvis_v1_minival_inserted_image_name{split}.json',
metric='bbox'
)
6 changes: 5 additions & 1 deletion configs/exps/oadp_pretrain_1x.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
'../schedule/schedule_1x.py',
'../models/oadp.py',
'../default_runtime.py'
]
]


root = '/mnt/data1/wlt/workspace/OADP/'
work_dir = f'{root}work_dirs/pretrain'

0 comments on commit dca6274

Please sign in to comment.