enviably9625 commited on
Commit
2116cd1
·
verified ·
1 Parent(s): acdc230

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -0
README.md CHANGED
@@ -1,3 +1,144 @@
1
  ---
2
  license: cc-by-4.0
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc-by-4.0
3
+ size_categories:
4
+ - 100K<n<1M
5
  ---
6
+
7
+ # 3D Reconstruction Asset Insepction Benchmark
8
+
9
+ This is the official dataset repository for: A 3D Reconstruction Benchmark for Asset Inspection (coming soon).
10
+
11
+ The directory structure of each scene follows this pattern:
12
+ ```
13
+ ├── scene
14
+    ├── cam_params
15
+    │   ├── traj=proxy_surface_X.tar
16
+     │   ├── traj=proxy_surface_Y.tar
17
+    │   ├── traj=proxy_surface_Z.tar
18
+    │   └── traj=trendspek.tar
19
+    ├── depths
20
+    │   ├── traj=proxy_surface_X.tar
21
+     │   ├── traj=proxy_surface_Y.tar
22
+    │   ├── traj=proxy_surface_Z.tar
23
+    │   └── traj=trendspek.tar
24
+    ├── masks
25
+    │   ├── traj=proxy_surface_X.tar
26
+     │   ├── traj=proxy_surface_Y.tar
27
+    │   ├── traj=proxy_surface_Z.tar
28
+    │   └── traj=trendspek.tar
29
+    ├── night
30
+    │   ├── soil=verylow,traj=proxy_surface_X.tar
31
+    │   ├── soil=verylow,traj=proxy_surface_Y.tar
32
+    │   ├── soil=verylow,traj=proxy_surface_Z.tar
33
+    │   └── soil=verylow,traj=trendspek.tar
34
+    ├── overcast
35
+    │   ├── soil=verylow,traj=proxy_surface_X.tar
36
+    │   ├── soil=verylow,traj=proxy_surface_Y.tar
37
+    │   ├── soil=verylow,traj=proxy_surface_Z.tar
38
+    │   └── soil=verylow,traj=trendspek.tar
39
+    ├── scene_accuracy.glb
40
+    ├── scene.blend
41
+    ├── scene_completeness.glb
42
+    ├── sunny
43
+    │   ├── soil=verylow,traj=proxy_surface_X.tar
44
+    │   ├── soil=verylow,traj=proxy_surface_Y.tar
45
+    │   ├── soil=verylow,traj=proxy_surface_Z.tar
46
+    │   └── soil=verylow,traj=trendspek.tar
47
+    └── sunrise
48
+       ├── soil=verylow,traj=proxy_surface_X.tar
49
+       ├── soil=verylow,traj=proxy_surface_Y.tar
50
+       ├── soil=verylow,traj=proxy_surface_Z.tar
51
+       └── soil=verylow,traj=trendspek.tar
52
+ ```
53
+ Each lighting condition, night, overcast, sunny and sunrise contains .tar files containing each sequence of images. These lighting conditions correspond to dusk, cloudy, midday and sunrise respectively in the paper. The soiling and reflectivity settings are specified by the directory name.
54
+
55
+ The camera trajectories are also specified by the directory name. The trendspek trajectory refers to the manual capture trajectory in the paper as it was a manually animated trajectory that followed the trendspek capture guidelines.
56
+
57
+ ## Evaluation Pipeline
58
+
59
+ A working evaluation pipeline is available at: [https://github.com/RoboticImaging/inspection_dataset_tools](https://github.com/RoboticImaging/inspection_dataset_tools).
60
+
61
+ ## Depth Maps
62
+
63
+ `depths` contains the depth maps. These are .exr files which store the metric depth. Each pixel has a three values each of which is the depth. To open a .exr file, one can use the [OpenEXR](https://openexr.com/en/latest/) python library or the image viewer [tev](https://github.com/Tom94/tev). A function for opening .exr files using OpenEXR in python is included below :
64
+
65
+ ``` python
66
+ import OpenEXR
67
+ def open_exr(f_name: str):
68
+ with OpenEXR.File(f_name) as infile:
69
+ header = infile.header()
70
+ channels = infile.channels()
71
+ keys = list(channels.keys())
72
+ if keys == ["RGB"]:
73
+ img = channels["RGB"].pixels
74
+ if keys == ["RGBA"]:
75
+ img = channels["RGBA"].pixels
76
+ elif keys == ["X", "Y", "Z"]:
77
+ X = channels["X"].pixels
78
+ Y = channels["Y"].pixels
79
+ Z = channels["Z"].pixels
80
+ height, width = Z.shape
81
+ img = np.empty((height, width, 3))
82
+ img[..., 0] = X
83
+ img[..., 1] = Y
84
+ img[..., 2] = Z
85
+ return img, header
86
+ ```
87
+
88
+ Each pixel of the depth map contains the metric depth in each of the three channels. Therefore, if we return to the previous code and `img[..., 0]` will get the depth for each pixel in the image.
89
+
90
+ ## Camera Intrinsics and Extrinsics
91
+
92
+ Camera intrinsics and extrinsics for each frame are included in `cam_parameters`. Each frame number has an individual .json file which is formatted as follows:
93
+
94
+ ``` json
95
+ {
96
+ "name": "Camera",
97
+ "loc": [
98
+ world_x_position,
99
+ world_y_position,
100
+ world_z_position
101
+ ],
102
+ "rot": [
103
+ w,
104
+ x,
105
+ y,
106
+ z
107
+ ],
108
+ "focal_length": f_mm,
109
+ "sensor_width": sensor_width_mm,
110
+ "clip_end": max_dist_m,
111
+ "clip_start": min_dist_m
112
+ }
113
+ ```
114
+
115
+ The `loc` field refers to the position of the camera in the blender world coordinate frame. The `rot` field refers to the rotation quaternion in the blender world coordinate frame (in scalar first format (w, x, y, z)). `focal_length` refers to the focal length of the camera in millimetres. `sensor_width` refers to the width of the camera sensor in mm. `clip_start` and `clip_end` are the minimum and maximum distance settings that blender renders.
116
+
117
+ To convert these coordinates into the familiar COLMAP coordinate system, one can use the following lines of code:
118
+
119
+ ``` python
120
+ from scipy.spatial.transform import Rotation
121
+ colmap_rot = [rot[1], rot[0],
122
+ rot[3], -rot[2]]
123
+ colmap_transform = Rotation.from_quat(colmap_rot, scalar_first=True)
124
+ T_vec = -colmap_transform.apply(loc)
125
+ ```
126
+
127
+ ## Mesh model
128
+
129
+ For each scene, we exported a mesh model. To produce a ground truth point cloud, we sampled the mesh using [Open3D](https://www.open3d.org/). To replicate this, one can use:
130
+
131
+ ```python
132
+ import open3d as o3d
133
+ mesh = o3d.io.read_triangle_mesh(glb_file_path)
134
+ pointcloud_sampled = mesh.sample_points_uniformly(
135
+ number_of_points=1000000)
136
+ ```
137
+
138
+ ## Blender Scenes
139
+
140
+ These blender scenes were constructed in Blender 5.0.1 from assets from BlenderKit. To render the office building with different soiling settings, use the render_office.py script which can be done using Blender's in built scripting capability or with the following shell command:
141
+
142
+ ```bash
143
+ blender -b scene.blend --python render_pipeline.py
144
+ ```