Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename _yolov5_darknet_pan to build_model #198

Merged
merged 1 commit into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions yolort/models/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"yolov5_darknet_pan_m_r40",
"yolov5_darknet_pan_l_r40",
"yolov5_darknet_tan_s_r40",
"_yolov5_darknet_pan",
"build_model",
]


Expand Down Expand Up @@ -229,7 +229,7 @@ def load_from_yolov5(
}


def _yolov5_darknet_pan(
def build_model(
backbone_name: str,
depth_multiple: float,
width_multiple: float,
Expand Down Expand Up @@ -289,7 +289,7 @@ def yolov5_darknet_pan_s_r31(
depth_multiple = 0.33
width_multiple = 0.5
version = "r3.1"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -319,7 +319,7 @@ def yolov5_darknet_pan_m_r31(
depth_multiple = 0.67
width_multiple = 0.75
version = "r3.1"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -349,7 +349,7 @@ def yolov5_darknet_pan_l_r31(
depth_multiple = 1.0
width_multiple = 1.0
version = "r3.1"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -379,7 +379,7 @@ def yolov5_darknet_pan_s_r40(
depth_multiple = 0.33
width_multiple = 0.5
version = "r4.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -409,7 +409,7 @@ def yolov5_darknet_pan_m_r40(
depth_multiple = 0.67
width_multiple = 0.75
version = "r4.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -439,7 +439,7 @@ def yolov5_darknet_pan_l_r40(
depth_multiple = 1.0
width_multiple = 1.0
version = "r4.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -469,7 +469,7 @@ def yolov5_darknet_pan_s_r60(
depth_multiple = 0.33
width_multiple = 0.5
version = "r6.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -499,7 +499,7 @@ def yolov5_darknet_pan_m_r60(
depth_multiple = 0.67
width_multiple = 0.75
version = "r6.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down Expand Up @@ -529,7 +529,7 @@ def yolov5_darknet_pan_l_r60(
depth_multiple = 1.0
width_multiple = 1.0
version = "r6.0"
return _yolov5_darknet_pan(
return build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down
2 changes: 1 addition & 1 deletion yolort/utils/update_module_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
weights_name = (
f"yolov5_darknet_pan_{yolov5_size}_{version.replace('.', '')}_coco"
)
model = yolo._yolov5_darknet_pan(
model = yolo.build_model(
backbone_name,
depth_multiple,
width_multiple,
Expand Down