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

Sample occluded points during training #79

Open
Anderstask1 opened this issue Apr 24, 2024 · 3 comments
Open

Sample occluded points during training #79

Anderstask1 opened this issue Apr 24, 2024 · 3 comments

Comments

@Anderstask1
Copy link

Hi,

Do I need to exclude points not visible at any time in the window during training? I have data including points that is occluded for a number of frames bigger than the window. I have the impression that exclusion of these points lead to worse performance since the information in joint tracking is reduced, but inclusion of these points reduce the ability to predict occlusion/visibility. Do you have any recommendations here?

Thanks!

@nikitakaraevv
Copy link
Contributor

Hi @Anderstask1, I think excluding completely invisible points is a good idea, because they don't contribute to training anyway (unless you have at least one frame where the point is visible, then that's the frame where you query the point).

The fact that points are occluded for more than one window is ok, we also have such points in the training set. The model can propagate predictions through multiple windows and keep tracking points even when they stay invisible for more than one window. By the way, what data are you training on?

@Anderstask1
Copy link
Author

Hi again, and thanks for the quick reply. When I try to train CoTracker with points that are occluded for the entire window, I end up with the following error. Do I need to explicitly remove these points to avoid a crash?

'File "/CoTracker/code/train.py", line 483, in run
output = forward_batch(
File "/CoTracker/code/train.py", line 75, in forward_batch
[
File "/CoTracker/code/train.py", line 76, in
nonzero_row[torch.randint(len(nonzero_row), size=(1,))]
RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=0'

@nikitakaraevv
Copy link
Contributor

Hi @Anderstask1, yes, you either need to remove these points or modify the logic of queried points' sampling to completely ignore the invisible tracks.

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

No branches or pull requests

2 participants