|
@@ -31,7 +31,6 @@ class Yolov8PaFPN(nn.Module):
|
|
|
## P5 -> P4
|
|
## P5 -> P4
|
|
|
self.top_down_layer_1 = Yolov8StageBlock(in_dim = c5 + c4,
|
|
self.top_down_layer_1 = Yolov8StageBlock(in_dim = c5 + c4,
|
|
|
out_dim = round(512*width),
|
|
out_dim = round(512*width),
|
|
|
- expand_ratio = 0.5,
|
|
|
|
|
num_blocks = round(3*depth),
|
|
num_blocks = round(3*depth),
|
|
|
shortcut = False,
|
|
shortcut = False,
|
|
|
act_type = act_type,
|
|
act_type = act_type,
|
|
@@ -41,7 +40,6 @@ class Yolov8PaFPN(nn.Module):
|
|
|
## P4 -> P3
|
|
## P4 -> P3
|
|
|
self.top_down_layer_2 = Yolov8StageBlock(in_dim = round(512*width) + c3,
|
|
self.top_down_layer_2 = Yolov8StageBlock(in_dim = round(512*width) + c3,
|
|
|
out_dim = round(256*width),
|
|
out_dim = round(256*width),
|
|
|
- expand_ratio = 0.5,
|
|
|
|
|
num_blocks = round(3*depth),
|
|
num_blocks = round(3*depth),
|
|
|
shortcut = False,
|
|
shortcut = False,
|
|
|
act_type = act_type,
|
|
act_type = act_type,
|
|
@@ -53,7 +51,6 @@ class Yolov8PaFPN(nn.Module):
|
|
|
self.dowmsample_layer_1 = Conv(round(256*width), round(256*width), k=3, p=1, s=2, act_type=act_type, norm_type=norm_type, depthwise=depthwise)
|
|
self.dowmsample_layer_1 = Conv(round(256*width), round(256*width), k=3, p=1, s=2, act_type=act_type, norm_type=norm_type, depthwise=depthwise)
|
|
|
self.bottom_up_layer_1 = Yolov8StageBlock(in_dim = round(256*width) + round(512*width),
|
|
self.bottom_up_layer_1 = Yolov8StageBlock(in_dim = round(256*width) + round(512*width),
|
|
|
out_dim = round(512*width),
|
|
out_dim = round(512*width),
|
|
|
- expand_ratio = 0.5,
|
|
|
|
|
num_blocks = round(3*depth),
|
|
num_blocks = round(3*depth),
|
|
|
shortcut = False,
|
|
shortcut = False,
|
|
|
act_type = act_type,
|
|
act_type = act_type,
|
|
@@ -64,7 +61,6 @@ class Yolov8PaFPN(nn.Module):
|
|
|
self.dowmsample_layer_2 = Conv(round(512*width), round(512*width), k=3, p=1, s=2, act_type=act_type, norm_type=norm_type, depthwise=depthwise)
|
|
self.dowmsample_layer_2 = Conv(round(512*width), round(512*width), k=3, p=1, s=2, act_type=act_type, norm_type=norm_type, depthwise=depthwise)
|
|
|
self.bottom_up_layer_2 = Yolov8StageBlock(in_dim = round(512 * width) + c5,
|
|
self.bottom_up_layer_2 = Yolov8StageBlock(in_dim = round(512 * width) + c5,
|
|
|
out_dim = round(512 * width * ratio),
|
|
out_dim = round(512 * width * ratio),
|
|
|
- expand_ratio = 0.5,
|
|
|
|
|
num_blocks = round(3*depth),
|
|
num_blocks = round(3*depth),
|
|
|
shortcut = False,
|
|
shortcut = False,
|
|
|
act_type = act_type,
|
|
act_type = act_type,
|