From 1e0b50c29e3c589ddbcccafc84b1ccd7c538c16b Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Wed, 4 Sep 2019 18:51:40 +0300 Subject: [PATCH] Added yolov3-tiny-prn.cfg and enet-coco.cfg (EfficientNetb0-Yolo- 45.5% mAP@0.5 - 3.7 BFlops) https://github.com/WongKinYiu/PartialResidualNetworks --- README.md | 6 + build/darknet/x64/cfg/enet-coco.cfg | 1072 +++++++++++++++++++++ build/darknet/x64/cfg/yolov3-tiny-prn.cfg | 199 ++++ cfg/enet-coco.cfg | 1072 +++++++++++++++++++++ cfg/yolov3-tiny-prn.cfg | 199 ++++ 5 files changed, 2548 insertions(+) create mode 100644 build/darknet/x64/cfg/enet-coco.cfg create mode 100644 build/darknet/x64/cfg/yolov3-tiny-prn.cfg create mode 100644 cfg/enet-coco.cfg create mode 100644 cfg/yolov3-tiny-prn.cfg diff --git a/README.md b/README.md index 03492ade..b79d9786 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,18 @@ There are weights-file for different cfg-files (smaller size -> faster speed & l * `yolov3-spp.cfg` (240 MB COCO **Yolo v3**) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov3-spp.weights * `yolov3.cfg` (236 MB COCO **Yolo v3**) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov3.weights * `yolov3-tiny.cfg` (34 MB COCO **Yolo v3 tiny**) - requires 1 GB GPU-RAM: https://pjreddie.com/media/files/yolov3-tiny.weights +* `enet-coco.cfg` (EfficientNetb0-Yolo- 45.5% mAP@0.5 - 3.7 BFlops) [enetb0-coco_final.weights](https://drive.google.com/file/d/1FlHeQjWEQVJt0ay1PVsiuuMzmtNyv36m/view) and `yolov3-tiny-prn.cfg` (33.1% mAP@0.5 - 3.5 BFlops - [more](https://github.com/WongKinYiu/PartialResidualNetworks)) + +
CLICK ME - Yolo v2 models + * `yolov2.cfg` (194 MB COCO Yolo v2) - requires 4 GB GPU-RAM: https://pjreddie.com/media/files/yolov2.weights * `yolo-voc.cfg` (194 MB VOC Yolo v2) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo-voc.weights * `yolov2-tiny.cfg` (43 MB COCO Yolo v2) - requires 1 GB GPU-RAM: https://pjreddie.com/media/files/yolov2-tiny.weights * `yolov2-tiny-voc.cfg` (60 MB VOC Yolo v2) - requires 1 GB GPU-RAM: http://pjreddie.com/media/files/yolov2-tiny-voc.weights * `yolo9000.cfg` (186 MB Yolo9000-model) - requires 4 GB GPU-RAM: http://pjreddie.com/media/files/yolo9000.weights +
+ Put it near compiled: darknet.exe You can get cfg-files by path: `darknet/cfg/` diff --git a/build/darknet/x64/cfg/enet-coco.cfg b/build/darknet/x64/cfg/enet-coco.cfg new file mode 100644 index 00000000..b530ed36 --- /dev/null +++ b/build/darknet/x64/cfg/enet-coco.cfg @@ -0,0 +1,1072 @@ +[net] +# Testing +#batch=1 +#subdivisions=1 +# Training +batch=64 +subdivisions=8 +width=416 +height=416 +channels=3 +momentum=0.9 +decay=0.0005 +angle=0 +saturation = 1.5 +exposure = 1.5 +hue=.1 + +learning_rate=0.001 +burn_in=1000 +max_batches = 500200 +policy=steps +steps=400000,450000 +scales=.1,.1 + +### CONV1 - 1 (1) +# conv1 +[convolutional] +filters=32 +size=3 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +### CONV2 - MBConv1 - 1 (1) +# conv2_1_expand +[convolutional] +filters=32 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv2_1_dwise +[convolutional] +groups=32 +filters=32 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=4 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=32 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv2_1_linear +[convolutional] +filters=16 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV3 - MBConv6 - 1 (2) +# conv2_2_expand +[convolutional] +filters=96 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv2_2_dwise +[convolutional] +groups=96 +filters=96 +size=3 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=8 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=96 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv2_2_linear +[convolutional] +filters=24 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV3 - MBConv6 - 2 (2) +# conv3_1_expand +[convolutional] +filters=144 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv3_1_dwise +[convolutional] +groups=144 +filters=144 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=144 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv3_1_linear +[convolutional] +filters=24 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV4 - MBConv6 - 1 (2) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_3_1 +[shortcut] +from=-9 +activation=linear + +# conv_3_2_expand +[convolutional] +filters=144 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_3_2_dwise +[convolutional] +groups=144 +filters=144 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=144 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_3_2_linear +[convolutional] +filters=40 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV4 - MBConv6 - 2 (2) +# conv_4_1_expand +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_1_dwise +[convolutional] +groups=192 +filters=192 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=192 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_1_linear +[convolutional] +filters=40 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + + +### CONV5 - MBConv6 - 1 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_2 +[shortcut] +from=-9 +activation=linear + +# conv_4_3_expand +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_3_dwise +[convolutional] +groups=192 +filters=192 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=192 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_3_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV5 - MBConv6 - 2 (3) +# conv_4_4_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_4_dwise +[convolutional] +groups=384 +filters=384 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_4_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV5 - MBConv6 - 3 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_4 +[shortcut] +from=-9 +activation=linear + +# conv_4_5_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_5_dwise +[convolutional] +groups=384 +filters=384 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_5_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV6 - MBConv6 - 1 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_6 +[shortcut] +from=-9 +activation=linear + +# conv_4_7_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_7_dwise +[convolutional] +groups=384 +filters=384 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_7_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV6 - MBConv6 - 2 (3) +# conv_5_1_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_1_dwise +[convolutional] +groups=576 +filters=576 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_1_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV6 - MBConv6 - 3 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_5_1 +[shortcut] +from=-9 +activation=linear + +# conv_5_2_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_2_dwise +[convolutional] +groups=576 +filters=576 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_2_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 1 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_5_2 +[shortcut] +from=-9 +activation=linear + +# conv_5_3_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_3_dwise +[convolutional] +groups=576 +filters=576 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_3_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 2 (4) +# conv_6_1_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_1_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_1_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 3 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_1 +[shortcut] +from=-9 +activation=linear + +# conv_6_2_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_2_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_2_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 4 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_1 +[shortcut] +from=-9 +activation=linear + +# conv_6_2_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_2_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_2_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV8 - MBConv6 - 1 (1) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_2 +[shortcut] +from=-9 +activation=linear + +# conv_6_3_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_3_dwise +[convolutional] +groups=960 +filters=960 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_3_linear +[convolutional] +filters=320 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV9 - Conv2d 1x1 +# conv_6_4 +[convolutional] +filters=1280 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +########################## + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-2 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + + +[yolo] +mask = 3,4,5 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=0 + +[route] +layers = -4 + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[upsample] +stride=2 + +[shortcut] +activation=leaky +from=90 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +[shortcut] +activation=leaky +from=90 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + +[yolo] +mask = 1,2,3 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=0 + diff --git a/build/darknet/x64/cfg/yolov3-tiny-prn.cfg b/build/darknet/x64/cfg/yolov3-tiny-prn.cfg new file mode 100644 index 00000000..109c969c --- /dev/null +++ b/build/darknet/x64/cfg/yolov3-tiny-prn.cfg @@ -0,0 +1,199 @@ +[net] +# Testing +batch=1 +subdivisions=1 +# Training +#batch=64 +#subdivisions=8 +width=416 +height=416 +channels=3 +momentum=0.9 +decay=0.0005 +angle=0 +saturation = 1.5 +exposure = 1.5 +hue=.1 + +learning_rate=0.001 +burn_in=1000 +max_batches = 500200 +policy=steps +steps=400000,450000 +scales=.1,.1 + +[convolutional] +batch_normalize=1 +filters=16 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=32 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=64 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=1 + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +########### + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-2 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + + +[yolo] +mask = 3,4,5 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=1 + +[route] +layers = -4 + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[upsample] +stride=2 + +[shortcut] +activation=leaky +from=8 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +[shortcut] +activation=leaky +from=8 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + +[yolo] +mask = 1,2,3 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=1 diff --git a/cfg/enet-coco.cfg b/cfg/enet-coco.cfg new file mode 100644 index 00000000..b530ed36 --- /dev/null +++ b/cfg/enet-coco.cfg @@ -0,0 +1,1072 @@ +[net] +# Testing +#batch=1 +#subdivisions=1 +# Training +batch=64 +subdivisions=8 +width=416 +height=416 +channels=3 +momentum=0.9 +decay=0.0005 +angle=0 +saturation = 1.5 +exposure = 1.5 +hue=.1 + +learning_rate=0.001 +burn_in=1000 +max_batches = 500200 +policy=steps +steps=400000,450000 +scales=.1,.1 + +### CONV1 - 1 (1) +# conv1 +[convolutional] +filters=32 +size=3 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +### CONV2 - MBConv1 - 1 (1) +# conv2_1_expand +[convolutional] +filters=32 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv2_1_dwise +[convolutional] +groups=32 +filters=32 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=4 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=32 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv2_1_linear +[convolutional] +filters=16 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV3 - MBConv6 - 1 (2) +# conv2_2_expand +[convolutional] +filters=96 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv2_2_dwise +[convolutional] +groups=96 +filters=96 +size=3 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=8 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=96 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv2_2_linear +[convolutional] +filters=24 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV3 - MBConv6 - 2 (2) +# conv3_1_expand +[convolutional] +filters=144 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv3_1_dwise +[convolutional] +groups=144 +filters=144 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=144 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv3_1_linear +[convolutional] +filters=24 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV4 - MBConv6 - 1 (2) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_3_1 +[shortcut] +from=-9 +activation=linear + +# conv_3_2_expand +[convolutional] +filters=144 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_3_2_dwise +[convolutional] +groups=144 +filters=144 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=8 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=144 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_3_2_linear +[convolutional] +filters=40 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV4 - MBConv6 - 2 (2) +# conv_4_1_expand +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_1_dwise +[convolutional] +groups=192 +filters=192 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=192 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_1_linear +[convolutional] +filters=40 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + + +### CONV5 - MBConv6 - 1 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_2 +[shortcut] +from=-9 +activation=linear + +# conv_4_3_expand +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_3_dwise +[convolutional] +groups=192 +filters=192 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=16 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=192 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_3_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV5 - MBConv6 - 2 (3) +# conv_4_4_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_4_dwise +[convolutional] +groups=384 +filters=384 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_4_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV5 - MBConv6 - 3 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_4 +[shortcut] +from=-9 +activation=linear + +# conv_4_5_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_5_dwise +[convolutional] +groups=384 +filters=384 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_5_linear +[convolutional] +filters=80 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV6 - MBConv6 - 1 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_4_6 +[shortcut] +from=-9 +activation=linear + +# conv_4_7_expand +[convolutional] +filters=384 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_4_7_dwise +[convolutional] +groups=384 +filters=384 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=24 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=384 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_4_7_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV6 - MBConv6 - 2 (3) +# conv_5_1_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_1_dwise +[convolutional] +groups=576 +filters=576 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_1_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV6 - MBConv6 - 3 (3) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_5_1 +[shortcut] +from=-9 +activation=linear + +# conv_5_2_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_2_dwise +[convolutional] +groups=576 +filters=576 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_2_linear +[convolutional] +filters=112 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 1 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_5_2 +[shortcut] +from=-9 +activation=linear + +# conv_5_3_expand +[convolutional] +filters=576 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_5_3_dwise +[convolutional] +groups=576 +filters=576 +size=5 +pad=1 +stride=2 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=32 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=576 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_5_3_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 2 (4) +# conv_6_1_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_1_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_1_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 3 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_1 +[shortcut] +from=-9 +activation=linear + +# conv_6_2_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_2_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_2_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV7 - MBConv6 - 4 (4) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_1 +[shortcut] +from=-9 +activation=linear + +# conv_6_2_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_2_dwise +[convolutional] +groups=960 +filters=960 +size=5 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_2_linear +[convolutional] +filters=192 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + + +### CONV8 - MBConv6 - 1 (1) +# dropout only before residual connection +[dropout] +probability=.0 + +# block_6_2 +[shortcut] +from=-9 +activation=linear + +# conv_6_3_expand +[convolutional] +filters=960 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +# conv_6_3_dwise +[convolutional] +groups=960 +filters=960 +size=3 +stride=1 +pad=1 +batch_normalize=1 +activation=swish + + +#squeeze-n-excitation +[avgpool] + +# squeeze ratio r=16 (recommended r=16) +[convolutional] +filters=64 +size=1 +stride=1 +activation=swish + +# excitation +[convolutional] +filters=960 +size=1 +stride=1 +activation=logistic + +# multiply channels +[scale_channels] +from=-4 + + +# conv_6_3_linear +[convolutional] +filters=320 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=linear + + +### CONV9 - Conv2d 1x1 +# conv_6_4 +[convolutional] +filters=1280 +size=1 +stride=1 +pad=0 +batch_normalize=1 +activation=swish + +########################## + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-2 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + + +[yolo] +mask = 3,4,5 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=0 + +[route] +layers = -4 + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[upsample] +stride=2 + +[shortcut] +activation=leaky +from=90 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +[shortcut] +activation=leaky +from=90 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + +[yolo] +mask = 1,2,3 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=0 + diff --git a/cfg/yolov3-tiny-prn.cfg b/cfg/yolov3-tiny-prn.cfg new file mode 100644 index 00000000..109c969c --- /dev/null +++ b/cfg/yolov3-tiny-prn.cfg @@ -0,0 +1,199 @@ +[net] +# Testing +batch=1 +subdivisions=1 +# Training +#batch=64 +#subdivisions=8 +width=416 +height=416 +channels=3 +momentum=0.9 +decay=0.0005 +angle=0 +saturation = 1.5 +exposure = 1.5 +hue=.1 + +learning_rate=0.001 +burn_in=1000 +max_batches = 500200 +policy=steps +steps=400000,450000 +scales=.1,.1 + +[convolutional] +batch_normalize=1 +filters=16 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=32 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=64 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=2 + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[maxpool] +size=2 +stride=1 + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +########### + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-2 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + + +[yolo] +mask = 3,4,5 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=1 + +[route] +layers = -4 + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[upsample] +stride=2 + +[shortcut] +activation=leaky +from=8 + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +activation=leaky +from=-3 + +[shortcut] +activation=leaky +from=8 + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + +[yolo] +mask = 1,2,3 +anchors = 10,14, 23,27, 37,58, 81,82, 135,169, 344,319 +classes=80 +num=6 +jitter=.3 +ignore_thresh = .7 +truth_thresh = 1 +random=1