register.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # copyright (c) 2024 PaddlePaddle Authors. All Rights Reserve.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. import os
  15. import os.path as osp
  16. from ...base.register import register_model_info, register_suite_info
  17. from .model import BEVFusionModel
  18. from .runner import BEVFusionRunner
  19. from .config import BEVFusionConfig
  20. REPO_ROOT_PATH = os.environ.get("PADDLE_PDX_PADDLE3D_PATH")
  21. PDX_CONFIG_DIR = osp.abspath(osp.join(osp.dirname(__file__), "..", "configs"))
  22. register_suite_info(
  23. {
  24. "suite_name": "BEVFusion",
  25. "model": BEVFusionModel,
  26. "runner": BEVFusionRunner,
  27. "config": BEVFusionConfig,
  28. "runner_root_path": REPO_ROOT_PATH,
  29. }
  30. )
  31. register_model_info(
  32. {
  33. "model_name": "BEVFusion",
  34. "suite": "BEVFusion",
  35. "config_path": osp.join(PDX_CONFIG_DIR, "BEVFusion.yaml"),
  36. "auto_compression_config_path": osp.join(PDX_CONFIG_DIR, "None"),
  37. "supported_apis": ["train", "evaluate", "export", "infer"],
  38. "supported_train_opts": {
  39. "device": ["cpu", "gpu_nxcx"],
  40. "dy2st": False,
  41. "amp": ["O1", "O2"],
  42. },
  43. "supported_evaluate_opts": {"device": ["cpu", "gpu_nxcx"]},
  44. "supported_infer_opts": {"device": ["cpu", "gpu"]},
  45. "supported_dataset_types": [],
  46. # Additional info
  47. "infer_dir": "deploy/bevfusion",
  48. }
  49. )