ultralytics 8.3.0 YOLO11 Models Release (#16539)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: Laughing-q <1185102784@qq.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
efb0c17881
commit
6e43d1e1e5
50 changed files with 1154 additions and 407 deletions
|
|
@ -13,6 +13,7 @@ from ultralytics.nn.modules import (
|
|||
AIFI,
|
||||
C1,
|
||||
C2,
|
||||
C2PSA,
|
||||
C3,
|
||||
C3TR,
|
||||
ELAN1,
|
||||
|
|
@ -28,7 +29,9 @@ from ultralytics.nn.modules import (
|
|||
C2f,
|
||||
C2fAttn,
|
||||
C2fCIB,
|
||||
C2fPSA,
|
||||
C3Ghost,
|
||||
C3k2,
|
||||
C3x,
|
||||
CBFuse,
|
||||
CBLinear,
|
||||
|
|
@ -968,12 +971,15 @@ def parse_model(d, ch, verbose=True): # model_dict, input_channels(3)
|
|||
GhostBottleneck,
|
||||
SPP,
|
||||
SPPF,
|
||||
C2fPSA,
|
||||
C2PSA,
|
||||
DWConv,
|
||||
Focus,
|
||||
BottleneckCSP,
|
||||
C1,
|
||||
C2,
|
||||
C2f,
|
||||
C3k2,
|
||||
RepNCSPELAN4,
|
||||
ELAN1,
|
||||
ADown,
|
||||
|
|
@ -1001,9 +1007,26 @@ def parse_model(d, ch, verbose=True): # model_dict, input_channels(3)
|
|||
) # num heads
|
||||
|
||||
args = [c1, c2, *args[1:]]
|
||||
if m in {BottleneckCSP, C1, C2, C2f, C2fAttn, C3, C3TR, C3Ghost, C3x, RepC3, C2fCIB}:
|
||||
if m in {
|
||||
BottleneckCSP,
|
||||
C1,
|
||||
C2,
|
||||
C2f,
|
||||
C3k2,
|
||||
C2fAttn,
|
||||
C3,
|
||||
C3TR,
|
||||
C3Ghost,
|
||||
C3x,
|
||||
RepC3,
|
||||
C2fPSA,
|
||||
C2fCIB,
|
||||
C2PSA,
|
||||
}:
|
||||
args.insert(2, n) # number of repeats
|
||||
n = 1
|
||||
if m is C3k2 and scale in "mlx": # for M/L/X sizes
|
||||
args[3] = True
|
||||
elif m is AIFI:
|
||||
args = [ch[f], *args]
|
||||
elif m in {HGStem, HGBlock}:
|
||||
|
|
@ -1080,7 +1103,7 @@ def guess_model_scale(model_path):
|
|||
with contextlib.suppress(AttributeError):
|
||||
import re
|
||||
|
||||
return re.search(r"yolov\d+([nslmx])", Path(model_path).stem).group(1) # n, s, m, l, or x
|
||||
return re.search(r"yolo[v]?\d+([nslmx])", Path(model_path).stem).group(1) # n, s, m, l, or x
|
||||
return ""
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue