bennetthardwick / darknet.js

A NodeJS wrapper of pjreddie's darknet / yolo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No way to get example working

viper86it opened this issue · comments

Hi,
I'm trying to run the example but I get an error:

`File ‘giraffe.jpg’ already there; not retrieving.

internal/modules/cjs/loader.js:638
throw err;
^

Error: Cannot find module '../darknet'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (/home/viper/darknetjs/darknet/examples/yolov3-tiny.js:1:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
`
Node version: v10.16.3
Node-gyp: v5.0.3
Hardware: Nvidia Jetson Nano

Darknet is compiled corretly, also if is not the AlexeyAB fork which has better performances.

Any idea?
Thanks

Sorry @viper86it, I forgot to write a crucial step in starting the example - actually building the library! I've updated the instructions like so:

# Clone the repositorys
git clone https://github.com/bennetthardwick/darknet.js.git darknet && cd darknet
# Install dependencies and build Darknet
npm install
# Compile Darknet.js library
npx tsc
# Run examples
./examples/example

Let me know if this fixes it for you.

Thanks! Now works perfectly.
I have another suggestion: in "install-script.sh", when you edit "Makefile", you should change "nvcc" to "/usr/local/cuda/bin/nvcc"

Is there any reason why you'd want the full path? Did you not have nvcc added to your PATH?