npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-yolo-shinobi

v2.0.5

Published

Node.js interface for Yolo/Darknet

Downloads

142

Readme

node-yolo

This Node.js C++ Addon came out from a computer engineering project, VAPi. It allow you to use a state-of-the-art, real-time object detection system called Yolo.

Note: Now is in progress some work to improve the module, to enhance the current functionalities:

  • First we begin to improve more robustness to the lib
  • Second give the possibility to process videos files and later on video streams
  • Split the libyolo and node-yolo projects, for those that like an easy lib to continue on C or C++ instead node.js.

Who fork and/or use this repo please stay sharp because alot of changes happening and not backwards compatibility between 1.. version and 2.. version.

Pre-requirements

  • C/C++ Compiler
  • Nvidia graphic card with CUDA support and required files installed (Only if you want to use GPU acceleration)
  • Node.js >= 9
  • node-gyp
  • ImageMagick

Installation

npm i @vapi/node-yolo --save

How To Use

const yolo = require('@vapi/node-yolo');
const detector = new yolo("darknet-configs", "cfg/coco.data", "cfg/yolov3.cfg", "yolov3.weights");
try{
	detector.detect(path)
         .then(detections => {
            // here you receive the detections
         })
         .catch(error => {
           // here you can handle the errors. Ex: Out of memory
        });
}
catch(error){
    console.log('Catch: ' + error);
}

darknet-configs is a folder where you should put the Yolo weights, cfg and data files. You need to create two folder, cfg and data and put the files for each one. Like this:

.
├── darknet-configs         # The folder for the Yolo weight, cfg and data files
│   ├── cfg                 # cfg folder
|          |── coco.data
|          |── yolov3.cfg
│   ├── data                # data folder
|   |      |── coco.names
│   └── yolov3.weights      # YoloV3 weights file
└── ...

detections object

| Field | Description |:--------------|:--------------------------------------------------------------- | className | name of the class of the object detected | probability | the higher probability that this className is correct | box | object that contains box info of the object

box object

| Field | Description |:--------------|:--------------------------------------------------------------- | x | x coordinate in pixels of the picture | y | y coordinate in pixels of the picture | w | width from x point in pixels | h | height from y point in pixels