Skip to content

Commit

Permalink
add logistic activate function
Browse files Browse the repository at this point in the history
  • Loading branch information
linghu8812 committed Dec 9, 2020
1 parent bdb3ac3 commit ffb6512
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 68 deletions.
6 changes: 4 additions & 2 deletions Yolov4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ model|weights
yolov4|[weights](https://drive.google.com/open?id=1sWNozS0emz7bmQTUWDLvsubLGnCwUiIS)
yolov4-tiny|[weights](https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights)
yolov4x-mish|[weights](https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4x-mish.weights)
yolov4-csp|[weights](https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-csp.weights)
yolov3|[weights](https://pjreddie.com/media/files/yolov3.weights)
yolov3-spp|[weights](https://pjreddie.com/media/files/yolov3-spp.weights)
yolov3-tiny|[weights](https://pjreddie.com/media/files/yolov3-tiny.weights)
Expand All @@ -25,9 +26,10 @@ python3 export_onnx.py
```
python3 export_onnx.py --cfg_file cfg/yolov4-tiny.cfg --weights_file yolov4-tiny.weights --output_file yolov4-tiny.onnx --strides 32 16 --neck FPN
```
- export yolov4x-mish onnx
- export yolov4x-mish, yolov4-csp onnx
```
python3 export_onnx.py --cfg_file cfg/yolov4x-mish.cfg --weights_file yolov4x-mish.weights --output_file yolov4x-mish.onnx --sigmoid
python3 export_onnx.py --cfg_file cfg/yolov4x-mish.cfg --weights_file yolov4x-mish.weights --output_file yolov4x-mish.onnx
python3 export_onnx.py --cfg_file cfg/yolov4-csp.cfg --weights_file yolov4-csp.weights --output_file yolov4-csp.onnx
```
- export yolov3, yolov3-spp onnx
```
Expand Down
66 changes: 40 additions & 26 deletions Yolov4/cfg/yolov4-csp.cfg
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.00261
learning_rate=0.001
burn_in=1000
max_batches = 500500
policy=steps
steps=400000,450000
scales=.1,.1

#cutmix=1
mosaic=1

letter_box=1

#optimized_memory=1

#23:104x104 54:52x52 85:26x26 104:13x13 for 416


Expand Down Expand Up @@ -1021,26 +1023,30 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
mask = 0,1,2
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
jitter=.1
scale_x_y = 2.0
objectness_smooth=0
ignore_thresh = .7
truth_thresh = 1
random=1
scale_x_y = 1.05
iou_thresh=0.213
cls_normalizer=1.0
iou_normalizer=0.07
#random=1
resize=1.5
iou_thresh=0.2
iou_normalizer=0.05
cls_normalizer=0.5
obj_normalizer=4.0
iou_loss=ciou
nms_kind=greedynms
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=5

[route]
layers = -4
Expand Down Expand Up @@ -1131,26 +1137,30 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
mask = 3,4,5
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
jitter=.1
scale_x_y = 2.0
objectness_smooth=1
ignore_thresh = .7
truth_thresh = 1
random=1
scale_x_y = 1.05
iou_thresh=0.213
cls_normalizer=1.0
iou_normalizer=0.07
#random=1
resize=1.5
iou_thresh=0.2
iou_normalizer=0.05
cls_normalizer=0.5
obj_normalizer=1.0
iou_loss=ciou
nms_kind=greedynms
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=5

[route]
layers = -4
Expand Down Expand Up @@ -1241,23 +1251,27 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
mask = 6,7,8
anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 459, 401
classes=80
num=9
jitter=.3
jitter=.1
scale_x_y = 2.0
objectness_smooth=1
ignore_thresh = .7
truth_thresh = 1
random=1
scale_x_y = 1.05
iou_thresh=0.213
cls_normalizer=1.0
iou_normalizer=0.07
#random=1
resize=1.5
iou_thresh=0.2
iou_normalizer=0.05
cls_normalizer=0.5
obj_normalizer=0.4
iou_loss=ciou
nms_kind=greedynms
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=2
19 changes: 12 additions & 7 deletions Yolov4/cfg/yolov4x-mish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ saturation = 1.5
exposure = 1.5
hue=.1

learning_rate=0.00261
learning_rate=0.001
burn_in=1000
max_batches = 500500
policy=steps
Expand All @@ -26,6 +26,8 @@ mosaic=1

letter_box=1

#optimized_memory=1

[convolutional]
batch_normalize=1
filters=32
Expand Down Expand Up @@ -1148,7 +1150,7 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
Expand All @@ -1157,6 +1159,7 @@ anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 4
classes=80
num=9
jitter=.1
scale_x_y = 2.0
objectness_smooth=0
ignore_thresh = .7
truth_thresh = 1
Expand All @@ -1170,7 +1173,7 @@ iou_loss=ciou
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=20
max_delta=5

[route]
layers = -4
Expand Down Expand Up @@ -1277,7 +1280,7 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
Expand All @@ -1286,6 +1289,7 @@ anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 4
classes=80
num=9
jitter=.1
scale_x_y = 2.0
objectness_smooth=1
ignore_thresh = .7
truth_thresh = 1
Expand All @@ -1299,7 +1303,7 @@ iou_loss=ciou
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=20
max_delta=5

[route]
layers = -4
Expand Down Expand Up @@ -1406,7 +1410,7 @@ size=1
stride=1
pad=1
filters=255
activation=linear
activation=logistic


[yolo]
Expand All @@ -1415,6 +1419,7 @@ anchors = 12, 16, 19, 36, 40, 28, 36, 75, 76, 55, 72, 146, 142, 110, 192, 243, 4
classes=80
num=9
jitter=.1
scale_x_y = 2.0
objectness_smooth=1
ignore_thresh = .7
truth_thresh = 1
Expand All @@ -1428,4 +1433,4 @@ iou_loss=ciou
nms_kind=diounms
beta_nms=0.6
new_coords=1
max_delta=20
max_delta=2
Loading

0 comments on commit ffb6512

Please sign in to comment.