repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_engine/test_hooks/test_memory_profiler_hook.py
tests/test_engine/test_hooks/test_memory_profiler_hook.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase from unittest.mock import Mock from mmdet.engine.hooks import MemoryProfilerHook class TestMemoryProfilerHook(TestCase): def test_after_train_iter(self): hook = MemoryProfilerHook(2) runner = Mock() runner.logg...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_engine/test_hooks/test_mean_teacher_hook.py
tests/test_engine/test_hooks/test_mean_teacher_hook.py
# Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import tempfile from unittest import TestCase import torch import torch.nn as nn from mmengine.evaluator import BaseMetric from mmengine.model import BaseModel from mmengine.optim import OptimWrapper from mmengine.registry import MODEL_WRAPPERS from...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_engine/test_hooks/test_pipeline_switch_hook.py
tests/test_engine/test_hooks/test_pipeline_switch_hook.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase from unittest.mock import Mock from mmdet.engine.hooks import PipelineSwitchHook class TestPipelineSwitchHook(TestCase): def test_persistent_workers_on(self): runner = Mock() runner.model = Mock() runner.model....
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_engine/test_schedulers/test_quadratic_warmup.py
tests/test_engine/test_schedulers/test_quadratic_warmup.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch import torch.nn.functional as F import torch.optim as optim from mmengine.optim.scheduler import _ParamScheduler from mmengine.testing import assert_allclose from mmdet.engine.schedulers import (QuadraticWarmupLR, ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_tracking_heads/test_mask2former_track_head.py
tests/test_models/test_tracking_heads/test_mask2former_track_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmdet.models.tracking_heads import Mask2FormerTrackHead from mmdet.structures import DetDataSample, TrackDataSample from mmdet.testing import demo_track_inputs class TestMask2FormerHead(TestCa...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_tracking_heads/test_roi_embed_head.py
tests/test_models/test_tracking_heads/test_roi_embed_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import mmengine import torch from mmengine.structures import InstanceData from mmdet.models.tracking_heads import RoIEmbedHead from mmdet.registry import TASK_UTILS def _dummy_bbox_sampling(rpn_results_list, batch_gt_instances): """Cr...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_tracking_heads/test_quasi_dense_track_head.py
tests/test_models/test_tracking_heads/test_quasi_dense_track_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import init_default_scope from mmengine.config import Config from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.testing import demo_track_inputs, random_boxes def _fake_pro...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_tracking_heads/test_quasi_dense_embed_head.py
tests/test_models/test_tracking_heads/test_quasi_dense_embed_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import mmengine import torch from mmengine.structures import InstanceData from mmdet.models.tracking_heads import QuasiDenseEmbedHead from mmdet.registry import TASK_UTILS def _dummy_bbox_sampling(rpn_results_list, batch_gt_instances): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_dino.py
tests/test_models/test_detectors/test_dino.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestDINO(...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_single_stage_instance_seg.py
tests/test_models/test_detectors/test_single_stage_instance_seg.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestSingleStageI...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_deformable_detr.py
tests/test_models/test_detectors/test_deformable_detr.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestDefor...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_semi_base.py
tests/test_models/test_detectors/test_semi_base.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase from mmengine.registry import MODELS from parameterized import parameterized from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules register_all_modules() class TestSemiBase(TestCase): @parameterized...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_panoptic_two_stage_segmentor.py
tests/test_models/test_detectors/test_panoptic_two_stage_segmentor.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import torch from parameterized import parameterized from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing._utils import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestT...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_dab_detr.py
tests/test_models/test_detectors/test_dab_detr.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestDABDE...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_two_stage.py
tests/test_models/test_detectors/test_two_stage.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestTwoStageBBox...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_detr.py
tests/test_models/test_detectors/test_detr.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestDETR(...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_kd_single_stage.py
tests/test_models/test_detectors/test_kd_single_stage.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet import * # noqa from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modu...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_glip.py
tests/test_models/test_detectors/test_glip.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestGLIP(TestCas...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_cornernet.py
tests/test_models/test_detectors/test_cornernet.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from mmengine.config import ConfigDict from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestCornerNet(Tes...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_ddq_detr.py
tests/test_models/test_detectors/test_ddq_detr.py
# Copyright (c) OpenMMLab. All rights reserved. import json from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules cla...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_maskformer.py
tests/test_models/test_detectors/test_maskformer.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import torch from parameterized import parameterized from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing._utils import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestM...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_conditional_detr.py
tests/test_models/test_detectors/test_conditional_detr.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.registry import MODELS from mmdet.structures import DetDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestCondi...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_single_stage.py
tests/test_models/test_detectors/test_single_stage.py
# Copyright (c) OpenMMLab. All rights reserved. import time import unittest from unittest import TestCase import torch from mmengine.logging import MessageHub from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_detectors/test_rpn.py
tests/test_models/test_detectors/test_rpn.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest from unittest import TestCase import torch from parameterized import parameterized from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs, get_detector_cfg from mmdet.utils import register_all_modules class TestRPN(TestCase...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_seg_heads/test_panoptic_fpn_head.py
tests/test_models/test_seg_heads/test_panoptic_fpn_head.py
import unittest import torch from mmengine.structures import PixelData from mmengine.testing import assert_allclose from mmdet.models.seg_heads import PanopticFPNHead from mmdet.structures import DetDataSample class TestPanopticFPNHead(unittest.TestCase): def test_init_weights(self): head = PanopticFPN...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_seg_heads/test_maskformer_fusion_head.py
tests/test_models/test_seg_heads/test_maskformer_fusion_head.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import torch from mmengine.config import Config from mmdet.models.seg_heads.panoptic_fusion_heads import MaskFormerFusionHead from mmdet.structures import DetDataSample class TestMaskFormerFusionHead(unittest.TestCase): def test_loss(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_seg_heads/test_heuristic_fusion_head.py
tests/test_models/test_seg_heads/test_heuristic_fusion_head.py
import unittest import torch from mmengine.config import Config from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.evaluation import INSTANCE_OFFSET from mmdet.models.seg_heads.panoptic_fusion_heads import HeuristicFusionHead class TestHeuristicFusionHead(unittest.T...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_necks/test_ct_resnet_neck.py
tests/test_models/test_necks/test_ct_resnet_neck.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import torch from mmdet.models.necks import CTResNetNeck class TestCTResNetNeck(unittest.TestCase): def test_init(self): # num_filters/num_kernels must be same length with self.assertRaises(AssertionError): CTResNetNeck...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_necks/test_necks.py
tests/test_models/test_necks/test_necks.py
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from torch.nn.modules.batchnorm import _BatchNorm from mmdet.models.necks import (FPG, FPN, FPN_CARAFE, NASFCOS_FPN, NASFPN, SSH, YOLOXPAFPN, ChannelMapper, DilatedEncoder, DyHead,...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_iou2d_calculator.py
tests/test_models/test_task_modules/test_iou2d_calculator.py
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import pytest import torch from mmdet.evaluation import bbox_overlaps as recall_overlaps from mmdet.models.task_modules import BboxOverlaps2D from mmdet.structures.bbox import bbox_overlaps def test_bbox_overlaps_2d(eps=1e-7): def _construct_bbo...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/__init__.py
tests/test_models/test_task_modules/__init__.py
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_samplers/test_pesudo_sampler.py
tests/test_models/test_task_modules/test_samplers/test_pesudo_sampler.py
# TODO: follow up
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_prior_generators/test_anchor_generator.py
tests/test_models/test_task_modules/test_prior_generators/test_anchor_generator.py
# Copyright (c) OpenMMLab. All rights reserved. """ CommandLine: pytest tests/test_utils/test_anchor.py xdoctest tests/test_utils/test_anchor.py zero """ import pytest import torch def test_standard_points_generator(): from mmdet.models.task_modules import build_prior_generator # teat init ancho...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
true
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_coder/test_delta_xywh_bbox_coder.py
tests/test_models/test_task_modules/test_coder/test_delta_xywh_bbox_coder.py
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmdet.models.task_modules.coders import (DeltaXYWHBBoxCoder, DeltaXYWHBBoxCoderForGLIP) def test_delta_bbox_coder(): coder = DeltaXYWHBBoxCoder() rois = torch.Tensor([[0., 0., 1., 1....
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_track/test_aflink.py
tests/test_models/test_task_modules/test_track/test_aflink.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np from mmengine.registry import init_default_scope from torch import nn from mmdet.registry import TASK_UTILS class TestAppearanceFreeLink(TestCase): @classmethod def setUpClass(cls): init_default_scope('...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_track/test_kalman_filter.py
tests/test_models/test_task_modules/test_track/test_kalman_filter.py
from unittest import TestCase import numpy as np from mmengine.registry import init_default_scope from mmdet.registry import TASK_UTILS class TestKalmanFilter(TestCase): @classmethod def setUpClass(cls): init_default_scope('mmdet') motion = dict(type='KalmanFilter', ) cls.kf = TASK_...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_track/test_similarity.py
tests/test_models/test_task_modules/test_track/test_similarity.py
import torch from mmdet.models.task_modules import embed_similarity def test_embed_similarity(): """Test embed similarity.""" embeds = torch.rand(2, 3) similarity = embed_similarity(embeds, embeds) assert similarity.shape == (2, 2)
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_track/test_interpolation.py
tests/test_models/test_task_modules/test_track/test_interpolation.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np from mmengine.registry import init_default_scope from mmdet.registry import TASK_UTILS class TestInterpolateTracklets(TestCase): @classmethod def setUpClass(cls): init_default_scope('mmdet') cls...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_center_region_assigner.py
tests/test_models/test_task_modules/test_assigners/test_center_region_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import CenterRegionAssigner class TestCenterRegionAssigner(TestCase): def test_center_region_assigner(self): center_region_ass...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_point_assigner.py
tests/test_models/test_task_modules/test_assigners/test_point_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import torch from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.models.task_modules.assigners import PointAssigner class TestPointAssigner(unittest.TestCase): def test_point_assigner(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_atss_assigner.py
tests/test_models/test_task_modules/test_assigners/test_atss_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import ATSSAssigner class TestATSSAssigner(TestCase): def test_atss_assigner(self): atss_assigner = ATSSAssigner(topk=9) ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_max_iou_assigner.py
tests/test_models/test_task_modules/test_assigners/test_max_iou_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. """Tests the Assigner objects. CommandLine: pytest tests/test_core/test_bbox/test_assigners/test_max_iou_assigner.py xdoctest tests/test_core/test_bbox/test_assigners/test_max_iou_assigner.py zero """ # noqa import pytest import torch from mmengine.structures i...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_topk_hungarian_assigner.py
tests/test_models/test_task_modules/test_assigners/test_topk_hungarian_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import ConfigDict from mmdet.models.task_modules.assigners import TopkHungarianAssigner class TestTopkHungarianAssigner(TestCase): def test_init(self): with self.assertRaises(AssertionError): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_approx_max_iou_assigner.py
tests/test_models/test_task_modules/test_assigners/test_approx_max_iou_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import ApproxMaxIoUAssigner class TestApproxIoUAssigner(TestCase): def test_approx_iou_assigner(self): assigner = ApproxMaxIoU...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_dynamic_soft_label_assigner.py
tests/test_models/test_task_modules/test_assigners/test_dynamic_soft_label_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.models.task_modules.assigners import DynamicSoftLabelAssigner from mmdet.structures.bbox import HorizontalBoxes class TestDy...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_region_assigner.py
tests/test_models/test_task_modules/test_assigners/test_region_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import RegionAssigner class TestRegionAssigner(TestCase): def setUp(self): self.img_met...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_task_uniform_assigner.py
tests/test_models/test_task_modules/test_assigners/test_task_uniform_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.models.task_modules.assigners import UniformAssigner class TestUniformAssigner(TestCase): def test_uniform_assigner(sel...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_simota_assigner.py
tests/test_models/test_task_modules/test_assigners/test_simota_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.models.task_modules.assigners import SimOTAAssigner class TestSimOTAAssigner(TestCase): def test_assign(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_hungarian_assigner.py
tests/test_models/test_task_modules/test_assigners/test_hungarian_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import ConfigDict from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import HungarianAssigner class TestHungarianAssigner(TestCase): def test_init(self): with self...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_grid_assigner.py
tests/test_models/test_task_modules/test_assigners/test_grid_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmengine.testing import assert_allclose from mmdet.models.task_modules.assigners import GridAssigner class TestGridAssigner(TestCase): def test_assign(self): assi...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_task_modules/test_assigners/test_task_aligned_assigner.py
tests/test_models/test_task_modules/test_assigners/test_task_aligned_assigner.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.task_modules.assigners import TaskAlignedAssigner class TestTaskAlignedAssigner(TestCase): def test_task_aligned_assigner(self): with self.assertRai...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_reid/test_base_reid.py
tests/test_models/test_reid/test_base_reid.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from parameterized import parameterized from mmdet.registry import MODELS from mmdet.structures import ReIDDataSample from mmdet.testing import get_detector_cfg from mmdet.utils import register_all_modules class TestBaseReID(...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_reid/test_gap.py
tests/test_models/test_reid/test_gap.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmdet.models import GlobalAveragePooling class TestGlobalAveragePooling(TestCase): def test_forward(self): inputs = torch.rand(32, 128, 14, 14) # test AdaptiveAvgPool2d neck = GlobalAverageP...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_reid/test_fc_module.py
tests/test_models/test_reid/test_fc_module.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmdet.models import FcModule class TestFcModule(TestCase): def test_forward(self): inputs = torch.rand(32, 128) # test fc = FcModule( in_channels=128, out_channels=32...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_reid/test_linear_reid_head.py
tests/test_models/test_reid/test_linear_reid_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmdet.registry import MODELS from mmdet.structures import ReIDDataSample from mmdet.utils import register_all_modules class TestLinearReIDHead(TestCase): @classmethod def setUpClass(cls) -> None: registe...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_data_preprocessors/test_batch_resize.py
tests/test_models/test_data_preprocessors/test_batch_resize.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase from mmdet.models.data_preprocessors import BatchResize, DetDataPreprocessor from mmdet.testing import demo_mm_inputs class TestDetDataPreprocessor(TestCase): def test_batch_resize(self): processor = DetDataPreprocessor( ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_data_preprocessors/test_track_data_preprocessor.py
tests/test_models/test_data_preprocessors/test_track_data_preprocessor.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase from mmdet.models.data_preprocessors import TrackDataPreprocessor from mmdet.testing import demo_track_inputs class TestTrackDataPreprocessor(TestCase): def test_init(self): # test mean is None processor = TrackDataPre...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_data_preprocessors/test_data_preprocessor.py
tests/test_models/test_data_preprocessors/test_data_preprocessor.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.logging import MessageHub from mmdet.models.data_preprocessors import (BatchFixedSizePad, BatchSyncRandomResize, DetDataPre...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_data_preprocessors/test_boxinst_preprocessor.py
tests/test_models/test_data_preprocessors/test_boxinst_preprocessor.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmdet.models.data_preprocessors import BoxInstDataPreprocessor from mmdet.structures import DetDataSample from mmdet.testing import demo_mm_inputs class TestBoxInstDataPreprocessor(TestCase): def test_forward(self):...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_vfnet_head.py
tests/test_models/test_dense_heads/test_vfnet_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import VFNetHead class TestVFNetHead(TestCase): def test_vfnet_head_loss(self): "...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_guided_anchor_head.py
tests/test_models/test_dense_heads/test_guided_anchor_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import GuidedAnchorHead guided_anchor_head_config = ConfigDict( dict( num_classes=4, in_chan...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_rpn_head.py
tests/test_models/test_dense_heads/test_rpn_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import pytest import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import RPNHead class TestRPNHead(TestCase): def test_init(self): ""...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_autoassign_head.py
tests/test_models/test_dense_heads/test_autoassign_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import AutoAssignHead class TestAutoAssignHead(TestCase): def test_autoassign_head_loss(self): """Tests autoassign head loss when truth i...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_gfl_head.py
tests/test_models/test_dense_heads/test_gfl_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import GFLHead class TestGFLHead(TestCase): def test_gfl_head_loss(self): """Test...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ga_retina_head.py
tests/test_models/test_dense_heads/test_ga_retina_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmdet.models.dense_heads import GARetinaHead ga_retina_head_config = ConfigDict( dict( num_classes=4, in_channels=4, feat_channels=4, stacked_conv...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_tood_head.py
tests/test_models/test_dense_heads/test_tood_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config, MessageHub from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import TOODHead def _tood_head(anchor_type): """Set type of tood head.""" ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_yolo_head.py
tests/test_models/test_dense_heads/test_yolo_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import Config from mmengine.structures import InstanceData from mmdet.models.dense_heads import YOLOV3Head class TestYOLOV3Head(TestCase): def test_yolo_head_loss(self): """Tests YOLO head lo...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_condinst_head.py
tests/test_models/test_dense_heads/test_condinst_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import CondInstBboxHead, CondInstMaskHead from mmdet.structures.mask import BitmapMasks def ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_solov2_head.py
tests/test_models/test_dense_heads/test_solov2_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import SOLOV2Head from mmdet.structures.mask import BitmapMasks ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_sabl_retina_head.py
tests/test_models/test_dense_heads/test_sabl_retina_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import SABLRetinaHead class TestSABLRetinaHead(TestCase): def test_sabl_retina_head(self): """Test...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_fsaf_head.py
tests/test_models/test_dense_heads/test_fsaf_head.py
# Copyright (c) OpenMMLab. All rights reserved. from math import ceil from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet.models.dense_heads import FSAFHead class TestFSAFHead(TestCase): def test_fsaf_head_loss(self): """Tests f...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_fovea_head.py
tests/test_models/test_dense_heads/test_fovea_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import FoveaHead class TestFOVEAHead(TestCase): def test_fovea_head_loss(self): """Tests anchor head loss when truth is empty and non-emp...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ld_head.py
tests/test_models/test_dense_heads/test_ld_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import GFLHead, LDHead class TestLDHead(TestCase): def test_ld_head_loss(self): "...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_cascade_rpn_head.py
tests/test_models/test_dense_heads/test_cascade_rpn_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import CascadeRPNHead from mmdet.structures import DetDataSample rpn_weight = 0.7 cascade_rpn_config = ConfigDic...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_reppoints_head.py
tests/test_models/test_dense_heads/test_reppoints_head.py
import unittest import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from parameterized import parameterized from mmdet.models.dense_heads import RepPointsHead from mmdet.structures import DetDataSample class TestRepPointsHead(unittest.TestCase): @parameterized.expan...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_fcos_head.py
tests/test_models/test_dense_heads/test_fcos_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import FCOSHead class TestFCOSHead(TestCase): def test_fcos_head_loss(self): """Tests fcos head loss when truth is empty and non-empty.""...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ddod_head.py
tests/test_models/test_dense_heads/test_ddod_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import DDODHead class TestDDODHead(TestCase): def test_ddod_head_loss(self): """T...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ddq_detr_head.py
tests/test_models/test_dense_heads/test_ddq_detr_head.py
# Copyright (c) OpenMMLab. All rights reserved. import json from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet.models.dense_heads import DDQDETRHead from mmdet.structures import DetDataSample class TestDDQDETRHead(TestCase): def test_d...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_corner_head.py
tests/test_models/test_dense_heads/test_corner_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.evaluation import bbox_overlaps from mmdet.models.dense_heads import CornerHead class TestCornerHead(TestCase): def test_corner_head_loss(self): """Tests co...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_boxinst_head.py
tests/test_models/test_dense_heads/test_boxinst_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine import MessageHub from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import BoxInstBboxHead, BoxInstMaskHead from mmdet.structures....
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_yolox_head.py
tests/test_models/test_dense_heads/test_yolox_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmcv.cnn import ConvModule, DepthwiseSeparableConvModule from mmengine.config import Config from mmengine.model import bias_init_with_prob from mmengine.structures import InstanceData from mmengine.testing import assert_all...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_lad_head.py
tests/test_models/test_dense_heads/test_lad_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import LADHead, lad_head from mmdet.models.dense_heads.lad_head import levels...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_paa_head.py
tests/test_models/test_dense_heads/test_paa_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import PAAHead, paa_head from mmdet.models.utils import levels_to_images cl...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_pisa_retinanet_head.py
tests/test_models/test_dense_heads/test_pisa_retinanet_head.py
# Copyright (c) OpenMMLab. All rights reserved. from math import ceil from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import PISARetinaHead class TestPISARetinaHead(TestCase): def test_...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_centernet_head.py
tests/test_models/test_dense_heads/test_centernet_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import CenterNetHead class TestCenterNetHead(TestCase): def test_center_head_loss(self): """Tests ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_atss_head.py
tests/test_models/test_dense_heads/test_atss_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import ATSSHead class TestATSSHead(TestCase): def test_atss_head_loss(self): """T...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_anchor_head.py
tests/test_models/test_dense_heads/test_anchor_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import AnchorHead class TestAnchorHead(TestCase): def test_anchor_head_loss(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_pisa_ssd_head.py
tests/test_models/test_dense_heads/test_pisa_ssd_head.py
# Copyright (c) OpenMMLab. All rights reserved. from math import ceil from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import PISASSDHead class TestPISASSDHead(TestCase): def test_pisa_s...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_retina_sepBN_head.py
tests/test_models/test_dense_heads/test_retina_sepBN_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import RetinaSepBNHead class TestRetinaSepBNHead(TestCase): def test_init(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_solo_head.py
tests/test_models/test_dense_heads/test_solo_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import numpy as np import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from parameterized import parameterized from mmdet import * # noqa from mmdet.models.dense_heads import (DecoupledSOLOHead,...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ssd_head.py
tests/test_models/test_dense_heads/test_ssd_head.py
# Copyright (c) OpenMMLab. All rights reserved. from math import ceil from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import SSDHead class TestSSDHead(TestCase): def test_ssd_head_loss(...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_centripetal_head.py
tests/test_models/test_dense_heads/test_centripetal_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import CentripetalHead class TestCentripetalHead(TestCase): def test_centripetal_head_loss(self): """Tests corner head loss when truth is...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_embedding_rpn_head.py
tests/test_models/test_dense_heads/test_embedding_rpn_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import pytest import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import EmbeddingRPNHead from mmdet.structures import DetDataSample class TestEmbeddingRPNHead(TestCase): def test_init(self): ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_nasfcos_head.py
tests/test_models/test_dense_heads/test_nasfcos_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import NASFCOSHead class TestNASFCOSHead(TestCase): def test_nasfcos_head_loss(self): """Tests nasfcos head loss when truth is empty and ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_yolof_head.py
tests/test_models/test_dense_heads/test_yolof_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine import Config from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import YOLOFHead class TestYOLOFHead(TestCase): def test_yolof_head_loss(self): "...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_free_anchor_head.py
tests/test_models/test_dense_heads/test_free_anchor_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet import * # noqa from mmdet.models.dense_heads import FreeAnchorRetinaHead class TestFreeAnchorRetinaHead(TestCase): def test_free_anchor_head_loss(self): "...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_ga_rpn_head.py
tests/test_models/test_dense_heads/test_ga_rpn_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.config import ConfigDict from mmengine.structures import InstanceData from mmdet.models.dense_heads import GARPNHead ga_rpn_config = ConfigDict( dict( num_classes=1, in_channels=4, fea...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_dense_heads/test_centernet_update_head.py
tests/test_models/test_dense_heads/test_centernet_update_head.py
# Copyright (c) OpenMMLab. All rights reserved. from unittest import TestCase import torch from mmengine.structures import InstanceData from mmdet.models.dense_heads import CenterNetUpdateHead class TestCenterNetUpdateHead(TestCase): def test_centernet_update_head_loss(self): """Tests fcos head loss wh...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_layers/test_transformer.py
tests/test_models/test_layers/test_transformer.py
# Copyright (c) OpenMMLab. All rights reserved. import pytest import torch from mmengine.config import ConfigDict from mmdet.models.layers.transformer import (AdaptivePadding, DDQTransformerDecoder, DetrTransformerDecoder, ...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false
open-mmlab/mmdetection
https://github.com/open-mmlab/mmdetection/blob/cfd5d3a985b0249de009b67d04f37263e11cdf3d/tests/test_models/test_layers/test_plugins.py
tests/test_models/test_layers/test_plugins.py
# Copyright (c) OpenMMLab. All rights reserved. import unittest import pytest import torch from mmengine.config import ConfigDict from mmdet.models.layers import DropBlock from mmdet.registry import MODELS from mmdet.utils import register_all_modules register_all_modules() def test_dropblock(): feat = torch.ra...
python
Apache-2.0
cfd5d3a985b0249de009b67d04f37263e11cdf3d
2026-01-04T14:42:57.197037Z
false