forked from DLR-RM/BlenderProc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yaml
104 lines (104 loc) · 2.52 KB
/
config.yaml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Args: <obj_file> <output_dir>
{
"version": 3,
"setup": {
"blender_install_path": "/home_local/<env:USER>/blender/",
"pip": [
"h5py",
"pypng==0.0.20",
]
},
"modules": [
{
"module": "main.Initializer",
"config":{
"global": {
"output_dir": "<args:1>"
}
}
},
{
"module": "loader.ObjectLoader",
"config": {
"path": "<args:0>",
"add_properties": {
"cp_category_id": "1"
},
},
},
{
"module": "manipulators.EntityManipulator",
"config": {
"selector": {
"provider": "getter.Entity",
"conditions": {
"type": "MESH" # this guarantees that the object is a mesh, and not for example a camera
}
},
"matrix_world":
[[0.331458, -0.9415833, 0.05963787, -0.04474526765165741],
[-0.6064861, -0.2610635, -0.7510136, 0.08970402424862098],
[0.7227108, 0.2127592, -0.6575879, 0.6823395750305427],
[0, 0, 0, 1.0]],
"scale": [0.001, 0.001, 0.001] # Scale 3D model from mm to m
},
},
{
"module": "lighting.LightLoader",
"config": {
"lights": [
{
"type": "POINT",
"location": [5, -5, 5],
"energy": 1000
}
]
}
},
{
"module": "camera.CameraLoader",
"config": {
"local_frame_change": ["X", "-Y", "-Z"], #OpenCV to Blender coordinates
"cam_poses": [
"cam2world_matrix": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
],
"intrinsics": {
"cam_K": [537.4799, 0.0, 318.8965, 0.0, 536.1447, 238.3781, 0.0, 0.0, 1.0],
"resolution_x": 640,
"resolution_y": 480
}
}
},
{
"module": "manipulators.MaterialManipulator",
"config": {
"selector": {
"provider": "getter.Material",
"conditions": {
"name": "ply_material"
}
},
"cf_change_to_vertex_color": "Col"
}
},
{
"module": "renderer.RgbRenderer",
"config": {
"samples": 100,
"render_distance": True,
}
},
{
"module": "writer.BopWriter",
"config": {
"m2mm": True, # original bop annotations in mm (default)
"append_to_existing_output": True,
"postprocessing_modules": {
"distance": [
{"module": "postprocessing.Dist2Depth"}
]
}
}
},
]
}