How to get training set using opendr?
Opened this issue · 2 comments
ChiyuanFeng commented
Hello Silvia,
I was trying to generate the training set of another kind of animal, but I failed to use opendr to create the training set. I can't find much tutorial about opendr. Could you kindly share you code of generating the training set?
Yours sincerely,
Will
silviazuffi commented
Hi,
Below is the opendr code.
Best,
Silvia
def setup_camera(h, w, flength=2000, rt=np.zeros(3), t=np.zeros(3), k=np.zeros(5)):
from opendr.camera import ProjectPoints
center = np.array([w / 2, h / 2])
f = np.array([flength, flength])
cam = ProjectPoints(
f=f, rt=rt, t=t, k=k, c=center)
return cam
cam = setup_camera(img.shape[0], img.shape[1], flength=flength)
cam.v = model
frustum = {'near': ch.min(model, axis=0)[2],
'far': ch.max(model, axis=0)[2],
'width': img.shape[1],
'height': img.shape[0]}
trend = TexturedRenderer(
vc=np.ones_like(model.r),
v=model,
f=model.f,
camera=cam,
frustum=frustum,
texture_image=texture_image,
vt=mesh.vt, ft=mesh.ft,
bgcolor=ch.array([0, 0.5, 0]))
… On 23. Feb 2021, at 11:11, ChiyuanFeng ***@***.***> wrote:
Hello Silvia,
I was trying to generate the training set of another kind of animal, but I failed to use opendr to create the training set. I can't find much tutorial about opendr. Could you kindly share you code of generating the training set?
Yours sincerely,
Will
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#18>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABNYVFNWWZ5PHZ7OOOMBA43TAN5NFANCNFSM4YCGDVHQ>.
ChiyuanFeng commented
Awesome! Thank you for your immediate reply.
Best,
Will