Git Product home page Git Product logo

Comments (9)

genekogan avatar genekogan commented on August 15, 2024

yeah we have to fix the paths -- the app and the static lib are in different locations, which is causing the path problems. for now you can fix this by changing the paths to the absolute paths of those files.

from ofxdarknet.

AndreasRef avatar AndreasRef commented on August 15, 2024

Cool, thanks.

However, now in the I get the error in console (example-yolo2):

Couldn't open file: data/coco.names

Not sure whats up with this, since the setup function only calls coco.data and coco.list, but the addon does not contain any coco.list file as far as I can see? I specified its absolute path, and have tried swapping coco.list for coco.names without results.

For example-imagenet the issue is very similar:
Couldn't open file: data/imagenet.shortnames.list

Tried to put place this file in the data folder:
https://github.com/pjreddie/darknet/blob/master/data/imagenet.shortnames.list
and link to its absolute path, but still get the same error.

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

ah -- open the file coco.data and change the path to names to the absolute path for coco.names and that should temp fix it. we need to sort out these path issues.

from ofxdarknet.

AndreasRef avatar AndreasRef commented on August 15, 2024

That did the trick for example-yolo2, thanks!

Any quick ideas for example-imagenet?

from ofxdarknet.

schwittlick avatar schwittlick commented on August 15, 2024

its really confusing that you guys are having problems with paths to files on osx. on windows it's working with these relative paths. one solution would be to construct absolute paths in a manner like (yolo2 example):

std::string datacfg = ofToDataPath( "../cfg/coco.data" );
std::string cfgfile = ofToDataPath( "../cfg/yolo.cfg" );
std::string weightfile = ofToDataPath( "yolo.weights" );
std::string nameslist = ofToDataPath( "coco.list" );
darknet.init( cfgfile, weightfile, datacfg, nameslist );

this works on windows as well and might fix the issues on osx as well. let me know if this goes anywhere

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

the reason this happens is that the darknet static lib uses different file-handlers than OF, so they are being executed from a different root. using ofToDataPath as @Mrzl suggested does fix this. i will fix this in the next commit. @Mrzl is there any reason you include coco.names twice? in both data and cfg. probably makes sense just to have one.

from ofxdarknet.

schwittlick avatar schwittlick commented on August 15, 2024

while i was at it, i adjusted this in all examples, readme etc. and moved the configuration files consistently within the of data folder. let me known if this solved it all.

from ofxdarknet.

AndreasRef avatar AndreasRef commented on August 15, 2024

My friend just cloned the repo and tried the yolo-2 example. We still needed to open the file coco.data and change the path to names to the absolute path for coco.names for the example to work.

from ofxdarknet.

genekogan avatar genekogan commented on August 15, 2024

as of #13 you no longer have to use the coco.data file and specify the names file manually. so these problems should be resolved now.

from ofxdarknet.

Related Issues (20)

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.