MCPcopy Create free account
hub / github.com/PeizeSun/SparseR-CNN / test_with_TTA

Method test_with_TTA

projects/SparseRCNN/train_net.py:104–117  ·  view source on GitHub ↗
(cls, cfg, model)

Source from the content-addressed store, hash-verified

102
103 @classmethod
104 def test_with_TTA(cls, cfg, model):
105 logger = logging.getLogger("detectron2.trainer")
106 # Only support Sparse R-CNN models.
107 logger.info("Running inference with test-time augmentation ...")
108 model = SparseRCNNWithTTA(cfg, model)
109 evaluators = [
110 cls.build_evaluator(
111 cfg, name, output_folder=os.path.join(cfg.OUTPUT_DIR, "inference_TTA")
112 )
113 for name in cfg.DATASETS.TEST
114 ]
115 res = cls.test(cfg, model, evaluators)
116 res = OrderedDict({k + "_TTA": v for k, v in res.items()})
117 return res
118
119def setup(args):
120 """

Callers 1

mainFunction · 0.45

Calls 3

SparseRCNNWithTTAClass · 0.90
build_evaluatorMethod · 0.45
testMethod · 0.45

Tested by

no test coverage detected