All Projects → bennetthardwick → darknet.js

bennetthardwick / darknet.js

Licence: other
A NodeJS wrapper of pjreddie's darknet / yolo.

Programming Languages

C++
36643 projects - #6 most used programming language
typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to darknet.js

go-darknet
Go bindings for Darknet (YOLO v4 / v3)
Stars: ✭ 56 (-8.2%)
Mutual labels:  yolo, darknet, yolov3-tiny
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (+231.15%)
Mutual labels:  yolo, darknet
pnn
pnn is Darknet compatible neural nets inference engine implemented in Rust.
Stars: ✭ 17 (-72.13%)
Mutual labels:  yolo, darknet
yolor
implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
Stars: ✭ 1,867 (+2960.66%)
Mutual labels:  yolo, darknet
Map
mean Average Precision - This code evaluates the performance of your neural net for object recognition.
Stars: ✭ 2,324 (+3709.84%)
Mutual labels:  yolo, darknet
Deepstream Yolo
NVIDIA DeepStream SDK 5.1 configuration for YOLO models
Stars: ✭ 166 (+172.13%)
Mutual labels:  yolo, darknet
darknet-nnpack
Darknet with NNPACK
Stars: ✭ 302 (+395.08%)
Mutual labels:  yolo, darknet
Pyyolo
Simple python wrapper for YOLO.
Stars: ✭ 128 (+109.84%)
Mutual labels:  yolo, darknet
vehicle-rear
Vehicle-Rear: A New Dataset to Explore Feature Fusion For Vehicle Identification Using Convolutional Neural Networks
Stars: ✭ 99 (+62.3%)
Mutual labels:  yolo, darknet
darknet
php ffi darknet
Stars: ✭ 21 (-65.57%)
Mutual labels:  yolo, darknet
OpenCV-Flask
🐛 🐛 Opencv视频流传输到网页浏览器并做目标检测 🐛 🐛
Stars: ✭ 35 (-42.62%)
Mutual labels:  yolo, darknet
Darknet2ncnn
Darknet2ncnn converts the darknet model to the ncnn model
Stars: ✭ 149 (+144.26%)
Mutual labels:  yolo, darknet
Yolo segmentation
image (semantic segmentation) instance segmentation by darknet or yolo
Stars: ✭ 143 (+134.43%)
Mutual labels:  yolo, darknet
Viseron
Self-hosted NVR with object detection
Stars: ✭ 192 (+214.75%)
Mutual labels:  yolo, darknet
Yolo Powered robot vision
Stars: ✭ 133 (+118.03%)
Mutual labels:  yolo, darknet
Yolo person detect
person detect based on yolov3 with several Python scripts
Stars: ✭ 212 (+247.54%)
Mutual labels:  yolo, darknet
darknet-vis
Visualize YOLO feature map in prediction for easily checking your model performance
Stars: ✭ 68 (+11.48%)
Mutual labels:  yolo, darknet
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+2467.21%)
Mutual labels:  yolo, darknet
Yolo mark
GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2
Stars: ✭ 1,624 (+2562.3%)
Mutual labels:  yolo, darknet
DarkPlate
License plate parsing using Darknet and YOLO
Stars: ✭ 36 (-40.98%)
Mutual labels:  yolo, darknet

Darknet.JS

A Node wrapper of pjreddie's open source neural network framework Darknet, using the Foreign Function Interface Library. Read: YOLOv3 in JavaScript.

Prerequisites

  • Linux, Windows (Linux sub-system),
  • Node
  • Build tools (make, gcc, etc.)

Examples

To run the examples, run the following commands:

# 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

Note: The example weights are quite large, the download might take some time

Installation

You can install darknet with npm using the following command:

npm install darknet

If you'd like to enable CUDA and/or CUDANN, export the flags DARKNET_BUILD_WITH_GPU=1 for CUDA, and DARKNET_BUILD_WITH_CUDNN=1 for CUDANN, and rebuild:

export DARKNET_BUILD_WITH_GPU=1
export DARKNET_BUILD_WITH_CUDNN=1
npm rebuild darknet

You can enable OpenMP by also exporting the flag DARKNET_BUILD_WITH_OPENMP=1;

You can also build for a different architecture by using the DARKNET_BUILD_WITH_ARCH flag.

Usage

To create an instance of darknet.js, you need a three things. The trained weights, the configuration file they were trained with and a list of the names of all the classes.

import { Darknet } from "darknet";

// Init
let darknet = new Darknet({
  weights: "./cats.weights",
  config: "./cats.cfg",
  names: ["dog", "cat"],
});

// Detect
console.log(darknet.detect("/image/of/a/dog.jpg"));

In conjuction with opencv4nodejs, Darknet.js can also be used to detect objects inside videos.

const fs = require("fs");
const cv = require("opencv4nodejs");
const { Darknet } = require("darknet");

const darknet = new Darknet({
  weights: "yolov3.weights",
  config: "cfg/yolov3.cfg",
  namefile: "data/coco.names",
});

const cap = new cv.VideoCapture("video.mp4");

let frame;
let index = 0;
do {
  frame = cap.read().cvtColor(cv.COLOR_BGR2RGB);
  console.log(darknet.detect(frame));
} while (!frame.empty);

Example Configuration

You can download pre-trained weights and configuration from pjreddie's website. The latest version (yolov3-tiny) is linked below:

If you don't want to download that stuff manually, navigate to the examples directory and issue the ./example command. This will download the necessary files and run some detections.

Built-With

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].