schwittlick / ofxDarknet

darknet neural network addon for openFrameworks
MIT License
496 stars 89 forks source link

Segmentation fault (core dumped) #44

Open ratmother opened 5 years ago

ratmother commented 5 years ago

I'm getting a segmentation fault running ofxDarknet on Ubuntu 18.0.4.

**... 13 conv 512 3 x 3 / 1 1 x 1 x1024 -> 1 x 1 x 512 14 conv 425 1 x 1 / 1 1 x 1 x 512 -> 1 x 1 x 425 15 detection Loading weights from data/yolov2-tiny.weights...Done! Segmentation fault (core dumped) /home/red/OF/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:184: recipe for target 'run' failed make: * [run] Error 139

Tried with yolo9000, tiny-yolo, yolov2-tiny, all same error. Tried reducing/changing subdivisons, batch size, dimensions, etc, to no effect.

Normal (non OFX) Darknet runs fine (when reducing the image dimensions to something very low) at higher dimensions I get the segmentation fault, my gtx 980 ti's memory is 6gb and should be capable of handling very small image dimensions. However with OFX Darknet I get segmentation fault at sizes of 32x32 and 96x96.

Is there anyway, anyway at all, to get ofxDarknet to work on a linux machine? An older version?

edit: btw, no idea what I'm doing but when trying to place the new darknets files into ofxdarknet i get the error OF/addons/ofxDarknet/src/ofxDarknet.h:93:2: error: ‘list1’ does not name a type; did you mean ‘list’? list1 *options1; ^~~~~

after putting darknet.h into ofxdarknet's src folder -- again this is probably totally wrong to do but thought i'd give it a shot...

edit2: replace 'list' in darknets files with list1, now error is

*/OF/addons/ofxDarknet/src/ofxDarknet.cpp:18: error: invalid conversion from ‘const char’ to ‘char*’ [-fpermissive] net = parse_network_cfg( cfgfile.c_str() );


**edit3:** I stumbled about and fixed the above const char issue, but I'm dead stuck now as no clue how to even go about fixing the below error. 

OF/addons/ofxDarknet/src/ofxDarknet.cpp:103: error: use of undeclared identifier 'get_network_output_layer_gpu'
ratmother commented 5 years ago

Tried it on fresh Ubuntu 16 -- same exact error. Works on Windows 10.

saynono commented 4 years ago

Can you try and comment lines 57 and 58 of ofxDarknet.cpp and see what happens?

//        layerNames.push_back(layerName+" "+ofToString(counts[type]));
//        counts[type] += 1;
ratmother commented 4 years ago

Nothing changed. I haven't been keeping track of this very well but I tried commenting the lines on both a fresh version of ofxDarknet and an older one (I'm not 100% sure it was the one I worked on in this thread).

saynono commented 4 years ago

I am working on an updated version of it for linux. Once finished and tested I am happy to share it with you.

ratmother commented 4 years ago

That'd be amazing thank you!

saynono commented 4 years ago

This is the first very unpolished version. See if you can run the example: https://github.com/saynono/ofxYoloSolo