Comments (4)
Hi Dmytro. Please note that for order >= 1, the velocity (horizontal and vertical) is a part of the object state. I've prepared an example presenting the velocity here development...test-velocity (run examples/2d_multi_object_tracking.py
example)
from motpy.
@wmuron Excellent example!
I dug into Kalman filters a bit more since I've posted the question and I tried to modify some parameters to measure a real km/h velocity of a vehicle. Am I understanding this correctly that your example evaluates pixel velocity and to solve my problem I would have to:
- project bounding boxes on the ground
- feed obtained boxes to the tracker and get the pixel velocity
- multiply the velocity by meters per pixel constant given the real environment distance
from motpy.
@Dmytro-Shvetsov One possible solution to project boxes on the ground is to calculate and use homography matrix to project the scene (along with each detection or track) to bird-eye view. Obviously, you'll still need to get obtain some kind of calibration data (e.g. width of the lane, lane marking length or some other known distances etc.) to calculate a relation of pixels (in bird eye view) to meters.
You can apply bird-eye transform on detections and track the transformed detections in bird-eye space or track in image space and transform active tracks to bird eye view. A couple of notes:
- The problem with the second solution is that it might be non-trivial to convert image-space pixel velocities to mph values.
- The problem with the first solution is that if your detections are unstable or quite distant from the ego camera, you might have trouble with the default matching function (because often transformed boxes won't overlap, especially in Y axis). Also the boxes after homography transform are not going to be rectangles (current IOU calculation relies on rectangular bounding boxes)
- In both cases, you could consider transforming the detection boxes to their bottom parts (e.g. the bottom 10% of the vehicle close to the ground), which will help limit errors when applying using homography to transform to bird-eye view
- Maybe you could try a hybrid approach, with tracking the bottom-box in image space and then "manual" velocity calculation for each vehicle in bird-eye space (since you know their IDs, it's easy).
from motpy.
@wmuron Got it. Thanks a lot!
from motpy.
Related Issues (20)
- Feature Request: Include ego motion of camera HOT 2
- Explanation of function arguments HOT 2
- question: any suggestions on how to speed up? HOT 2
- MOT tracks non-existent objects
- dt of MultiObjectTracker not passed into Tracker HOT 1
- Should matching follows after tracker.predict()? HOT 3
- Visualization video tracker
- 2d multi object tracking video HOT 1
- How to pass detection meta-information through the tracker? HOT 3
- Parameters for random accelerating objects HOT 1
- How to make tracking alive time longer when real bounding boxes are missing?
- Flying bboxes from lost objects
- Code not working on Windows HOT 1
- not working example command HOT 1
- Enhancement of Object Tracking Accuracy in Low-Contrast Scenes
- Installation fail on raspberry pi 4 HOT 1
- Error while processing a video HOT 7
- Skip object detection frames. HOT 1
- Retrieve detection score (and metadata) from Track HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motpy.