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/include/darknet.h b/include/darknet.h index b08ae708..c42cba10 100644 --- a/include/darknet.h +++ b/include/darknet.h @@ -985,6 +985,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); 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/src/blas.c b/src/blas.c index 7311875e..a21bca69 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)); } } } diff --git a/src/network.c b/src/network.c index c3c08cee..a28a3429 100644 --- a/src/network.c +++ b/src/network.c @@ -1164,6 +1164,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; 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 + + +