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

View Selection Strategy not applied in published code? #118

Open
supersyz opened this issue Feb 28, 2025 · 3 comments
Open

View Selection Strategy not applied in published code? #118

supersyz opened this issue Feb 28, 2025 · 3 comments

Comments

@supersyz
Copy link

Thanks for you great work!
I notice that in the paper 8~12 view-points are heuristically selected for inference.
However, in the code, it seems to have only 6 fixed view-points:

self.candidate_camera_azims = [0, 90, 180, 270, 0, 180]
self.candidate_camera_elevs = [0, 0, 0, 0, 90, -90]
# AND 
selected_camera_elevs, selected_camera_azims, selected_view_weights = \
self.config.candidate_camera_elevs, self.config.candidate_camera_azims, self.config.candidate_view_weights

Is this the publised code a simplified version compared with the paper? Or do I misunderstand it?
Hope for your replay,
Best.

@rocksat
Copy link

rocksat commented Mar 6, 2025

same question here. I don't see this function in published code:

A area(· · · ) is a function that calculates the coverage area according to the given set of covering texels.

@qinyuxin010328
Copy link

Same question here, could not find the selection part

@qinyuxin010328
Copy link

Is it the code in/Hunyuan3D-2/hy3dgen/texgen/differentiable_renderer/mesh_render.py the selection part? It seems like it is enlarging the texture map untill the selection area is above 99% of the total area.
@torch.no_grad()
def fast_bake_texture(self, textures, cos_maps):

    channel = textures[0].shape[-1]
    texture_merge = torch.zeros(
        self.texture_size + (channel,)).to(self.device)
    trust_map_merge = torch.zeros(self.texture_size + (1,)).to(self.device)
    for texture, cos_map in zip(textures, cos_maps):
        view_sum = (cos_map > 0).sum()
        painted_sum = ((cos_map > 0) * (trust_map_merge > 0)).sum()
        if painted_sum / view_sum > 0.99:
            continue
        texture_merge += texture * cos_map
        trust_map_merge += cos_map
    texture_merge = texture_merge / torch.clamp(trust_map_merge, min=1E-8)

    return texture_merge, trust_map_merge > 1E-8`

`

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

3 participants