mobimeo / node-yolo

Node bindings for YOLO/Darknet image recognition library
https://lab.moovel.com/blog/what-you-get-is-what-you-see-nodejs-yolo
MIT License
372 stars 51 forks source link

Can't run darknetImageTest.js #7

Closed joeyklee closed 7 years ago

joeyklee commented 7 years ago

Hi! I tried 1 more time install everything from scratch - starting from downloading your fork of darknet and then installing node yolo.

when I try to run node test/darknetImageTest.js I get the following error:

$ node test/darknetImageTest.js
Couldn't open file: ./cfg/coco.data
Abort trap: 6

if I sudo then:

$ sudo node test/darknetImageTest.js
Password:
/Users/leejoey/node-yolo/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: dlopen(/Users/leejoey/node-yolo/build/Release/darknet.node, 1): Library not loaded: @rpath/libcudart.8.0.dylib
  Referenced from: /Users/leejoey/node-yolo/build/Release/darknet.node
  Reason: image not found
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at bindings (/Users/leejoey/node-yolo/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/Users/leejoey/node-yolo/darknet.js:1:96)
    at Module._compile (module.js:570:32)

any ideas?

OrKoN commented 7 years ago

@joeyklee as @b-g moved config files to the test folder, you need to run the darknetImageTest as well as other tests while being in the test. I.e. cd test && node darknetImageTest.js

OrKoN commented 7 years ago

Or you can copy cfg, data and yolo.weights to the folder from which you start the darknetImageTest

b-g commented 7 years ago

This seems solved ... will close it. Plz re-open if I'm wrong.

joeyklee commented 7 years ago

Thanks for taking care! All good from my side.