Features: Reset idDisplay, configurable fast delete and custom distance function#19
Features: Reset idDisplay, configurable fast delete and custom distance function#19tdurand merged 15 commits intoopendatacam:masterfrom
Conversation
Resetting the tracker now also resets the ID if tracked items.
Feat: Reset idDisplay
This allows to configure if detections should be removed
quickly in cases where they were detected and could not
be matched afterwards.
Fast deletion can be enabled/disabled via
```
Tracker.setParams({ items: { fastDelete: false } });
```
Feat(Tracker): Configurable Fast Delete
Allows to change fast detele for each item individually (e.g. based on confidence).
refactor(Tracker): FastDelete configurable per Item
Feat(Tracker): Allow for custom distance functions
chore(ItemTracked): Removes unused function
This is useful to set the distance limit when setting a custom distance function.
Refactor(tracker): Allow setting distance limit
|
Hi, Thanks for cleaning up and improving this messy code ;-) .. Seems good to me, could release this as a new version of the node package and add it to OpenDataCam curious if for your use case if you found some good improvements from tweaking the tracker ? |
Adds @vsaw as contributor and bumps version to 0.8.0
|
Hi @tdurand
Thank you for putting up the hard work and writing it in the first place 🙂
I've bumped the version, but I'm unsure if I can push a new version to npmjs. Once we a new version up on npm I'd be happy to update the dependency in OpenDataCam itself.
I guess my results are highly use case specific, but when tracking small objects (< 5% of relative size) the objects were often moving to fast for the tracker to have an overlap between two frames. Therefore
In my case this had a significant impact on the number of IDs the tracker produced. OpenDataCam itself did not have this dramatic increase of counted objects, but I was still able to track 12% more objects on average. |
|
@vsaw nice, no I think I need to push it myself for the rights for npm... will do now. Many thanks for the inputs.. makes sense if there are too small object.. and yes main problem is that everything tends to be use case specific so no real winner ;-) Glad OpenDataCam was a good starting base for your project |
|
I just published v8.0.0 on npm and added a release: https://github.com/opendatacam/node-moving-things-tracker/releases Hopefully this will helps you avoid maintaining a fork on your end .. |
Maybe a GitHub Action such as https://github.com/marketplace/actions/npm-publish could help to take the grunt work out of it :-)
Yes, thanks again for opening it up for others! |

This pull request contains 3 improvements
1. Reset idDisplay
Resetting the tracker did not affect the item ID. Therefore multiple tests runs on the same file were difficult to evaluate as one had to offset the later runs to get the actual number of the items tracked.
This pull request fixes this. As it introduces a new reset function for ItemsTracked.
To prove it is working, jasmine tests with GitHub Actions are included. As GitHub does not run the checks in the opendatacam repository see the passing checks in my fork here: https://github.com/vsaw/node-moving-things-tracker/actions/runs/202256302
2. Configurable Fast Delete
This allows to configure if detections should be removed quickly in cases where they were detected and could not be matched afterwards.
Fast deletion can be enabled/disabled via:
Again passing tests can be see here https://github.com/vsaw/node-moving-things-tracker/pull/2/checks
3. Custom Distance Function
In cases where one wants to try with a custom distance function it can now be passed to the Tracer as follows:
As usual passing tests can be found here: https://github.com/vsaw/node-moving-things-tracker/actions/runs/203819989