Code Monkey home page Code Monkey logo

Comments (6)

bananaman1983 avatar bananaman1983 commented on September 28, 2024 1

it's a clipping problem after the training. simple clamping like the code below may circumvent the problem where values spike above 1.0f

def optim_clr(case, img_path, mesh_dir, save_dir, device):
    ...             
    np_colors= to_numpy(color_model.colors)         
    np.clip(np_colors, 0.0, 1.0, out=np_colors) #clamp    
    tensor_colors = torch.tensor(np_colors ,dtype=torch.float32,device=device)
    
    save_obj(vert, face, f'{save_dir}/refine_{case}.obj', tensor_colors.detach())  
    ...

from era3d.

bananaman1983 avatar bananaman1983 commented on September 28, 2024 1

dunno TBH. would like to take a look into it though. I've been noticing it too. it's weird. with normals flipped in the wrong axes and stuff

from era3d.

miaowu99 avatar miaowu99 commented on September 28, 2024 1

@bananaman1983 Excellent! you also solved the issue of noise in the colors of my exported mesh.
by:

  texture_color = torch.clamp(color_model.colors.detach(), min=0, max=1)
  save_obj(vert, face, f'{save_dir}/refine_{case}.obj', texture_color)

from era3d.

altava-sgp avatar altava-sgp commented on September 28, 2024

Usually blender can't get vertex color from obj file. ( In my case blender 3.6.2 )
You can export as ply with vertex color from original obj file by tool like MeshLab.
There is also issue about this. #14 (comment)

from era3d.

altava-sgp avatar altava-sgp commented on September 28, 2024

@bananaman1983 Could you guess about this issue too ? #26

from era3d.

altava-sgp avatar altava-sgp commented on September 28, 2024

@bananaman1983 @miaowu99 Great Job !
You solved this issue ! #4 👍

before

image

after

image

@pengHTYX You can check it too !

from era3d.

Related Issues (20)

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.