schwittlick / ofxDarknet

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

yolo9000 update net = parse_network_cfg... BAD ACCESS #8

Closed AndreasRef closed 7 years ago

AndreasRef commented 7 years ago

Tried building the newest version of example-yolo2 with yolo9000.weights but running into this error... Any idea why? Also tried changing the paths to relative paths, without any result.

screen shot 2017-01-19 at 15 29 04

genekogan commented 7 years ago

check out the bottom of the cfg file yolo9000.cfg, lines tree and map. try changing to:

tree=../../../data/cfg/9k.tree
map=../../../data/cfg/coco9k.map
AndreasRef commented 7 years ago

Seems like that helped, but now I get this error:

Couldn't open file: data/cfg/9k.names

genekogan commented 7 years ago

it's not finding the file. make sure the paths are set correctly. if you are referencing from the file, just switch to ofToDataPath( "cfg/9k.names" ) and make sure you have that file in there.

AndreasRef commented 7 years ago

cfg/9k.names is not referenced from the ofApp.cpp file only the following are

    std::string datacfg = ofToDataPath( "cfg/combine9k.data" );
    std::string cfgfile = ofToDataPath( "cfg/yolo9000.cfg" );
    std::string weightfile = ofToDataPath( "yolo9000.weights

9k.names is just placed in /cfg, not sure how (or where) to set its path correctly.

genekogan commented 7 years ago

go to combine9k.data and either hardcode the path or ../../../data/cfg/9k.names should work. or you can switch to the osx branch which lets you pass the names file manually via ofApp. we'll merge those soon.

AndreasRef commented 7 years ago

Editing the combine9k.data did the trick, thanks!