hmr2.0
hmr2.0 copied to clipboard
Why does my results different from you?
Hello,your project really interested me,and thank you for you work.But I have a question that I have successfully executed the demo.py,but I just got different result about the picture of 3D Mesh Overlay.
Look ,the background of third picture is black,but your picture is not the same as mine,why?
Hello,your project really interested me,and thank you for you work.But I have a question that I have successfully executed the demo.py,but I just got different result about the picture of 3D Mesh Overlay.
Look ,the background of third picture is black,but your picture is not the same as mine,why?
I've met the same question. You may try this at trimesh_renderer.py
# alpha_mesh = image[:, :, 3] / 255.0
binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
alpha_mesh = binary_image[:, :] / 255.0
alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8)
It will distinguish the mesh from the original image, so it will be correct when composing them together.
Hello,your project really interested me,and thank you for you work.But I have a question that I have successfully executed the demo.py,but I just got different result about the picture of 3D Mesh Overlay.
Look ,the background of third picture is black,but your picture is not the same as mine,why?
I've met the same question. You may try this at trimesh_renderer.py
# alpha_mesh = image[:, :, 3] / 255.0 binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) alpha_mesh = binary_image[:, :] / 255.0 alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8)
It will distinguish the mesh from the original image, so it will be correct when composing them together.
Hi,is this correct according to your method?In function def call()?
Hello,your project really interested me,and thank you for you work.But I have a question that I have successfully executed the demo.py,but I just got different result about the picture of 3D Mesh Overlay.
Look ,the background of third picture is black,but your picture is not the same as mine,why?
I've met the same question. You may try this at trimesh_renderer.py
# alpha_mesh = image[:, :, 3] / 255.0 binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) alpha_mesh = binary_image[:, :] / 255.0 alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8)
It will distinguish the mesh from the original image, so it will be correct when composing them together.
Hi,is this correct according to your method?In function def call()?
Nope, it should be written like this:
if img is not None:
img = cv2.cvtColor(img, cv2.COLOR_RGB2RGBA)
x1, x2 = 0, img.shape[1]
y1, y2 = 0, img.shape[0]
# alpha_mesh = image[:, :, 3] / 255.0
binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
alpha_mesh = binary_image[:, :] / 255.0
alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8)
alpha_image = 1.0 - alpha_mesh
Hello,your project really interested me,and thank you for you work.But I have a question that I have successfully executed the demo.py,but I just got different result about the picture of 3D Mesh Overlay.
Look ,the background of third picture is black,but your picture is not the same as mine,why?
I've met the same question. You may try this at trimesh_renderer.py
# alpha_mesh = image[:, :, 3] / 255.0 binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) alpha_mesh = binary_image[:, :] / 255.0 alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8)
It will distinguish the mesh from the original image, so it will be correct when composing them together.
Hi,is this correct according to your method?In function def call()?
Nope, it should be written like this:
if img is not None: img = cv2.cvtColor(img, cv2.COLOR_RGB2RGBA) x1, x2 = 0, img.shape[1] y1, y2 = 0, img.shape[0] # alpha_mesh = image[:, :, 3] / 255.0 binary_image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY) alpha_mesh = binary_image[:, :] / 255.0 alpha_mesh = (np.array(alpha_mesh) != 0).astype(np.uint8) alpha_image = 1.0 - alpha_mesh
Yes, you are right, thank you very much, I have got correct picture, thanks again!
how you guys can run this code ? I have error when I run demo.py code
how you guys can run this code ? I have error when I run demo.py code
ME TOO
how you guys can run this code ? I have error when I run demo.py code
ME TOO
I have run the demo successfully in this experiment, and I share approach in CSDN, maybe you can visit https://blog.csdn.net/qq_45257495/article/details/125944038
how you guys can run this code ? I have error when I run demo.py code
I have run the demo in this experiment, and I share approach in CSDN, maybe you can visit https://blog.csdn.net/qq_45257495/article/details/125944038