Git Product home page Git Product logo

yolov4-ncnn-raspberry-pi-4's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yolov4-ncnn-raspberry-pi-4's Issues

Program crash (Segmentation fault)

When "not" using YOLOV4_TINY program generates a segmentation fault in

static int detect_yolov4(const....
.
.
objects.push_back(object); <--

Reproducable under Ubuntu as well

Segmentation fault

I cloned the repository and ran the YoloV4.cbp file, but I am getting a "Segmentation fault" error.
I am using raspberry pi 4 with code blocks

How to deal with scaled YoloV4-csp or YoloV4-tiny models?

Hi I have 2 custom trained scaled YoloV4 models (YoloV4-csp & Darknet YoloV4-Tiny) to detect 10 classes. I have reformatted them to work with your examples, for csp version (Pytorch->ONNX->MNN) and TINY (Darknet->tflite & Darknet->ncnn). I'm having a hard-time figuring out how to adapt your yolov4.cpp code to set confidence or IOU thresholds for my Tiny model. I'm not going get into the YoloV4-csp model here because I couldn't convert it to ncnn and the mnn/onnx versions are another can of worms. Don't even know where to begin...

Anyways, I couldn't re-work your SSD code to get the tflite tiny model to run, but with some tweaking I did manage to get the ncnn version going with webcam infeed. I compared the topology of this repo's Tiny.param with my custom trained one and the only thing that stands out are the csp feature shortcuts. For example, the topology of my model's last few layers looks like this:

Split 27_192_bn_leaky_split 1 2 27_192_bn_leaky 27_192_bn_leaky_split_0 27_192_bn_leaky_split_1 -23330=8,3,20,20,256,3,20,20,256
Convolution 28_200 1 1 27_192_bn_leaky_split_0 28_200_bn_leaky -23330=4,3,20,20,512 0=512 1=3 4=1 5=1 6=1179648 9=2 -23310=1,1.0e-01
Convolution 29_208 1 1 28_200_bn_leaky 29_208 -23330=4,3,20,20,45 0=45 1=1 5=1 6=23040
Yolov3DetectionOutput detection_out 1 1 29_208 yolo0 -23330=4,2,6,1,1 0=10 1=3 2=2.5e-01 -23304=12,1.0e+01,1.4+01,2.3e+01,2.7e+01,3.7e+01,5.8e+01,8.1e+01,8.2e+01,1.35e+02,1.69e+02,3.44e+02,3.190e+02 -23305=3,1077936128,1082130432,1084227584 -23306=2,3.36e+01,3.36e+01
Convolution 32_236 1 1 27_192_bn_leaky_split_1 32_236_bn_leaky -23330=4,3,20,20,128 0=128 1=1 5=1 6=32768 9=2 -23310=1,1.0e-01
Interp 33_244 1 1 32_236_bn_leaky 33_244 -23330=4,3,40,40,128 0=1 1=2.0e+00 2=2.0e+00
Concat 34_247 2 1 33_244 23_167_bn_leaky_split_1 34_247 -23330=4,3,40,40,384
Convolution 35_250 1 1 34_247 35_250_bn_leaky -23330=4,3,40,40,256 0=256 1=3 4=1 5=1 6=884736 9=2 -23310=1,1.0e-01
Convolution 36_258 1 1 35_250_bn_leaky 36_258 -23330=4,3,40,40,45 0=45 1=1 5=1 6=11520
Yolov3DetectionOutput detection_out 1 1 36_258 yolo1 -23330=4,2,6,38,1 0=10 1=3 2=2.5e-01 -23304=12,1.0e+01,1.4e+01,2.3e+01,2.7e+01,3.7e+01,5.8e+01,8.1e+01,8.2e+01,1.35e+02,1.69e+02,3.44e+02,3.19e+02 -23305=3,1065353216,1073741824,1077936128 -23306=2,1.68e+01,1.68e+01

In the yolov4.cpp code, when I set ex.extract("yolo0", out), the confidence of my detected object is ~80% where as if I use the last layer's output ("yolo1") I get ~20-30% for the same object. I can't figure out how I should be merging the results of these two parallel output layers or how to set their detection thresholds like you do in the YoloV5 example. Any advice with code would be greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.