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.6.0

5

main.js

@@ -55,2 +55,7 @@ #! /usr/bin/env node

// If MODE is BEATTHETRAFFIC keep all tracker history in memory
if(MODE_BEATTHETRAFFIC) {
Tracker.enableKeepInMemory();
}
// Parse detections input

@@ -57,0 +62,0 @@ fs.readFile(`${pathRawDetectionsInput}`, function(err, f){

2

package.json
{
"name": "node-moving-things-tracker",
"version": "0.5.4",
"version": "0.6.0",
"description": "Tracker by detections in javascript for node.js / browsers",

@@ -5,0 +5,0 @@ "url": "https://github.com/tdurand/node-moving-things-tracker",

# node-moving-things-tracker
node-moving-things-tracker is a javascript implementation of the _"tracker by detections"_ for realtime multiple object tracking (MOT) in node.js / browsers.
node-moving-things-tracker is a javascript implementation of a _"tracker by detections"_ for realtime multiple object tracking (MOT) in node.js / browsers.
Commissioned by moovel lab for [Beat the Traffic X](http://beatthetraffic.moovellab.com/) and the [Open Data Cam](http://opendatacam.moovellab.com/) project.
## confidencelem
## Problem

@@ -9,0 +9,0 @@ 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?

@@ -24,2 +24,5 @@ var ItemTracked = require('./ItemTracked').ItemTracked;

// By default, we do not keep all the history in memory
var keepAllHistoryInMemory = false;
// Implementation detail, we store the distance in a KDTREE, we want to be able to exclude values from

@@ -206,3 +209,5 @@ // the kdtree search by assigning them KDTREESEARCH_LIMIT + 1

treeItemsTracked.remove(itemTracked);
mapOfAllItemsTracked.set(itemTracked.id, itemTracked);
if(keepAllHistoryInMemory) {
mapOfAllItemsTracked.set(itemTracked.id, itemTracked);
}
}

@@ -220,2 +225,10 @@ }

exports.enableKeepInMemory = function() {
keepAllHistoryInMemory = true;
}
exports.disableKeepInMemory = function() {
keepAllHistoryInMemory = false;
}
exports.getJSONOfTrackedItems = function() {

@@ -233,2 +246,3 @@ return Array.from(mapOfItemsTracked.values()).map(function(itemTracked) {

// Work only if keepInMemory is enabled
exports.getAllTrackedItems = function() {

@@ -238,2 +252,3 @@ return mapOfAllItemsTracked;

// Work only if keepInMemory is enabled
exports.getJSONOfAllTrackedItems = function() {

@@ -240,0 +255,0 @@ return Array.from(mapOfAllItemsTracked.values()).map(function(itemTracked) {