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

How to visualize offset vectors? #20

Open
gymoon10 opened this issue Aug 30, 2022 · 1 comment
Open

How to visualize offset vectors? #20

gymoon10 opened this issue Aug 30, 2022 · 1 comment

Comments

@gymoon10
Copy link

As shown in figure 2, I want to visualize predicted offset vectors. But, there are no descriptions about how the offset vectors were visualized. I'm studying these papers and codes carefully, and I would really appreciate your help.

@Tgnink
Copy link

Tgnink commented May 18, 2023

Tthe center has offsets vector too. But luckily, it seems that all objects' centroids have similar offsets. so you can show result like this:

feat0= output[0][0].cpu().numpy()
feat1 = output[0][1].cpu().numpy()
seed=  output[0][-1]
seed=torch.sigmoid(seed).cpu().numpy()

feat0=normalize(feat0,1,99.8)-0.5
feat1=normalize(feat1,1,99.8)-0.5
ang=np.angle(feat0 + (feat1) * 1j,deg=True)


hue=(ang+180)/360
satuation=seed[2]
value=seed[2]
hsv=np.stack([hue,satuation,value],axis=-1)
rgb=hsv_to_rgb(hsv)

the angle or RGB maybe is what you want.

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