Unverified Commit 2f4ea2ef authored by ChaimZhu's avatar ChaimZhu Committed by GitHub
Browse files

[Refactor] add `--ceph` in args parse (#1793)

* update ceph in command

* update comments

* update

* fix lint
parent 5ee050d5
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
In this version, we make large refactoring based on MMEngine to achieve unified data elements, model interfaces, visualizers, evaluators and other runtime modules across different datasets, tasks and even codebases. A brief summary for this refactoring is as follows: In this version, we make large refactoring based on MMEngine to achieve unified data elements, model interfaces, visualizers, evaluators and other runtime modules across different datasets, tasks and even codebases. A brief summary for this refactoring is as follows:
- Data Element: - Data Element:
- We add [`Det3DDataSample`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/structures/det3d_data_sample.py) as the common data element passing through datasets and models. It inherits from [`DetDataSample`]([https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/structures/det3d_data_sample.py](https://github.com/open-mmlab/mmdetection/blob/dev-3.x/mmdet/structures/det_data_sample.py)) in mmdetection and implement ``InstanceData``, ``PixelData``, and - We add [`Det3DDataSample`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/structures/det3d_data_sample.py) as the common data element passing through datasets and models. It inherits from [`DetDataSample`](<%5Bhttps://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/structures/det3d_data_sample.py%5D(https://github.com/open-mmlab/mmdetection/blob/dev-3.x/mmdet/structures/det_data_sample.py)>) in mmdetection and implement `InstanceData`, `PixelData`, and
``LabelData`` inheriting from ``BaseDataElement`` in MMEngine to represent different types of ground truth labels or predictions. `LabelData` inheriting from `BaseDataElement` in MMEngine to represent different types of ground truth labels or predictions.
- Datasets: - Datasets:
- We add [`Det3DDataset`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/datasets/det3d_dataset.py) and [`Seg3DDataset`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/datasets/seg3d_dataset.py) as the base datasets to inherit from the unified `BaseDataset` in MMEngine. They implement most functions that are commonly used across different datasets and simplify the info loading/processing in the current datasets. Re-defined input arguments and functions can be most re-used in different datasets, which are important for the implementation of customized datasets. - We add [`Det3DDataset`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/datasets/det3d_dataset.py) and [`Seg3DDataset`](https://github.com/open-mmlab/mmdetection3d/blob/dev-1.x/mmdet3d/datasets/seg3d_dataset.py) as the base datasets to inherit from the unified `BaseDataset` in MMEngine. They implement most functions that are commonly used across different datasets and simplify the info loading/processing in the current datasets. Re-defined input arguments and functions can be most re-used in different datasets, which are important for the implementation of customized datasets.
- We define the common keys across different datasets and unify all the info files with a standard protocol. The same info is more clear for users because they share the same key across different dataset infos. Besides, for different settings, such as camera-only and LiDAR-only methods, we no longer need different info formats (like the previous pkl and json files). We can just revise the `parse_data_info` to read the necessary information from a complete info file. - We define the common keys across different datasets and unify all the info files with a standard protocol. The same info is more clear for users because they share the same key across different dataset infos. Besides, for different settings, such as camera-only and LiDAR-only methods, we no longer need different info formats (like the previous pkl and json files). We can just revise the `parse_data_info` to read the necessary information from a complete info file.
......
...@@ -8,7 +8,7 @@ We list some potential troubles encountered by users and developers, along with ...@@ -8,7 +8,7 @@ We list some potential troubles encountered by users and developers, along with
The required versions of MMEngine, MMCV and MMDetection for different versions of MMDetection3D are as below. Please install the correct version of MMEngine, MMCV and MMDetection to avoid installation issues. The required versions of MMEngine, MMCV and MMDetection for different versions of MMDetection3D are as below. Please install the correct version of MMEngine, MMCV and MMDetection to avoid installation issues.
| MMDetection3D version | MMEngine version | MMCV version | MMDetection version | | MMDetection3D version | MMEngine version | MMCV version | MMDetection version |
| :-------------------: | :----------------------: | :---------------------: | :----------------------: | | :-------------------: | :----------------------: | :---------------------: | :----------------------: |
| dev-1.x | mmengine>=0.1.0, \<0.2.0 | mmcv>=2.0.0rc0, \<2.1.0 | mmdet>=3.0.0rc0, \<3.1.0 | | dev-1.x | mmengine>=0.1.0, \<0.2.0 | mmcv>=2.0.0rc0, \<2.1.0 | mmdet>=3.0.0rc0, \<3.1.0 |
| v1.1.0rc0 | mmengine>=0.1.0, \<0.2.0 | mmcv>=2.0.0rc0, \<2.1.0 | mmdet>=3.0.0rc0, \<3.1.0 | | v1.1.0rc0 | mmengine>=0.1.0, \<0.2.0 | mmcv>=2.0.0rc0, \<2.1.0 | mmdet>=3.0.0rc0, \<3.1.0 |
......
...@@ -19,6 +19,8 @@ def parse_args(): ...@@ -19,6 +19,8 @@ def parse_args():
parser.add_argument( parser.add_argument(
'--work-dir', '--work-dir',
help='the directory to save the file containing evaluation metrics') help='the directory to save the file containing evaluation metrics')
parser.add_argument(
'--ceph', action='store_true', help='Use ceph as data storage backend')
parser.add_argument( parser.add_argument(
'--show', action='store_true', help='show prediction results') '--show', action='store_true', help='show prediction results')
parser.add_argument( parser.add_argument(
...@@ -80,7 +82,9 @@ def main(): ...@@ -80,7 +82,9 @@ def main():
# load config # load config
cfg = Config.fromfile(args.config) cfg = Config.fromfile(args.config)
cfg = replace_ceph_backend(cfg) # TODO: We will unify the ceph support approach with other OpenMMLab repos
if args.ceph:
cfg = replace_ceph_backend(cfg)
cfg.launcher = args.launcher cfg.launcher = args.launcher
if args.cfg_options is not None: if args.cfg_options is not None:
......
...@@ -29,6 +29,8 @@ def parse_args(): ...@@ -29,6 +29,8 @@ def parse_args():
'--resume', '--resume',
action='store_true', action='store_true',
help='resume from the latest checkpoint in the work_dir automatically') help='resume from the latest checkpoint in the work_dir automatically')
parser.add_argument(
'--ceph', action='store_true', help='Use ceph as data storage backend')
parser.add_argument( parser.add_argument(
'--cfg-options', '--cfg-options',
nargs='+', nargs='+',
...@@ -60,7 +62,9 @@ def main(): ...@@ -60,7 +62,9 @@ def main():
# load config # load config
cfg = Config.fromfile(args.config) cfg = Config.fromfile(args.config)
cfg = replace_ceph_backend(cfg) # TODO: We will unify the ceph support approach with other OpenMMLab repos
if args.ceph:
cfg = replace_ceph_backend(cfg)
cfg.launcher = args.launcher cfg.launcher = args.launcher
if args.cfg_options is not None: if args.cfg_options is not None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment