You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

device_adapter.py 1.0 kB

3 years ago
123456789101112131415161718192021222324252627
  1. # Copyright 2021 Huawei Technologies Co., Ltd
  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. # ============================================================================
  15. """Device adapter for ModelArts"""
  16. from .config import config
  17. if config.enable_modelarts:
  18. from .moxing_adapter import get_device_id, get_device_num, get_rank_id, get_job_id
  19. else:
  20. from .local_adapter import get_device_id, get_device_num, get_rank_id, get_job_id
  21. __all__ = [
  22. "get_device_id", "get_device_num", "get_rank_id", "get_job_id"
  23. ]

随着人工智能和大数据的发展,任一方面对自动化工具有着一定的需求,在当下疫情防控期间,使用mindspore来实现yolo模型来进行目标检测及语义分割,对视频或图片都可以进行口罩佩戴检测和行人社交距离检测,来对公共场所的疫情防控来实行自动化管理。