Skip to content
Snippets Groups Projects
Commit dc5edc38 authored by yhcao6's avatar yhcao6
Browse files

add benchmark set, reorder parameter of custom dataset

parent f0ecb9d5
No related branches found
No related tags found
No related merge requests found
benchmark = True
# model settings
input_size = 300
model = dict(
......
benchmark = True
# model settings
input_size = 512
model = dict(
......
benchmark = True
# model settings
input_size = 300
model = dict(
......
benchmark = True
# model settings
input_size = 512
model = dict(
......
......@@ -47,9 +47,9 @@ class CustomDataset(Dataset):
with_mask=True,
with_crowd=True,
with_label=True,
test_mode=False,
extra_aug=None,
resize_keep_ratio=True):
resize_keep_ratio=True,
test_mode=False):
# prefix of images path
self.img_prefix = img_prefix
......
......@@ -8,6 +8,7 @@ from mmdet.datasets import get_dataset
from mmdet.apis import (train_detector, init_dist, get_root_logger,
set_random_seed)
from mmdet.models import build_detector
import torch
def parse_args():
......@@ -42,6 +43,9 @@ def main():
args = parse_args()
cfg = Config.fromfile(args.config)
# set benchmark
if cfg.get('benchmark', False):
torch.backends.cudnn.benchmark = True
# update configs according to CLI args
if args.work_dir is not None:
cfg.work_dir = args.work_dir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment