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

Visualization of boxes #19

Open
o0t1ng0o opened this issue Sep 19, 2023 · 1 comment
Open

Visualization of boxes #19

o0t1ng0o opened this issue Sep 19, 2023 · 1 comment

Comments

@o0t1ng0o
Copy link

Hi @volgachen,

I follow this code #10 (comment) to visualize the boxes.
Due to the amplifier=2, I resize the image to (224*2)X(224*2) and plot the boxes, centers and anchors in the image.
In this figure, the red points are anchors, the blue points are centers of boxes, and red rectangles are the boxes.

But I found that some boxes are outside the image.
I am wondering whether this is caused by the '16' in the following two lines in the code?

  1. boxes = (box_coder.boxes[0] * 224 + 16 ) * amplifier
  2. anchors = [(patch_embed.box_coder.anchor * 224 + 16)*amplifier for patch_embed in patch_embeds]

Or do I need to resize image to (256*2)X(256*2) during visualization since it preprocesses images by resizing to 256 and centercropping to 224?

image

Thank you very much.
Looking forward to further discussion with you.

@wxqlab
Copy link

wxqlab commented Oct 27, 2023

Hi @volgachen @ivaopenlab,
I also found this issue.
Can you provide some example codes for visualization?

Thank you in advance.

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