Closed mate-huaboy closed 2 years ago
We implement the function you mentioned with pytorch3d. Rendering 24 images at a time could be time-consuming with the current pytorch3d implementation. But our training only needs to render one image per GPU and thus our training is more efficient. Your issue seems to be less relevant to our project. I suggest you raise this issue in the pytorch3d's forum. I may close this issue temporarily
We implement the function you mentioned with pytorch3d. Rendering 24 images at a time could be time-consuming with the current pytorch3d implementation. But our training only needs to render one image per GPU and thus our training is more efficient. Your issue seems to be less relevant to our project. I suggest you raise this issue in the pytorch3d's forum. I may close this issue temporarily
thank you for your reply,i have already solved this problem.
hey,I use your code to render for estimating pose,but I find it too slow to train,my code is followed: ` from pytorch3d.io import IO import torch import torch.nn as nn import sys import os.path as osp cur_dir=osp.abspath(osp.dirname(file)) sys.path.insert(0,cur_dir) from ColorShader import ColorShader from pytorch3d.renderer import ( PerspectiveCameras, RasterizationSettings, MeshRenderer, MeshRasterizer, BlendParams, )
import datetime
class DiffRender(nn.Module): def init(self, mesh_path, render_texture=False, render_image_size=(64,64)): super().init()
class DiffRenderer_Normal_Wrapper(nn.Module): def init(self, obj_paths, device="cuda", render_texture=False): super().init()
In my program, I called the DiffRenderer_Normal_Wrapper class externally, selected 24 of the 13 classes (repeatable) at a time and estimated their corresponding rotations, then rendered the 24 images using the DiffRenderer_Normal_Wrapper class. However, I found that this process was very slow, which took about a second, and this process became the bottleneck of the training process. However, I found that if two adjacent frames of images belong to the same model, the training process would be faster. It seems that the principle of locality can be used to speed up the training process, but I am not sure how to do it. Can anyone give me some advice to speed up the rendering process? Thank you very much!