From ff672ca7c813b2ec0033775ce331d10f8849e070 Mon Sep 17 00:00:00 2001 From: Dev-Nash <56091931+Dev-Nash@users.noreply.github.com> Date: Thu, 6 Feb 2020 15:34:07 -0700 Subject: [PATCH 1/5] Update network.c Added method to free network from network* reference. Needed for C# integration. --- src/network.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network.c b/src/network.c index d56bed5d..791a3a19 100644 --- a/src/network.c +++ b/src/network.c @@ -1029,6 +1029,11 @@ float network_accuracy_multi(network net, data d, int n) return acc; } +void free_network_ptr(network* net) +{ + free_network(*net); +} + void free_network(network net) { int i; From a25d4318366194d9d7cbb140e589e4ca88a2a621 Mon Sep 17 00:00:00 2001 From: Dev-Nash <56091931+Dev-Nash@users.noreply.github.com> Date: Thu, 6 Feb 2020 15:39:01 -0700 Subject: [PATCH 2/5] Update darknet.h Exposed new method with LIB_API. Needed for C# integration. --- include/darknet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/darknet.h b/include/darknet.h index 2be89f05..89a9d55c 100644 --- a/include/darknet.h +++ b/include/darknet.h @@ -889,6 +889,7 @@ LIB_API network *load_network(char *cfg, char *weights, int clear); LIB_API network *load_network_custom(char *cfg, char *weights, int clear, int batch); LIB_API network *load_network(char *cfg, char *weights, int clear); LIB_API void free_network(network net); +LIB_API void free_network_ptr(network* net); // network.c LIB_API load_args get_base_args(network *net); From 185213438eaca7ce4fab48c1fea2980c2cddaf9b Mon Sep 17 00:00:00 2001 From: qboticslabs Date: Thu, 30 Apr 2020 00:04:27 -0700 Subject: [PATCH 3/5] Added sample scripts for yolov4 --- image_yolov4.sh | 6 ++++++ net_cam_v4.sh | 6 ++++++ video_yolov4.sh | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100755 image_yolov4.sh create mode 100755 net_cam_v4.sh create mode 100755 video_yolov4.sh diff --git a/image_yolov4.sh b/image_yolov4.sh new file mode 100755 index 00000000..be3fd104 --- /dev/null +++ b/image_yolov4.sh @@ -0,0 +1,6 @@ + + +./darknet detector test ./cfg/coco.data ./cfg/yolov4.cfg ./yolov4.weights data/dog.jpg -i 0 -thresh 0.25 + + + diff --git a/net_cam_v4.sh b/net_cam_v4.sh new file mode 100755 index 00000000..5b7520e6 --- /dev/null +++ b/net_cam_v4.sh @@ -0,0 +1,6 @@ +#rm test_dnn_out.avi + +./darknet detector demo ./cfg/coco.data ./cfg/yolov4.cfg ./yolov4.weights rtsp://admin:admin12345@192.168.0.228:554 -i 0 -thresh 0.25 + + + diff --git a/video_yolov4.sh b/video_yolov4.sh new file mode 100755 index 00000000..159c8558 --- /dev/null +++ b/video_yolov4.sh @@ -0,0 +1,6 @@ + + +./darknet detector demo ./cfg/coco.data ./cfg/yolov4.cfg ./yolov4.weights test50.mp4 -i 0 -thresh 0.25 + + + From a34682e67c9ff279019e17070a5d34d596cd8422 Mon Sep 17 00:00:00 2001 From: Juan Altmayer Pizzorno Date: Thu, 30 Apr 2020 14:04:54 -0400 Subject: [PATCH 4/5] - adjusted BatchNorm epsilon of normalize_cpu to be the same as normalize_gpu's kernel; --- src/blas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blas.c b/src/blas.c index b495a47e..b588fb33 100644 --- a/src/blas.c +++ b/src/blas.c @@ -289,7 +289,7 @@ void normalize_cpu(float *x, float *mean, float *variance, int batch, int filter for(f = 0; f < filters; ++f){ for(i = 0; i < spatial; ++i){ int index = b*filters*spatial + f*spatial + i; - x[index] = (x[index] - mean[f])/(sqrt(variance[f] + .000001f)); + x[index] = (x[index] - mean[f])/(sqrt(variance[f] + .00001f)); } } } From 83a9cbe5b1b156c52263203fd44180c16c451f8d Mon Sep 17 00:00:00 2001 From: Juan Altmayer Pizzorno Date: Mon, 11 May 2020 13:09:01 -0400 Subject: [PATCH 5/5] retrigger checks