speed
melih-unsal opened this issue · 5 comments
is there any way to speed up the infrence. It seems it processes a single theta,beta,gamma triplet in 5 seconds with gtx 1070. Is it normal or am I doing something wrong?
What does that inference time include? Does it include model loading, data loading or results saving time?
I too had a doubt regarding the inference time, which is clarified by the authors. The reported inference time i.e 1-2 ms in the paper doesn't match. The inference time on a GPU NVIDIA GeForce GTX 2070 just for a forward pass is around ~24ms. (Note: I have excluded the time taken to load the model, data, excluding the interpenetration step, saving etc). The data is already on the GPU before passing to the model. I am attaching a snippet that I used to compute the time, anyone can validate. My batch size=1.
It would be helpful, if authors can add a small clarification on the inference time. As mentioned by one of the author (over email) they have evaluated on a batch size=21 then averaged. However, evaluating 21 samples individually and averaging is not equals to running 21 sample simultaneously (in a vectorized computation) and averaging.
We have now clarified it here: https://github.com/chaitanya100100/TailorNet#inference-time
However, inference time of 5 seconds is indeed way more than it should be. @Melih1996 , let me know what processing is included in that inference time.
Hi, thanks for your fast reply. I discarded the model loading part. Actually the running time of visualize_garment_body function is around 7 seconds. In this function blender is running in the background. Is there any way to visualize it within 30ms without using blender ?
If you don't want to use blender then you can just save obj mesh. See this where we just save the mesh. But I don't see how you can visualize without running a renderer like blender.
The function 'visualize_garment_body' is solely for convenience purpose - rendering high quality image directly from python. It saves the mesh and then invoke blender command with python script to render the image. Saving mesh, invoking blender each time, loading mesh in blender and then rendering a high quality image - all these are expensive operation and they will take good amount of runtime - not possible in 30ms. However, there is one area where you can cut rendering time significantly - here you can set the size of rendered image something low as 512. It will run faster.