From 3ff1b75f3b1fd4c3acef8cd0b494b4591595aa4e Mon Sep 17 00:00:00 2001 From: Thibault Durand Date: Thu, 19 Sep 2019 23:03:29 +0200 Subject: [PATCH] Fix: Do not round bbox coordinates in mode opendatacam-darknet --- README.md | 2 +- main.js | 7 ++++++- package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1accb71..4ebd39f 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ node-moving-things-tracker --debug --input PATH_TO_YOLO_DETECTIONS.txt # Run on opendatacam/darknet detection data -Usage with opendatacam/darknet generated tracker data. +Usage with opendatacam/darknet (https://github.com/opendatacam/darknet/pull/2) generated tracker data ```bash node-moving-things-tracker --mode opendatacam-darknet --input detectionsFromDarknet.json diff --git a/main.js b/main.js index f4f5621..edf8aae 100755 --- a/main.js +++ b/main.js @@ -173,7 +173,12 @@ fs.readFile(`${pathRawDetectionsInput}`, function (err, f) { Tracker.updateTrackedItemsWithNewFrame(detectionsForThisFrame, parseInt(frameNb, 10)) if (!MODE_MOTChallenge) { - tracker[frameNb] = Tracker.getJSONOfTrackedItems(); + if(MODE_DARKNET) { + // Do not round coordinates of bbox + tracker[frameNb] = Tracker.getJSONOfTrackedItems(false); + } else { + tracker[frameNb] = Tracker.getJSONOfTrackedItems(); + } } else { MOToutput = MOToutput.concat(Tracker.getTrackedItemsInMOTFormat(frameNb)); } diff --git a/package.json b/package.json index c974f84..88ec35b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-moving-things-tracker", - "version": "0.7.0", + "version": "0.7.1", "description": "Tracker by detections in javascript for node.js / browsers", "url": "https://github.com/tdurand/node-moving-things-tracker", "main": "main.js",