Comments (6)
When the hit_inertia
value of a TrackedObject
instance reaches hit_inertia_min
, you will find that object in the tracked_objects
list of the tracker, but will not be returned when you update your tracker with your current detections until the object finish initializing. The object is being initialized until the hit_inertia
value exceeds hit_inertia_min
by initialization_delay
, after that, the objects has been initialized and will be assigned an id
value, and you will see it in the list that is returned when you update the tracker with your detections.
I think the output you showed here corresponds with the tracked_objects
list of the tracker, instead of the list returned by the tracker when you update.
from norfair.
@joaqo thank you! I see, if the counter starts with hit_inertia_min + 1, then everything fall into place. Yeah, an update of docs will be much appreciated.
from norfair.
Great! Yeah, the docs are in need of a lot of work, we'll fix them soon 😀
from norfair.
Closing due to inactivity.
from norfair.
When the
hit_inertia
value of aTrackedObject
instance reacheshit_inertia_min
, you will find that object in thetracked_objects
list of the tracker, but will not be returned when you update your tracker with your current detections until the object finish initializing. The object is being initialized until thehit_inertia
value exceedshit_inertia_min
byinitialization_delay
, after that, the objects have been initialized and will be assigned anid
value, and you will see it in the list that is returned when you update the tracker with your detections.I think the output you showed here corresponds with the
tracked_objects
list of the tracker, instead of the list returned by the tracker when you update.
Thank you for the replay and sorry for the late answer. I see. You say that there is a difference between tracked_objects inside the tracker and the output of the tracker.update. But still, the behaviour of counters is not clear to me. First of all, here I printed the values of the output of tracker.update. My code:
hit_inertia_min = 5
hit_inertia_max = 10
initialization_delay = 3
visualize = True
tracker = Tracker(
distance_function=euclidean_distance,
distance_threshold=max_distance_between_points,
hit_inertia_min=hit_inertia_min,
hit_inertia_max=hit_inertia_max,
initialization_delay=initialization_delay,
)
for i in range(20):
# here I use a message from ROS but never mind it is just a fixed bbox
# which I then convert to Norfair format
test_box = BoundingBox()
test_box.xmin = 514
test_box.ymin = 317
test_box.xmax = 560
test_box.ymax = 355
msg = BoundingBoxes()
msg.bounding_boxes = [test_box]
detections = msg.bounding_boxes
detections = ros_detections_to_norfair_detections(detections)
# no boxes from some point
if i > 10:
msg = BoundingBoxes()
detections = msg.bounding_boxes
tracked_objects = tracker.update(detections=detections)
print(f'Update number: {i}')
print(f'tracker.tracked_objects: {tracker.tracked_objects}')
print(f'tracker.update(detections=detections): {tracked_objects}')
print('____________')
I don't know how to access these two different entities but for tracker.tracked_objects and tracker.update(detections=detections) output is the following:
Update number: 0
tracker.tracked_objects: [Object_None(age: 0, hit_counter: 6, last_distance: None, init_id: 15)]
tracker.update(detections=detections): []
____________
Update number: 1
tracker.tracked_objects: [Object_None(age: 1, hit_counter: 7, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): []
____________
Update number: 2
tracker.tracked_objects: [Object_None(age: 2, hit_counter: 8, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): []
____________
Update number: 3
tracker.tracked_objects: [Object_1(age: 3, hit_counter: 9, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 3, hit_counter: 9, last_distance: 0.00, init_id: 15)]
____________
Update number: 4
tracker.tracked_objects: [Object_1(age: 4, hit_counter: 10, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 4, hit_counter: 10, last_distance: 0.00, init_id: 15)]
____________
Update number: 5
tracker.tracked_objects: [Object_1(age: 5, hit_counter: 11, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 5, hit_counter: 11, last_distance: 0.00, init_id: 15)]
____________
Update number: 6
tracker.tracked_objects: [Object_1(age: 6, hit_counter: 10, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 6, hit_counter: 10, last_distance: 0.00, init_id: 15)]
____________
Update number: 7
tracker.tracked_objects: [Object_1(age: 7, hit_counter: 11, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 7, hit_counter: 11, last_distance: 0.00, init_id: 15)]
____________
Update number: 8
tracker.tracked_objects: [Object_1(age: 8, hit_counter: 10, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 8, hit_counter: 10, last_distance: 0.00, init_id: 15)]
____________
Update number: 9
tracker.tracked_objects: [Object_1(age: 9, hit_counter: 11, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 9, hit_counter: 11, last_distance: 0.00, init_id: 15)]
____________
Update number: 10
tracker.tracked_objects: [Object_1(age: 10, hit_counter: 10, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 10, hit_counter: 10, last_distance: 0.00, init_id: 15)]
____________
Update number: 11
tracker.tracked_objects: [Object_1(age: 11, hit_counter: 9, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 11, hit_counter: 9, last_distance: 0.00, init_id: 15)]
____________
Update number: 12
tracker.tracked_objects: [Object_1(age: 12, hit_counter: 8, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 12, hit_counter: 8, last_distance: 0.00, init_id: 15)]
____________
Update number: 13
tracker.tracked_objects: [Object_1(age: 13, hit_counter: 7, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 13, hit_counter: 7, last_distance: 0.00, init_id: 15)]
____________
Update number: 14
tracker.tracked_objects: [Object_1(age: 14, hit_counter: 6, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 14, hit_counter: 6, last_distance: 0.00, init_id: 15)]
____________
Update number: 15
tracker.tracked_objects: [Object_1(age: 15, hit_counter: 5, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 15, hit_counter: 5, last_distance: 0.00, init_id: 15)]
____________
Update number: 16
tracker.tracked_objects: [Object_1(age: 16, hit_counter: 4, last_distance: 0.00, init_id: 15)]
tracker.update(detections=detections): [Object_1(age: 16, hit_counter: 4, last_distance: 0.00, init_id: 15)]
____________
Update number: 17
tracker.tracked_objects: []
tracker.update(detections=detections): []
____________
Update number: 18
tracker.tracked_objects: []
tracker.update(detections=detections): []
____________
Update number: 19
tracker.tracked_objects: []
tracker.update(detections=detections): []
We get tracked_objects not after hit_inertia_min, but at the first detection appearance. Then we get objects in the output of tracker.update at third detection appearance, not at hit_inertia_min + initialization_delay. And thirdly, why do we have hit_counter = 6 right at the beginning. Maybe I'm doing something wrong, I will be glad for the help.
from norfair.
Hey @dinarkino I think the confusion is because each tracked object starts with hit_inertia_min + 1 as its hit_counter. And then if it gets over initialization_delay + 1 (if you set initialization delay) it starts counting as a real object. We know that our docs are not very good with regards to this, and we are going to improve them, and make the api much simpler. Sorry for the inconvenience.
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.