Skip to content
Snippets Groups Projects
Commit 22b7e139 authored by iggotsul's avatar iggotsul
Browse files

fuse conv

parent 4e1b86e6
No related branches found
Tags submission-test-26
No related merge requests found
No preview for this file type
source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -51,6 +51,7 @@ from mmdet.apis import init_detector, inference_detector
from mmdet.apis import multi_gpu_test
from mmdet.datasets import build_dataloader, build_dataset, replace_ImageToTensor
from mmdet.models import build_detector
import pycocotools.mask as mask_util
from utils.mmdet_inference import inference
......@@ -85,13 +86,14 @@ class MMDetectionPredictor(FoodChallengePredictor):
if self.cfg.get("cudnn_benchmark", False):
torch.backends.cudnn.benchmark = True
self.cfg.data.samples_per_gpu = 1
self.cfg.data.workers_per_gpu = 0
self.cfg.data.workers_per_gpu = 1
self.cfg.model.pretrained = None
self.cfg.data.test.test_mode = True
self.cfg.data.test.ann_file = self.test_predictions_file.name
self.cfg.data.test.img_prefix = self.test_data_path
self.model = init_detector(self.cfg_name, self.checkpoint_name, device="cuda:0")
self.model = fuse_conv_bn(self.model)
fp16_cfg = self.cfg.get("fp16", None)
if fp16_cfg is not None:
......
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