bennetthardwick / darknet.js

A NodeJS wrapper of pjreddie's darknet / yolo.
65 stars 27 forks source link

No way to get example working #26

Closed viper86it closed 5 years ago

viper86it commented 5 years ago

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

bennetthardwick commented 5 years ago

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.

viper86it commented 5 years ago

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"

bennetthardwick commented 5 years ago

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