forked from GingerButter/TDW_Environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_gpu.py
26 lines (24 loc) · 1.18 KB
/
test_gpu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from tdw.backend.performance_benchmark_controller import PerformanceBenchmarkController
import tqdm
"""
Image capture benchmarks.
"""
print("start")
output = "| 100 objects | Pass masks | Render quality | Post-processing | Screen size | .png | FPS |" \
"\n| --- | --- | --- | --- | --- | --- | --- |\n"
c = PerformanceBenchmarkController(launch_build=False)
i = 0
for boxes, pass_masks, render_quality, post_processing, screen_size, png in zip(
[False, True, False, False, True, False, True, True],
[["_img"], ["_id"], ["_img"], ["_img"], ["_id"], ["_img"], ["_img", "_id"], ["_img", "_id"]],
[0, 0, 5, 5, 0, 5, 5, 5],
[False, False, True, True, False, True, True, True],
[256, 256, 256, 1024, 1024, 1024, 1024, 1024],
[False, False, False, False, False, True, False, True]):
print(i)
i += 1
fps = c.run(boxes=boxes, images=True, pass_masks=pass_masks, render_quality=render_quality,
post_processing=post_processing, screen_size=screen_size, png=png, num_frames=2000)
output += f"| {boxes} | `{pass_masks}` | {render_quality} | {post_processing} | {screen_size} | {png} | {fps} |\n"
c.communicate({"$type": "terminate"})
print(output)