New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-moving-things-tracker

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-moving-things-tracker - npm Package Compare versions

Comparing version

to
0.5.0

3

ItemTracked.js

@@ -185,3 +185,4 @@ var uuidv4 = require('uuid/v4');

bearing: parseInt(computeBearingIn360(this.velocity.dx, - this.velocity.dy), 10),
name: this.getMostlyMatchedName()
name: this.getMostlyMatchedName(),
isZombie: this.isZombie
}

@@ -188,0 +189,0 @@ }

@@ -83,3 +83,3 @@ #! /usr/bin/env node

tracker[frameNb] = Tracker.getJSONDebugOfTrackedItems();
tracker[frameNb] = Tracker.getJSONOfTrackedItems();

@@ -86,0 +86,0 @@ });

{
"name": "node-moving-things-tracker",
"version": "0.4.2",
"description": "Tracker by detections wrote in javascript for node.js / browsers",
"version": "0.5.0",
"description": "Tracker by detections in javascript for node.js / browsers",
"url": "https://github.com/tdurand/node-moving-things-tracker",
"main": "main.js",

@@ -13,2 +14,5 @@ "bin": {

"author": "@tdurand",
"contributors": [
"Benedikt Groß <b-g> (http://benedikt-gross.de/)"
],
"license": "MIT",

@@ -15,0 +19,0 @@ "dependencies": {

# node-moving-things-tracker
Realtime tracker by detections wrote in javascript for node.js / browsers
node-moving-things-tracker is a javascript implementation of the _"tracker by detections"_ for realtime multiple object tracking (MOT) in node.js / browsers.
### Introduction
Commissioned by moovel lab for [Beat the Traffic X](http://beatthetraffic.moovellab.com/) and the [Open Data Cam](http://opendatacam.moovellab.com/) project.
node-moving-things-tracker is a javascript implementation of the _"tracker by detections"_ for realtime multiple object tracking (MOT).
## Problem
It takes in input a txt file _(TODO change to json)_ generated by [node-yolo](https://github.com/moovel/node-yolo) and outputs a `tracker.json` file that assigns unique IDs to the YOLO detections bbox.
How to track persistently multiple moving things from frame-by-frame object detections inputs? How to assign an unique identifier to frame-by-frame object detection results?
_The detections entry file could be generated by object detection algorithm than YOLO, it just needs to respects the [same format](https://github.com/tdurand/node-moving-things-tracker#detections-input-and-tracker-output-format).
Often object detection framework don't have any memory of their detection results over time e.g. Yolo provides every frame an array of detections results in the form of `[[x,y,w,h,prob,name] ...]`, note that there isn't any unique ID to indentify the same detected object in future frames.
**Detections Input**
**Detections input:**
Raw Yolo detection results
![detections](https://user-images.githubusercontent.com/533590/33817459-030e3822-de40-11e7-979d-0c8071ea2a94.gif)
**Tracker output:**
**Tracker Output**
Yolo detection results enhanced with unique IDs after beeing processed by node-moving-things-tracker. Note that now every object has been assigned an unique ID
![tracker](https://user-images.githubusercontent.com/533590/33817550-6913047c-de40-11e7-8552-f284c738f1c0.gif)
## Installation
### Installation and usage
> Requires node.js , available as a npm module: http://npmjs.com/node-moving-things-tracker
```bash

@@ -35,15 +35,6 @@ # Install globaly to use as command line tool

**Command line usage**
## Usage
> NOTE : usage is customized for the use case of [lab-beat-the-traffic](https://github.com/moovel/lab-beat-the-traffic)
**As a node module**
```bash
node-moving-things-tracker --input PATH_TO_YOLO_DETECTIONS.txt
# This will output a tracker.json file in the same folder containing the tracker data
```
**As an external module**
> See usage in [lab-traffic-cam](https://github.com/moovel/lab-traffic-cam/blob/master/server/counter/Counter.js#L57)
```javascript

@@ -57,4 +48,19 @@ const Tracker = require('node-moving-things-tracker').Tracker;

### Detections Input and tracker output format
Example: [`Opendatacam.js`](https://github.com/opendatacam/opendatacam/blob/master/server/Opendatacam.js#L228) of the Open Data Cam project.
**Command line usage**
node-moving-things-tracker takes as an input a txt file generated by [node-yolo](https://github.com/moovel/node-yolo) and outputs a `tracker.json` file that assigns unique IDs to the YOLO detections bbox.
The detections entry file could also be generated by another object detection algorithm than YOLO, it just needs to respects the [same format](https://github.com/tdurand/node-moving-things-tracker#detections-input-and-tracker-output-format).
> NOTE : usage is customized for the use case of [Beat the Traffic X](https://beatthetraffic.moovellab.com)
```bash
node-moving-things-tracker --input PATH_TO_YOLO_DETECTIONS.txt
# This will output a tracker.json file in the same folder containing the tracker data
```
## Detections Input and tracker output format
See example [here](https://github.com/tdurand/node-moving-things-tracker/tree/master/example):

@@ -90,2 +96,3 @@

"name": "car",
"isZombie": false
},

@@ -99,2 +106,3 @@ {

"name": "car",
"isZombie": true
}

@@ -146,5 +154,18 @@ ]

### Limitations
## Limitations
No params tweaking is possible via command-line for now, it is currently optimized for car tracking.
No params tweaking is possible via command-line for now, it is currently optimized for tracking cars in traffic videos.
## License
[MIT License](LICENSE)
## Acknowledgments
node-moving-things-tracker is based on the ideas and work of the following people. References are listed chronologicaly how we encounter them.
- [OpenCV Matching Faces Over Time](http://shiffman.net/general/2011/04/26/opencv-matching-faces-over-time/) by Daniel Shiffman
- [Filter for interupting values](https://discourse.vvvv.org/t/filter-for-interupting-values/15601) related thread in the VVVV forum with source code and approaches. Pointer via [Joreg](https://github.com/joreg)
- [IOU Tracker](https://github.com/bochinski/iou-tracker/) by Erik Bochinski, Volker Eiselein and Thomas Sikora, based on this [paper](elvera.nue.tu-berlin.de/files/1517Bochinski2017.pdf).
- [SORT Tracker](https://github.com/abewley/sort) by Alex Bewley, based on this [paper](https://arxiv.org/abs/1602.00763).