Comments (2)
Hi @romaintha
The approach for the period
parameter to skip frames works a little differently. You can find a demo that uses period
here.
The period
argument is useful to skip frames and speed up the tracking by running the detector over a few frames.
The short answer is that, is not necessary to call multiple times the tracker_step()
because you need to call the tracker.update()
method on each frame and the tracker.update()
uses the tracker_step()
behind the scenes.
On each tracker.update()
invocation Norfair runs the tracker_step()
method, on this operation Norfair updates some attributes, for example, the hit_counter
, and makes a prediction using the Kalman filter for the next position of each object.
As you noticed, this prediction should be executed as many times as the period value to avoid a big error when the detections arrive.
For this reason, the tracker.update()
method allows you to not pass detections
. This means that you have to run the tracker.update()
on every frame. Then, when you get the detections run the tracker.update(detections=detections, period=period)
passing the detections to the tracker. This allows Norfair to run the predictions despite not having the detections.
Norfair uses the period
argument to compensate the hit_counter
to the following tracker.update()
invocations without detections.
The code should be looks like this:
for frame in video:
detections = []
if frame % period == 0:
detections = model(frame)
tracked_objects = tracker.update(detections=detections, period=period)
from norfair.
I see. Thank you for your answer @DiegoFernandezC
from norfair.
Related Issues (20)
- How to start? HOT 6
- reid - how to use reid? HOT 2
- MotionEstimator with Reid HOT 2
- Reid in case of occlusion/object going out and coming back in the frame HOT 12
- error: (-28:Unknown error code -28) The input arrays should have at least 4 corresponding point sets to calculate Homography in function 'findHomography' HOT 6
- How to get object/track id and their bbox coordinates for a video? HOT 2
- Question about skip_period HOT 2
- Skipped frames on avi videos
- Suggestions to make the processing faster HOT 5
- Typing issues (example: `Detection.embedding` is `Unknown | None`)
- object ids in tracked_objects skipped a number? HOT 8
- Detection confidence when drawing tracked_objects' boxes? HOT 5
- Any tips on how to use Norfair for re-identification accross cameras HOT 1
- Ask a question about object tracking HOT 3
- Configure logging behavior? HOT 1
- The class of object being tracked changes over time HOT 3
- FixedCamera crashes with an inappropriate point array shape
- Detection age not always set
- Detection age not updated after merging tracked objects
- What are the tracked objects? HOT 6
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 norfair.