mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-19 05:40:34 +08:00
SplatterPhongShader Benchmarks
Summary: Benchmarking. We only use num_faces=2 for splatter, because as far as I can see one would never need to use more. Pose optimization and mesh optimization experiments (see next two diffs) showed that Splatter with 2 faces beats Softmax with 50 and 100 faces in terms of accuracy. Results: We're slower at 64px^2. At 128px and 256px, we're slower than Softmax+50faces, but faster than Softmax+100faces. We're also slower at 10 faces/pix, but expectation as well as results show that more then 2 faces shouldn't be necessary. See also more results in .https://fburl.com/gdoc/ttv7u7hp Reviewed By: jcjohnson Differential Revision: D36210575 fbshipit-source-id: c8de28c8a59ce5fe21a47263bd43d2757b15d123
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c5a83f46ef
commit
7c25d34d22
@@ -16,7 +16,7 @@ def bm_blending() -> None:
|
||||
kwargs_list = []
|
||||
num_meshes = [8]
|
||||
image_size = [64, 128, 256]
|
||||
faces_per_pixel = [50, 100]
|
||||
faces_per_pixel = [2, 50, 100]
|
||||
backend = ["pytorch", "custom"]
|
||||
test_cases = product(num_meshes, image_size, faces_per_pixel, devices, backend)
|
||||
|
||||
@@ -47,6 +47,28 @@ def bm_blending() -> None:
|
||||
warmup_iters=1,
|
||||
)
|
||||
|
||||
kwargs_list = []
|
||||
faces_per_pixel = [2, 10]
|
||||
backend = ["pytorch"]
|
||||
test_cases = product(num_meshes, image_size, faces_per_pixel, devices, backend)
|
||||
for case in test_cases:
|
||||
n, s, k, d, b = case
|
||||
kwargs_list.append(
|
||||
{
|
||||
"num_meshes": n,
|
||||
"image_size": s,
|
||||
"faces_per_pixel": k,
|
||||
"device": d,
|
||||
"backend": b,
|
||||
}
|
||||
)
|
||||
benchmark(
|
||||
TestBlending.bm_splatter_blending,
|
||||
"SPLATTER_BLENDING_PYTORCH",
|
||||
kwargs_list,
|
||||
warmup_iters=1,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
bm_blending()
|
||||
|
||||
Reference in New Issue
Block a user