diff --git a/Makefile b/Makefile index ed035081..1f310448 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -GPU=1 -CUDNN=1 -OPENCV=1 -OPENMP=1 +GPU=0 +CUDNN=0 +OPENCV=0 +OPENMP=0 DEBUG=0 ARCH= -gencode arch=compute_30,code=sm_30 \ diff --git a/cfg/yolo-voc.2.0.cfg b/cfg/yolo-voc.2.0.cfg deleted file mode 100644 index ceb3f2ac..00000000 --- a/cfg/yolo-voc.2.0.cfg +++ /dev/null @@ -1,244 +0,0 @@ -[net] -batch=64 -subdivisions=8 -height=416 -width=416 -channels=3 -momentum=0.9 -decay=0.0005 -angle=0 -saturation = 1.5 -exposure = 1.5 -hue=.1 - -learning_rate=0.0001 -max_batches = 45000 -policy=steps -steps=100,25000,35000 -scales=10,.1,.1 - -[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 - -[convolutional] -batch_normalize=1 -filters=64 -size=1 -stride=1 -pad=1 -activation=leaky - -[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 - -[convolutional] -batch_normalize=1 -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[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 - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - - -####### - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[route] -layers=-9 - -[reorg] -stride=2 - -[route] -layers=-1,-3 - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -size=1 -stride=1 -pad=1 -filters=125 -activation=linear - -[region] -anchors = 1.08,1.19, 3.42,4.41, 6.63,11.38, 9.42,5.11, 16.62,10.52 -bias_match=1 -classes=20 -coords=4 -num=5 -softmax=1 -jitter=.2 -rescore=1 - -object_scale=5 -noobject_scale=1 -class_scale=1 -coord_scale=1 - -absolute=1 -thresh = .6 -random=0 diff --git a/cfg/yolo.2.0.cfg b/cfg/yolo.2.0.cfg deleted file mode 100644 index fda339a2..00000000 --- a/cfg/yolo.2.0.cfg +++ /dev/null @@ -1,244 +0,0 @@ -[net] -batch=1 -subdivisions=1 -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 -max_batches = 120000 -policy=steps -steps=-1,100,80000,100000 -scales=.1,10,.1,.1 - -[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 - -[convolutional] -batch_normalize=1 -filters=64 -size=1 -stride=1 -pad=1 -activation=leaky - -[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 - -[convolutional] -batch_normalize=1 -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[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 - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - - -####### - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[route] -layers=-9 - -[reorg] -stride=2 - -[route] -layers=-1,-3 - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -size=1 -stride=1 -pad=1 -filters=425 -activation=linear - -[region] -anchors = 0.738768,0.874946, 2.42204,2.65704, 4.30971,7.04493, 10.246,4.59428, 12.6868,11.8741 -bias_match=1 -classes=80 -coords=4 -num=5 -softmax=1 -jitter=.2 -rescore=1 - -object_scale=5 -noobject_scale=1 -class_scale=1 -coord_scale=1 - -absolute=1 -thresh = .6 -random=0 diff --git a/cfg/yolov1/tiny-yolo.cfg b/cfg/yolov1-tiny.cfg similarity index 94% rename from cfg/yolov1/tiny-yolo.cfg rename to cfg/yolov1-tiny.cfg index ac4b3468..a5e7b492 100644 --- a/cfg/yolov1/tiny-yolo.cfg +++ b/cfg/yolov1-tiny.cfg @@ -1,6 +1,10 @@ [net] -batch=64 -subdivisions=2 +# Testing +batch=1 +subdivisions=1 +# Training +# batch=64 +# subdivisions=8 height=448 width=448 channels=3 diff --git a/cfg/yolov1/yolo.cfg b/cfg/yolov1.cfg similarity index 98% rename from cfg/yolov1/yolo.cfg rename to cfg/yolov1.cfg index c4f415c1..06cf6e67 100644 --- a/cfg/yolov1/yolo.cfg +++ b/cfg/yolov1.cfg @@ -1,6 +1,10 @@ [net] +# Testing batch=1 subdivisions=1 +# Training +# batch=64 +# subdivisions=8 height=448 width=448 channels=3 diff --git a/cfg/yolov1/tiny-coco.cfg b/cfg/yolov1/tiny-coco.cfg deleted file mode 100644 index e58c73a8..00000000 --- a/cfg/yolov1/tiny-coco.cfg +++ /dev/null @@ -1,125 +0,0 @@ -[net] -batch=64 -subdivisions=2 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 - -hue = .1 -saturation=.75 -exposure=.75 - -learning_rate=0.0005 -policy=steps -steps=200,400,600,800,100000,150000 -scales=2.5,2,2,2,.1,.1 -max_batches = 200000 - -[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=2 - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=256 -activation=leaky - -[connected] -output= 4655 -activation=linear - -[detection] -classes=80 -coords=4 -rescore=1 -side=7 -num=3 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 diff --git a/cfg/yolov1/xyolo.test.cfg b/cfg/yolov1/xyolo.test.cfg deleted file mode 100644 index 5f3e6f4d..00000000 --- a/cfg/yolov1/xyolo.test.cfg +++ /dev/null @@ -1,143 +0,0 @@ -[net] -batch=1 -subdivisions=1 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 - -learning_rate=0.0001 -policy=steps -steps=20,40,60,80,20000,30000 -scales=5,5,2,2,.1,.1 -max_batches = 40000 - -[convolutional] -batch_normalize=1 -filters=16 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=32 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=64 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=128 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[batchnorm] - -[convolutional] -xnor = 1 -batch_normalize=1 -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[connected] -output= 1470 -activation=linear - -[detection] -classes=20 -coords=4 -rescore=1 -side=7 -num=2 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 - diff --git a/cfg/yolov1/yolo-coco.cfg b/cfg/yolov1/yolo-coco.cfg deleted file mode 100644 index ed3f2d6e..00000000 --- a/cfg/yolov1/yolo-coco.cfg +++ /dev/null @@ -1,255 +0,0 @@ -[net] -batch=64 -subdivisions=4 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 - -hue = .1 -saturation=.75 -exposure=.75 - -learning_rate=0.0005 -policy=steps -steps=200,400,600,800,100000,150000 -scales=2.5,2,2,2,.1,.1 -max_batches = 200000 - -[convolutional] -batch_normalize=1 -filters=64 -size=7 -stride=2 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=192 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -####### - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=2 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[local] -size=3 -stride=1 -pad=1 -filters=256 -activation=leaky - -[connected] -output= 4655 -activation=linear - -[detection] -classes=80 -coords=4 -rescore=1 -side=7 -num=3 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 - diff --git a/cfg/yolov1/yolo-small.cfg b/cfg/yolov1/yolo-small.cfg deleted file mode 100644 index 2a84485b..00000000 --- a/cfg/yolov1/yolo-small.cfg +++ /dev/null @@ -1,239 +0,0 @@ -[net] -batch=64 -subdivisions=64 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 - -learning_rate=0.001 -policy=steps -steps=200,400,600,20000,30000 -scales=2.5,2,2,.1,.1 -max_batches = 40000 - -[crop] -crop_width=448 -crop_height=448 -flip=0 -angle=0 -saturation = 1.5 -exposure = 1.5 - -[convolutional] -filters=64 -size=7 -stride=2 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -filters=192 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -####### - -[convolutional] -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -size=3 -stride=2 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[connected] -output=512 -activation=leaky - -[connected] -output=4096 -activation=leaky - -[dropout] -probability=.5 - -[connected] -output= 1470 -activation=linear - -[detection] -classes=20 -coords=4 -rescore=1 -side=7 -num=2 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 - diff --git a/cfg/yolov1/yolo.train.cfg b/cfg/yolov1/yolo.train.cfg deleted file mode 100644 index 01aeb5ee..00000000 --- a/cfg/yolov1/yolo.train.cfg +++ /dev/null @@ -1,257 +0,0 @@ -[net] -batch=64 -subdivisions=4 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 -saturation=1.5 -exposure=1.5 -hue=.1 - -learning_rate=0.0005 -policy=steps -steps=200,400,600,20000,30000 -scales=2.5,2,2,.1,.1 -max_batches = 40000 - -[convolutional] -batch_normalize=1 -filters=64 -size=7 -stride=2 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=192 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -####### - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=2 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[local] -size=3 -stride=1 -pad=1 -filters=256 -activation=leaky - -[dropout] -probability=.5 - -[connected] -output= 1715 -activation=linear - -[detection] -classes=20 -coords=4 -rescore=1 -side=7 -num=3 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 - diff --git a/cfg/yolov1/yolo2.cfg b/cfg/yolov1/yolo2.cfg deleted file mode 100644 index b46a0d62..00000000 --- a/cfg/yolov1/yolo2.cfg +++ /dev/null @@ -1,251 +0,0 @@ -[net] -batch=1 -subdivisions=1 -height=448 -width=448 -channels=3 -momentum=0.9 -decay=0.0005 - -learning_rate=0.0005 -policy=steps -steps=200,400,600,20000,30000 -scales=2.5,2,2,.1,.1 -max_batches = 40000 - -[convolutional] -batch_normalize=1 -filters=64 -size=7 -stride=2 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=192 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=128 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=256 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[maxpool] -size=2 -stride=2 - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=512 -size=1 -stride=1 -pad=1 -activation=leaky - -[convolutional] -batch_normalize=1 -filters=1024 -size=3 -stride=1 -pad=1 -activation=leaky - -####### - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=2 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[convolutional] -batch_normalize=1 -size=3 -stride=1 -pad=1 -filters=1024 -activation=leaky - -[local] -size=3 -stride=1 -pad=1 -filters=256 -activation=leaky - -[connected] -output= 1715 -activation=linear - -[detection] -classes=20 -coords=4 -rescore=1 -side=7 -num=3 -softmax=0 -sqrt=1 -jitter=.2 - -object_scale=1 -noobject_scale=.5 -class_scale=1 -coord_scale=5 - diff --git a/cfg/tiny-yolo-voc.cfg b/cfg/yolov2-tiny-voc.cfg similarity index 95% rename from cfg/tiny-yolo-voc.cfg rename to cfg/yolov2-tiny-voc.cfg index ab2c066a..c4c127cd 100644 --- a/cfg/tiny-yolo-voc.cfg +++ b/cfg/yolov2-tiny-voc.cfg @@ -1,6 +1,10 @@ [net] -batch=64 -subdivisions=8 +# Testing +batch=1 +subdivisions=1 +# Training +# batch=64 +# subdivisions=2 width=416 height=416 channels=3 diff --git a/cfg/tiny-yolo.cfg b/cfg/yolov2-tiny.cfg similarity index 100% rename from cfg/tiny-yolo.cfg rename to cfg/yolov2-tiny.cfg index 37e71356..6e0c8ea7 100644 --- a/cfg/tiny-yolo.cfg +++ b/cfg/yolov2-tiny.cfg @@ -1,10 +1,10 @@ [net] -# Training -# batch=64 -# subdivisions=2 # Testing batch=1 subdivisions=1 +# Training +# batch=64 +# subdivisions=2 width=416 height=416 channels=3 diff --git a/cfg/yolo-voc.cfg b/cfg/yolov2-voc.cfg similarity index 100% rename from cfg/yolo-voc.cfg rename to cfg/yolov2-voc.cfg diff --git a/cfg/yolo.cfg b/cfg/yolov2.cfg similarity index 93% rename from cfg/yolo.cfg rename to cfg/yolov2.cfg index b8a9f683..2a0cd98f 100644 --- a/cfg/yolo.cfg +++ b/cfg/yolov2.cfg @@ -1,12 +1,12 @@ [net] # Testing -# batch=1 -# subdivisions=1 +batch=1 +subdivisions=1 # Training -batch=64 -subdivisions=8 -width=608 -height=608 +# batch=64 +# subdivisions=8 +width=416 +height=416 channels=3 momentum=0.9 decay=0.0005 @@ -239,7 +239,7 @@ activation=linear [region] -anchors = 18.3274,21.6763, 59.9827,66.001, 106.83,175.179, 252.25,112.889, 312.657,293.385 +anchors = 0.57273, 0.677385, 1.87446, 2.06253, 3.33843, 5.47434, 7.88282, 3.52778, 9.77052, 9.16828 bias_match=1 classes=80 coords=4 diff --git a/cfg/yolov3.cfg b/cfg/yolov3.cfg new file mode 100644 index 00000000..5f3ab621 --- /dev/null +++ b/cfg/yolov3.cfg @@ -0,0 +1,789 @@ +[net] +# Testing +batch=1 +subdivisions=1 +# Training +# batch=64 +# subdivisions=16 +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=32 +size=3 +stride=1 +pad=1 +activation=leaky + +# Downsample + +[convolutional] +batch_normalize=1 +filters=64 +size=3 +stride=2 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=32 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=64 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +# Downsample + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=2 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=64 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=64 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=128 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +# Downsample + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=2 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +# Downsample + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=2 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +# Downsample + +[convolutional] +batch_normalize=1 +filters=1024 +size=3 +stride=2 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=1024 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=1024 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=1024 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=1024 +size=3 +stride=1 +pad=1 +activation=leaky + +[shortcut] +from=-3 +activation=linear + +###################### + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=1024 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=1024 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=512 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=1024 +activation=leaky + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + +[yolo] +mask = 6,7,8 +anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 +classes=80 +num=9 +jitter=.3 +ignore_thresh = .5 +truth_thresh = 1 +random=1 + + +[route] +layers = -4 + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[upsample] +stride=2 + +[route] +layers = -1, 61 + + + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=512 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=512 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=256 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=512 +activation=leaky + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + +[yolo] +mask = 3,4,5 +anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 +classes=80 +num=9 +jitter=.3 +ignore_thresh = .5 +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 + +[route] +layers = -1, 36 + + + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=256 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=256 +activation=leaky + +[convolutional] +batch_normalize=1 +filters=128 +size=1 +stride=1 +pad=1 +activation=leaky + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=256 +activation=leaky + +[convolutional] +size=1 +stride=1 +pad=1 +filters=255 +activation=linear + + +[yolo] +mask = 0,1,2 +anchors = 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326 +classes=80 +num=9 +jitter=.3 +ignore_thresh = .5 +truth_thresh = 1 +random=1 + diff --git a/examples/coco.c b/examples/coco.c index 172a4746..6b01dcd6 100644 --- a/examples/coco.c +++ b/examples/coco.c @@ -320,7 +320,7 @@ void test_coco(char *cfgfile, char *weightfile, char *filename, float thresh) printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time)); int nboxes = 0; - detection *dets = get_network_boxes(net, im.w, im.h, thresh, 0, 0, 0, &nboxes); + detection *dets = get_network_boxes(net, 1, 1, thresh, 0, 0, 0, &nboxes); if (nms) do_nms_sort(dets, l.side*l.side*l.n, l.classes, nms); draw_detections(im, dets, l.side*l.side*l.n, thresh, coco_classes, alphabet, 80); diff --git a/examples/darknet.c b/examples/darknet.c index 9757eb18..51e04c13 100644 --- a/examples/darknet.c +++ b/examples/darknet.c @@ -433,7 +433,7 @@ int main(int argc, char **argv) } else if (0 == strcmp(argv[1], "detector")){ run_detector(argc, argv); } else if (0 == strcmp(argv[1], "detect")){ - float thresh = find_float_arg(argc, argv, "-thresh", .24); + float thresh = find_float_arg(argc, argv, "-thresh", .5); char *filename = (argc > 4) ? argv[4]: 0; char *outfile = find_char_arg(argc, argv, "-out", 0); int fullscreen = find_arg(argc, argv, "-fullscreen"); diff --git a/examples/detector.c b/examples/detector.c index 90e57b80..685b8705 100644 --- a/examples/detector.c +++ b/examples/detector.c @@ -794,7 +794,7 @@ void network_detect(network *net, image im, float thresh, float hier_thresh, flo void run_detector(int argc, char **argv) { char *prefix = find_char_arg(argc, argv, "-prefix", 0); - float thresh = find_float_arg(argc, argv, "-thresh", .24); + float thresh = find_float_arg(argc, argv, "-thresh", .5); float hier_thresh = find_float_arg(argc, argv, "-hier", .5); int cam_index = find_int_arg(argc, argv, "-c", 0); int frame_skip = find_int_arg(argc, argv, "-s", 0); diff --git a/examples/yolo.c b/examples/yolo.c index e23d09a0..aa728163 100644 --- a/examples/yolo.c +++ b/examples/yolo.c @@ -291,7 +291,7 @@ void test_yolo(char *cfgfile, char *weightfile, char *filename, float thresh) printf("%s: Predicted in %f seconds.\n", input, sec(clock()-time)); int nboxes = 0; - detection *dets = get_network_boxes(net, im.w, im.h, thresh, 0, 0, 0, &nboxes); + detection *dets = get_network_boxes(net, 1, 1, thresh, 0, 0, 0, &nboxes); if (nms) do_nms_sort(dets, l.side*l.side*l.n, l.classes, nms); draw_detections(im, dets, l.side*l.side*l.n, thresh, voc_names, alphabet, 20); diff --git a/src/detection_layer.c b/src/detection_layer.c index 015ee317..d036a0ab 100644 --- a/src/detection_layer.c +++ b/src/detection_layer.c @@ -263,6 +263,7 @@ void forward_detection_layer_gpu(const detection_layer l, network net) //float *in_cpu = calloc(l.batch*l.inputs, sizeof(float)); //float *truth_cpu = 0; + cuda_pull_array(net.input_gpu, net.input, l.batch*l.inputs); forward_detection_layer(l, net); cuda_push_array(l.output_gpu, l.output, l.batch*l.outputs); cuda_push_array(l.delta_gpu, l.delta, l.batch*l.inputs);