trackformer
trackformer copied to clipboard
What does valid ratio mean?
Hello,
In the Deformable Transformer, there is a variable called valid_ratios which is used based on the masks. valid_ratios = torch.stack([self.get_valid_ratio(m) for m in masks], 1). If the masks are None in my case how am I supposed to calculate it?
Also, what is the purpose of valid_ratios? I could not find anything in the Trackformer and Original Deformable Detr paper.
I would appreciate it if you could clarify this.
These masks specify where padding was added to the image and are used to ignore those regions during the attention computation. If you do not have padding just initialize masks with zeros/False. See here for where the masks are generated.