Skip to content

Commit

Permalink
update deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene123tw committed Apr 18, 2024
1 parent 70717ce commit e5027d9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions src/otx/algo/detection/deployment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Functions for mmdeploy adapters."""
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#

import importlib


def is_mmdeploy_enabled() -> bool:
"""Checks if the 'mmdeploy' Python module is installed and available for use.
Returns:
bool: True if 'mmdeploy' is installed, False otherwise.
Example:
>>> is_mmdeploy_enabled()
True
"""
return importlib.util.find_spec("mmdeploy") is not None
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load_from: https://download.openmmlab.com/mmdetection/v2.0/mask_rcnn/mask_rcnn_r50_fpn_mstrain-poly_3x_coco/mask_rcnn_r50_fpn_mstrain-poly_3x_coco_20210524_201154-21b550bb.pth
type: "MaskRCNN"
# _scope_: mmengine
_scope_: mmengine
backbone:
type: "ResNet"
depth: 50
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from mmengine.registry import MODELS
from torch import Tensor

from otx.algo.instance_segmentation.mmdet.deployment import is_mmdeploy_enabled
from otx.algo.detection.deployment import is_mmdeploy_enabled
from otx.algo.instance_segmentation.mmdet.models.custom_roi_head import CustomRoIHead
from otx.algo.instance_segmentation.mmdet.models.dense_heads import RPNHead
from otx.algo.instance_segmentation.mmdet.models.necks import FPN
Expand Down

0 comments on commit e5027d9

Please sign in to comment.