diff --git a/models/yolo.py b/models/yolo.py index 0e62f12..9cd343d 100644 --- a/models/yolo.py +++ b/models/yolo.py @@ -356,6 +356,16 @@ def parse_model(d, ch): # model_dict, input_channels(3) if m in [BottleneckCSP, C3, C3TR, C3Ghost, C3HB, C3RFEM, C3STR]: args.insert(2, n) # number of repeats n = 1 + ##add_C2f + elif m in [C2f]: + c1, c2 = ch[f], args[0] + if c2 != no: # if not output + c2 = make_divisible(c2 * gw, 8) + args = [c1, c2] + if m in [C2f]: + args.insert(2, n) # number of repeats + n = 1 + # add module research elif m in [CARAFE, SPPCSPC, SPPFCSPC, RepConv, BoT3, CA, CBAM, NAMAttention, GAMAttention, Involution, Stem, ResCSPC, ResCSPB, \ ResXCSPB, ResXCSPC, BottleneckCSPB, BottleneckCSPC,