|
1 | 1 | from mmengine.config import read_base |
2 | 2 |
|
3 | 3 | with read_base(): |
4 | | - from ._base_.default_runtime import * |
5 | | - from ._base_.schedules.schedule_1x import * |
6 | | - from .datasets.coco_detection import * |
| 4 | + from .._base_.default_runtime import * |
| 5 | + from .._base_.schedules.schedule_1x import * |
| 6 | + from ..datasets.coco_detection import * |
7 | 7 |
|
8 | 8 | from torchvision.ops import nms |
9 | 9 | from torch.nn import ReLU, BatchNorm2d |
|
45 | 45 | from sscma.quantizer import RtmdetQuantModel |
46 | 46 |
|
47 | 47 | default_hooks.visualization = dict( |
48 | | - type=DetVisualizationHook, draw=True, test_out_dir="works" |
| 48 | + type=DetVisualizationHook, draw=False, test_out_dir="works" |
49 | 49 | ) |
50 | 50 |
|
51 | 51 | visualizer = dict(type=DetLocalVisualizer, vis_backends=vis_backends, name="visualizer") |
|
73 | 73 | type=RTMDet, |
74 | 74 | data_preprocessor=dict( |
75 | 75 | type=DetDataPreprocessor, |
76 | | - mean=[0, 0, 0], |
77 | | - std=[255, 255, 255], |
| 76 | + mean=[103.53, 116.28, 123.675], |
| 77 | + std=[57.375, 57.12, 58.395], |
78 | 78 | bgr_to_rgb=False, |
79 | 79 | batch_augments=None, |
80 | 80 | ), |
|
160 | 160 | bbox_head=model["bbox_head"], |
161 | 161 | data_preprocessor=model["data_preprocessor"], # data_preprocessor, |
162 | 162 | ) |
163 | | -imdecode_backend = "torch" |
| 163 | +imdecode_backend = "pillow" |
164 | 164 | train_pipeline = [ |
165 | 165 | dict( |
166 | 166 | type=LoadImageFromFile, |
|
219 | 219 | ] |
220 | 220 |
|
221 | 221 | test_pipeline = [ |
222 | | - dict(type=LoadImageFromFile,imdecode_backend=imdecode_backend, backend_args=backend_args), |
| 222 | + dict(type=LoadImageFromFile,imdecode_backend=imdecode_backend, backend_args=None), |
223 | 223 | dict(type=LoadAnnotations,imdecode_backend=imdecode_backend, with_bbox=True), |
224 | 224 | dict(type=Resize, scale=imgsz, keep_ratio=True), |
225 | 225 | dict(type=Pad, size=imgsz, pad_val=dict(img=(114, 114, 114))), |
|
254 | 254 |
|
255 | 255 |
|
256 | 256 | val_dataloader = dict( |
257 | | - batch_size=16, |
| 257 | + batch_size=32, |
258 | 258 | num_workers=8, |
259 | 259 | persistent_workers=True, |
260 | 260 | pin_memory=True, |
|
0 commit comments