Skip to content

Simple Question about object detection code #11

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

Open
AlexCo1d opened this issue Jan 5, 2025 · 1 comment
Open

Simple Question about object detection code #11

AlexCo1d opened this issue Jan 5, 2025 · 1 comment

Comments

@AlexCo1d
Copy link

AlexCo1d commented Jan 5, 2025

def forward(self, video_o):
bsize, numc, numf, numr, fdim = video_o.shape
video_o = video_o.view(bsize, numc*numf, numr, fdim)
roi_feat = video_o[:,:,:, :self.dim_feat]
roi_bbox = video_o[:,:,:, self.dim_feat:(self.dim_feat+self.dim_bbox)]
bbox_pos = self.bbox_conv(roi_bbox.permute(
0, 3, 1, 2)).permute(0, 2, 3, 1)
bbox_features = torch.cat([roi_feat, bbox_pos], dim=-1)
bbox_feat = self.tohid(bbox_features)
return bbox_feat

Hi, I am reading your code about object detection. I found the above one in your EncoderVid.py
Do you still remember why you choose 5 dimension (dim_bbox) for positional embedding? What is the source of this way? (Faster RCNN or Detectron)

Thank you for your prompt response! Thanks for your great work!

@doc-doc
Copy link
Owner

doc-doc commented Feb 23, 2025

Hi, the fifth dimension denotes the relative bbox size: bbox_size/image_size(w*h), it is basically based on my previous relation grounding work :https://github.com/doc-doc/vRGV.

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