GithubHelp home page GithubHelp logo

About LRA calculation about riconv2 HOT 6 CLOSED

granadet17 avatar granadet17 commented on June 22, 2024
About LRA calculation

from riconv2.

Comments (6)

cszyzhang avatar cszyzhang commented on June 22, 2024
  1. LRA is much more robust than the LRF of SHOT. Please check Fig. 8 of our IJCV paper which clearly shows this.
  2. Sign ambiguity cannot be removed in many cases especially when the local shape is like a disk or lacking sufficient geometric features. Moreover, the noise can further deteriorate this. Thus, we proposed LRA which has no sign ambiguity problem.

from riconv2.

granadet17 avatar granadet17 commented on June 22, 2024

Thanks for the reply.
I understand now.

I would like to ask one more question about implementation.

def order_index(xyz, new_xyz, new_norm, idx):
B, S, C = new_xyz.shape
nsample = idx.shape[2]
grouped_xyz = index_points(xyz, idx)
grouped_xyz_local = grouped_xyz - new_xyz.view(B, S, 1, C) # centered
# project and order
dist_plane = torch.matmul(grouped_xyz_local, new_norm)
proj_xyz = grouped_xyz_local - dist_plane*new_norm.view(B, S, 1, C)
proj_xyz_length = torch.norm(proj_xyz, dim=-1, keepdim=True)
projected_xyz_unit = proj_xyz / proj_xyz_length
projected_xyz_unit[projected_xyz_unit != projected_xyz_unit] = 0 # set nan to zero
length_max_idx = torch.argmax(proj_xyz_length, dim=2)
vec_ref = projected_xyz_unit.gather(2, length_max_idx.unsqueeze(-1).repeat(1,1,1,3)) # corresponds to the largest length
dots = torch.matmul(projected_xyz_unit, vec_ref.view(B, S, C, 1))
sign = torch.cross(projected_xyz_unit, vec_ref.view(B, S, 1, C).repeat(1, 1, nsample, 1))
sign = torch.matmul(sign, new_norm)
sign = torch.sign(sign)
sign[:, :, 0, 0] = 1. # the first is the vec_ref itself, should be 1.
dots = sign*dots - (1-sign)
dots_sorted, indices = torch.sort(dots, dim=2, descending=True)
idx_ordered = idx.gather(2, indices.squeeze_(-1))
return dots_sorted, idx_ordered

In this function, you wrote

sign[:, :, 0, 0] = 1. # the first is the vec_ref itself, should be 1.

but, I think the first is not the vec_ref.

from riconv2.

cszyzhang avatar cszyzhang commented on June 22, 2024

Thanks for reporting that line of comment. Yes. the first is not the vec_ref. The vec_ref is the one with largest distance from the center point, while the first one is the center point by itself whose vec is always [0,0,0]. So, we force its sign to 1 to avoid two identical dots after sign operation (Line 237). Otherwise, the 1st dot value and the ref dot value will become identical. I have updated that line of comment. Hope this clarifies.

from riconv2.

granadet17 avatar granadet17 commented on June 22, 2024

Thank you.
Shouldn't you set the sign of vec_ref manually since the cross product of vec_ref and vec_ref is also [0, 0, 0].

from riconv2.

cszyzhang avatar cszyzhang commented on June 22, 2024

So, set one of them to differentiate it from the other.

from riconv2.

granadet17 avatar granadet17 commented on June 22, 2024

I'm sorry, I misunderstood.

Thank you.

from riconv2.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.