You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
unzip=True) # unzip files autonomously after download
76
93
77
94
Customization Example
78
95
-------------------------------------
@@ -295,11 +312,36 @@ The tool supports sampling dense correspondence between any combination of pinho
295
312
296
313
Given a pair of RGB and depth image cubes and two direction, the tool will compute dense correspondense represented as optical flow and a occlusion mask signaling is the pixel directly observable.
297
314
298
-
Please refer to flow_sampling_example.py for a complete example.
315
+
.. code-block:: python
316
+
317
+
import tartanair as ta
318
+
319
+
# For help with rotations.
320
+
from scipy.spatial.transform import Rotation
321
+
322
+
# Initialize TartanAir.
323
+
tartanair_data_root ='your/path/to_tav2'
324
+
ta.init(tartanair_data_root)
325
+
326
+
# Customize the dataset.
327
+
ta.customize_flow(env='ArchVizTinyHouseDay',
328
+
difficulty='easy',
329
+
trajectory_id= ['P000'],
330
+
cam_sides=["left", "right"],
331
+
num_workers=4,
332
+
frame_sep=1,
333
+
device="cuda") # or cpu
334
+
335
+
Please refer to flow_resampling_example.py for a complete example.
Copy file name to clipboardExpand all lines: docs/modalities.rst
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,18 @@ The fisheye and Panorama data are sampled from the raw pinhole data, thus contai
69
69
Optical flow
70
70
--------------
71
71
72
+
Due to the high serving demand of the dataset, we are moving away from pre-computing the flow labels for download, as they can simply be generated from pose, intrinsics, and depth locally. Please refer to examples/flow_resampling_example.py for the code to generate optical flow from the raw data.
73
+
74
+
Also, we are changing the storage format due to increased precision of flow models. For a pair of images, the generated flow information is stored as a npz file containing the following fields:
75
+
76
+
- flow_fwd/bwd: x,y coordinate of the flow in float32 format
77
+
- fov_mask_fwd/bwd: boolean mask indicating if the pixel have a valid projection in the forward/backward image, i.e., is it out of the image space
78
+
- covisible_mask_fwd/bwd: boolean mask indicating if the pixel is covisible in the forward/backward image, i.e., is it occluded by other objects in the scene
79
+
80
+
81
+
Old Optical flow format
82
+
-----------------------
83
+
72
84
Same as TartanAir V1, the optical flow is calculated for the static environments by image warping, using the camera pose and depth images. The biggest upgrades are that we accelerate the code by a Cuda implementation and provide tools for generating optical flow across any type of camera model (e.g. between pinhole and fisheye). For the convenience of the downloading, we compress the optical flow to use 8-bit representation. The decoding code is as follows.
0 commit comments