bennetthardwick / darknet.js

A NodeJS wrapper of pjreddie's darknet / yolo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Still no support for Windows?

jaroslavhuss opened this issue · comments

Hello!,

when trying to instal darknet, I am getting this error:

`C:\Users\hussj\Desktop\MLTest>npm i darknet
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported

darknet@3.1.6 install C:\Users\hussj\Desktop\MLTest\node_modules\darknet
./install-script.sh && node-gyp rebuild

'.' is not recognized as an internal or external command,
operable program or batch file.
npm WARN MLTest@1.0.0 No description
npm WARN MLTest@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! darknet@3.1.6 install: ./install-script.sh && node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the darknet@3.1.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hussj\AppData\Roaming\npm-cache_logs\2021-09-07T18_09_13_373Z-debug.log`

It seems it does not want run node-gyp command... Is it because I am on W10?

Thank you!

Hey, no there's still no native support for Windows. There's an issue (#25) for supporting Windows but since I run Linux I haven't gotten around to it.

As far as I'm aware darknet.js should run fine in the WSL so that could be an option in the meantime?

@bennetthardwick - it was great advice to use WSL. I succeeded in the setup up of your Darknet.js, unfortunately, it takes 12-15 seconds to evaluate the image. I am not sure what the problem is - maybe you could give me another advice?

I have created this repo. I will try to ask some more people what could be the issue or what would be the best approach for the project I am having fun with.

Thank you again Bennet for your advice and really good work!

Jarda

Hey, @jaroslavhuss it looks you're using a config that has 106 layers. The examples in this repo all use the "yolov3-tiny" config which is built for speed - it only has 24 layers.

You can see in this graph from pjreddie's website that using yolov3 they get about 20 - 40 fps but using yolov3-tiny they get 220 fps.

1631280002

You should consider retraining using the yolov3-tiny config, or even the yolov4-tiny config (although I've not tested it before)

Also if you have a CUDA compatible GPU you should look into enabling GPU detections - it dramatically improves the speed of detections. Here's some info on CUDA for WSL as well as how to enable it for darknet.js:

1631280089

Best of luck! Let me know how you go.

Dear Bennett,

your answer helped a lot! I actually tried your examples, and with WSL2 without CUDA i got myself in about 1 second. Which is perfect!

Anyway, I think I am facing one last issue - and that is the config file and google collab.

My Google Collab sheet can be found here - especially point number 3) Configure Darknet network for training YOLO V3 - I am using pjreddies cfg file, but the problem is that I am using just one class called "monster".

Basically even after 1,5k iterations, the algorithm is not able to find any "monster" and I believe I still have some errors in the aforementioned file.

Please, if you find some time to look at that google collab, I would be super grateful.

Ps.:

  1. Link to new trained data.
  2. Link to the labeled images
  3. Link to the cfg
  4. Link to the google collab sheet

Thank you in advance!

Hey @jaroslavhuss, nothing wrong really stands out to me...

Have you tried training without changing the config too much? Perhaps try only uncommenting these lines: https://github.com/AlexeyAB/darknet/blob/9ff8653d999c8a22bc8f1ff4f4a8a3cc5b63d255/cfg/yolov3-tiny.cfg#L2-L7

Other than that I'm not really sure, unfortunately. The last time I successfully trained my own model was three years ago and I remember there was a lot of trial and error.

@bennetthardwick it works! You helped a lot! All I need to do is to speed WSL2 with GPU and it will be fast :-). Sir, you are freaking awesome! If you ever pay a visit to the Czech Republic, please, let me know - I will be your guide :-). Many and many thanks from a really happy person.

Awesome, that's great to hear! I'm sure I'll take you up on that offer one day 😆