Skip to content

Commit

Permalink
parse architecture yolo11
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Nov 28, 2024
1 parent 1364d31 commit 38246ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion serve/src/yolov8.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,10 @@ def parse_model_name(checkpoint_name: str):

def get_arch_from_model_name(model_name: str):
# yolov8n-det
p = r"yolov(\d+)"
if "11" in model_name:
p = r"yolo(\d+)"
else:
p = r"yolov(\d+)"
match = re.match(p, model_name.lower())
if match:
return f"YOLOv{match.group(1)}"

0 comments on commit 38246ae

Please sign in to comment.