Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not store past detections by default. #207

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

facundo-lezama
Copy link
Collaborator

Until now, the default value for past_detections_length was 4. This meant that even if you don't use the past detections in your workflow, Norfair is still storing them, making unnecessary operations and potentially using a great amount of memory for storing embeddings or image crops.

We now set the default value of past_detections_length to 0. If the user wants to use the TrackedObject's past detections when matching, it must be specified when initiating the Tracker instance.

@javiber
Copy link
Collaborator

javiber commented Oct 18, 2022

Is there an easy way to warn the user if they access past_detections but past_detections_length is set to 0?

@facundo-lezama
Copy link
Collaborator Author

Is there an easy way to warn the user if they access past_detections but past_detections_length is set to 0?

We may change past_detections to become a property and handle the warning when it is accessed. But giving it another thought and knowing that computational performance isn't a big deal when using past_detections_length>0, we may set the default value to 1 instead and avoid confusion to the user. Also, setting the default to 1 isn't going to increase the memory that much.

What are your thoughts @javiber?

@javiber javiber force-pushed the master branch 2 times, most recently from edce0aa to 2886203 Compare January 5, 2023 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants