From dc55874f147ba3fd8c16ced5c7f1237589623302 Mon Sep 17 00:00:00 2001 From: Francesco Gatti Date: Tue, 18 Dec 2018 18:21:56 +0100 Subject: [PATCH] yolo cfg --- demo/live/live.cpp | 6 +- .../yolov2-voc-10-resize-test.cfg | 259 ++++++++++++++++++ 2 files changed, 262 insertions(+), 3 deletions(-) create mode 100644 tests/yolo_berkeley/yolov2-voc-10-resize-test.cfg diff --git a/demo/live/live.cpp b/demo/live/live.cpp index e04d605..f3ceaf1 100644 --- a/demo/live/live.cpp +++ b/demo/live/live.cpp @@ -98,7 +98,7 @@ double compute_image( cv::Mat imageORIG, int print_usage() { - std::cout<<"usage: ./live net.rt camera_idx\n"; + std::cout<<"usage: ./live net.rt input_uri\n"; return 1; } @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) { //params char *tensor_path = NULL; - int device = 0; + char *device = 0; float thresh = 0.3f; bool show = false; @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) { if(argc - optind == 2) { tensor_path = argv[optind]; - device = atoi(argv[optind+1]); + device = argv[optind+1]; } else { std::cout<<"not enough arguments.\n"; return print_usage(); diff --git a/tests/yolo_berkeley/yolov2-voc-10-resize-test.cfg b/tests/yolo_berkeley/yolov2-voc-10-resize-test.cfg new file mode 100644 index 0000000..184b32c --- /dev/null +++ b/tests/yolo_berkeley/yolov2-voc-10-resize-test.cfg @@ -0,0 +1,259 @@ +[net] +# Testing +batch=1 +subdivisions=1 +# Training +#batch=64 +#subdivisions=8 +height=416 +width=736 +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 = 80200 +policy=steps +steps=40000,60000 +scales=.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 + +[convolutional] +batch_normalize=1 +size=1 +stride=1 +pad=1 +filters=64 +activation=leaky + +[reorg] +stride=2 + +[route] +layers=-1,-4 + +[convolutional] +batch_normalize=1 +size=3 +stride=1 +pad=1 +filters=1024 +activation=leaky + +[convolutional] +size=1 +stride=1 +pad=1 +filters=75 +activation=linear + + +[region] +anchors = 0.4043,0.4167, 1.2109,1.1018, 2.7258,2.1215, 4.9477,3.9132, 7.9508,6.6806 +bias_match=1 +classes=10 +coords=4 +num=5 +softmax=1 +jitter=.3 +rescore=1 + +object_scale=5 +noobject_scale=1 +class_scale=1 +coord_scale=1 + +absolute=1 +thresh = .6 +random=0 +flip=1