diff --git a/tests/vis4d-test-data b/tests/vis4d-test-data index 74f6c08a..054199b4 160000 --- a/tests/vis4d-test-data +++ b/tests/vis4d-test-data @@ -1 +1 @@ -Subproject commit 74f6c08ab0e485dc49ea22a43627a74347030078 +Subproject commit 054199b4c0c368dfbeb0fd8a93b2e0525f1cc357 diff --git a/tests/zoo/bdd100k/qdtrack_test.py b/tests/zoo/bdd100k/qdtrack_test.py index 32390169..2556f364 100644 --- a/tests/zoo/bdd100k/qdtrack_test.py +++ b/tests/zoo/bdd100k/qdtrack_test.py @@ -21,26 +21,3 @@ def test_frcnn_r50_fpn_1x_bdd100k(self) -> None: f"{self.gt_config_path}/qdtrack_frcnn_r50_fpn_1x_bdd100k.yaml", self.varying_keys, ) - - def test_frcnn_r50_fpn_augs_1x_bdd100k(self) -> None: - """Test the config for QDTrack Faster-RCNN. - - This instantiates the config and compares it to a ground truth. - """ - compare_configs( - f"{self.config_prefix}.qdtrack_frcnn_r50_fpn_augs_1x_bdd100k", - f"{self.gt_config_path}/" - + "qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.yaml", - self.varying_keys, - ) - - def test_yolox_x_50e_bdd100k(self) -> None: - """Test the config for QDTrack YOLOX. - - This instantiates the config and compares it to a ground truth. - """ - compare_configs( - f"{self.config_prefix}.qdtrack_yolox_x_50e_bdd100k", - f"{self.gt_config_path}/qdtrack_yolox_x_50e_bdd100k.yaml", - self.varying_keys, - ) diff --git a/tests/zoo/qdtrack_test.py b/tests/zoo/qdtrack_test.py new file mode 100644 index 00000000..2bec3651 --- /dev/null +++ b/tests/zoo/qdtrack_test.py @@ -0,0 +1,35 @@ +"""QDTrack configs tests.""" +import unittest + +from .util import compare_configs + + +class TestQDTrackConfig(unittest.TestCase): + """Tests the content of the provided configs for QDTrack.""" + + config_prefix = "qdtrack" + gt_config_path = "tests/vis4d-test-data/config_test/qdtrack" + varying_keys = ["save_prefix", "output_dir", "version", "timestamp"] + + def test_frcnn_r50_fpn_augs_1x_bdd100k(self) -> None: + """Test the config for QDTrack Faster-RCNN. + + This instantiates the config and compares it to a ground truth. + """ + compare_configs( + f"{self.config_prefix}.qdtrack_frcnn_r50_fpn_augs_1x_bdd100k", + f"{self.gt_config_path}/" + + "qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.yaml", + self.varying_keys, + ) + + def test_yolox_x_50e_bdd100k(self) -> None: + """Test the config for QDTrack YOLOX. + + This instantiates the config and compares it to a ground truth. + """ + compare_configs( + f"{self.config_prefix}.qdtrack_yolox_x_50e_bdd100k", + f"{self.gt_config_path}/qdtrack_yolox_x_50e_bdd100k.yaml", + self.varying_keys, + ) diff --git a/vis4d/zoo/__init__.py b/vis4d/zoo/__init__.py index 592042b7..553819b7 100644 --- a/vis4d/zoo/__init__.py +++ b/vis4d/zoo/__init__.py @@ -9,6 +9,7 @@ from .faster_rcnn import AVAILABLE_MODELS as FASTER_RCNN_MODELS from .fcn_resnet import AVAILABLE_MODELS as FCN_RESNET_MODELS from .mask_rcnn import AVAILABLE_MODELS as MASK_RCNN_MODELS +from .qdtrack import AVAILABLE_MODELS as QDTRACK_MODELS from .retinanet import AVAILABLE_MODELS as RETINANET_MODELS from .shift import AVAILABLE_MODELS as SHIFT_MODELS from .vit import AVAILABLE_MODELS as VIT_MODELS @@ -21,6 +22,7 @@ "faster_rcnn": FASTER_RCNN_MODELS, "fcn_resnet": FCN_RESNET_MODELS, "mask_rcnn": MASK_RCNN_MODELS, + "qdtrack": QDTRACK_MODELS, "retinanet": RETINANET_MODELS, "shift": SHIFT_MODELS, "vit": VIT_MODELS, diff --git a/vis4d/zoo/bdd100k/__init__.py b/vis4d/zoo/bdd100k/__init__.py index 9c0794c3..bc04e6da 100644 --- a/vis4d/zoo/bdd100k/__init__.py +++ b/vis4d/zoo/bdd100k/__init__.py @@ -5,10 +5,7 @@ mask_rcnn_r50_3x_bdd100k, mask_rcnn_r50_5x_bdd100k, ) -from .qdtrack import ( - qdtrack_frcnn_r50_fpn_1x_bdd100k, - qdtrack_yolox_x_50e_bdd100k, -) +from .qdtrack import qdtrack_frcnn_r50_fpn_1x_bdd100k from .semantic_fpn import ( semantic_fpn_r50_40k_bdd100k, semantic_fpn_r50_80k_bdd100k, @@ -26,5 +23,4 @@ "semantic_fpn_r50_80k_bdd100k": semantic_fpn_r50_80k_bdd100k, "semantic_fpn_r101_80k_bdd100k": semantic_fpn_r101_80k_bdd100k, "qdtrack_frcnn_r50_fpn_1x_bdd100k": qdtrack_frcnn_r50_fpn_1x_bdd100k, - "qdtrack_yolox_x_50e_bdd100k": qdtrack_yolox_x_50e_bdd100k, } diff --git a/vis4d/zoo/qdtrack/__init__.py b/vis4d/zoo/qdtrack/__init__.py index 0635008a..6dff183d 100644 --- a/vis4d/zoo/qdtrack/__init__.py +++ b/vis4d/zoo/qdtrack/__init__.py @@ -1 +1,13 @@ """QDTrack.""" +from . import ( + qdtrack_frcnn_r50_fpn_augs_1x_bdd100k, + qdtrack_yolox_x_50e_bdd100k, +) + +# Lists of available models in BDD100K Model Zoo. +AVAILABLE_MODELS = { + "qdtrack_frcnn_r50_fpn_augs_1x_bdd100k": ( + qdtrack_frcnn_r50_fpn_augs_1x_bdd100k + ), + "qdtrack_yolox_x_50e_bdd100k": qdtrack_yolox_x_50e_bdd100k, +} diff --git a/vis4d/zoo/qdtrack/qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.py b/vis4d/zoo/qdtrack/qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.py index 98b3997c..1cc9926a 100644 --- a/vis4d/zoo/qdtrack/qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.py +++ b/vis4d/zoo/qdtrack/qdtrack_frcnn_r50_fpn_augs_1x_bdd100k.py @@ -32,7 +32,7 @@ from vis4d.eval.bdd100k import BDD100KTrackEvaluator from vis4d.op.base import ResNet from vis4d.vis.image import BoundingBoxVisualizer -from vis4d.zoo.bdd100k.qdtrack.data_yolox import get_bdd100k_track_cfg +from vis4d.zoo.qdtrack.data_yolox import get_bdd100k_track_cfg def get_config() -> ExperimentConfig: diff --git a/vis4d/zoo/qdtrack/qdtrack_yolox_x_50e_bdd100k.py b/vis4d/zoo/qdtrack/qdtrack_yolox_x_50e_bdd100k.py index 340fb07d..5c7cb3b0 100644 --- a/vis4d/zoo/qdtrack/qdtrack_yolox_x_50e_bdd100k.py +++ b/vis4d/zoo/qdtrack/qdtrack_yolox_x_50e_bdd100k.py @@ -29,7 +29,7 @@ from vis4d.engine.connectors import CallbackConnector, DataConnector from vis4d.eval.bdd100k import BDD100KTrackEvaluator from vis4d.vis.image import BoundingBoxVisualizer -from vis4d.zoo.bdd100k.qdtrack.data_yolox import get_bdd100k_track_cfg +from vis4d.zoo.qdtrack.data_yolox import get_bdd100k_track_cfg def get_config() -> ExperimentConfig: