Skip to content

Commit

Permalink
refactor models structure (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
fcakyon authored Oct 26, 2022
1 parent 84cc62e commit 2ddf8a8
Show file tree
Hide file tree
Showing 20 changed files with 1,185 additions and 1,127 deletions.
2 changes: 1 addition & 1 deletion sahi/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "0.10.8"
__version__ = "0.11.0"

from sahi.auto_model import AutoDetectionModel
3 changes: 1 addition & 2 deletions sahi/auto_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any, Dict, Optional

from sahi.utils.file import import_model_class
from sahi.utils.import_utils import check_requirements

MODEL_TYPE_TO_MODEL_CLASS_NAME = {
"mmdet": "MmdetDetectionModel",
Expand Down Expand Up @@ -59,7 +58,7 @@ def from_pretrained(
"""

model_class_name = MODEL_TYPE_TO_MODEL_CLASS_NAME[model_type]
DetectionModel = import_model_class(model_class_name)
DetectionModel = import_model_class(model_type, model_class_name)

return DetectionModel(
model_path=model_path,
Expand Down
Loading

0 comments on commit 2ddf8a8

Please sign in to comment.