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

Change BaseTrack attributes to Object attributes #190

Merged
merged 1 commit into from
Jun 21, 2022

Conversation

dumbPy
Copy link
Contributor

@dumbPy dumbPy commented May 8, 2022

All the attributes are used after object initialisation only, so there is no reason to keep them as Class attributes.
Keeping them as class attributes instead causes #79

This should fix #79 and should not affect any other part.
Have checked that we always call self.next_id() and never call BaseTrack.next_id() i.e., no need for it to be a static method anymore, since all the attributes are now object attributes.

Fixes #79

All the attributes are used after  object initialisation only, so there is no reason to keep them as Class attributes.  
Keeping them as class attributes instead causes ifzhang#79 

This should fix ifzhang#79 and should not affect any other part.  
Have checked that we always call `self.next_id()` and never call `BaseTrack.next_id()` i.e., no need for it to be a static method anymore, since all the attributes are now object attributes.
@HanGuangXin
Copy link
Contributor

Hi, @dumbPy. From the issue #79 you mentioned, it seems this bug has no harm on the performance metrics. Am I right?

@dumbPy
Copy link
Contributor Author

dumbPy commented May 16, 2022

Yes. I am only changing how the attributes are saved.
Since you always call self.next_id() i.e., call the function in the object, it should not affect performance, or break any code.

@ifzhang ifzhang merged commit d9504c1 into ifzhang:main Jun 21, 2022
@feiyang-hku
Copy link

After the changes proposed by @dumbPy, the demo does not run anymore. The Error message is "AttributeError: 'STrack' object has no attribute '_count'"...I have to hard reset the repository to commit b43bae9 to get it to a functional state again.

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.

Deleting known tracks for new videos
4 participants