Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optical Flow Data Missing #7

Open
wyddmw opened this issue Oct 8, 2024 · 5 comments
Open

Optical Flow Data Missing #7

wyddmw opened this issue Oct 8, 2024 · 5 comments

Comments

@wyddmw
Copy link

wyddmw commented Oct 8, 2024

Hi, thanks for releasing this awesome work! I would like to know whether the optical flow data is missed in some scenarios. I unzipped the file and there is no optical flow data in the human_pose/PD_trex_Point_Cache_Final_2_17_2023/* folders.

@basilevh
Copy link
Owner

basilevh commented Oct 8, 2024

Yes, the published dataset does not contain all modalities because the total size would be ~17 TB otherwise, instead of 2.4 TB. I am generating the archive with the additional / missing ones right now and will post the download link when it is ready!

@basilevh
Copy link
Owner

basilevh commented Oct 8, 2024

Please see the update here:
https://gcd.cs.columbia.edu/#datasets
I clarified the description as follows:
The basic modalities are: RGB, depth, semantic segmentation, instance segmentation, and 2D bounding boxes. The additional modalities are: LiDAR point clouds, optical flow, scene flow, and surface normals. Direct download links can be found here:
The link for what you are looking for is under "Full dataset with additional modalities" (should be merged with the original extracted dataset; 3.2 TB archive). Hope this helps!

@wyddmw
Copy link
Author

wyddmw commented Oct 26, 2024

Please see the update here: https://gcd.cs.columbia.edu/#datasets I clarified the description as follows: The basic modalities are: RGB, depth, semantic segmentation, instance segmentation, and 2D bounding boxes. The additional modalities are: LiDAR point clouds, optical flow, scene flow, and surface normals. Direct download links can be found here: The link for what you are looking for is under "Full dataset with additional modalities" (should be merged with the original extracted dataset; 3.2 TB archive). Hope this helps!

Thanks for releasing the additional data! May I ask the format of optical flow or how am I supposed to load a .png optical flow.

@basilevh
Copy link
Owner

basilevh commented Nov 11, 2024

As far as I know from playing around with it myself, when you load an optical flow PNG frame as RGBA, the channels have the following meaning:

        # frame = (H, W, 4) array of float32 in [0, 1].
        dx = frame[..., 0] + frame[..., 1] * 256.0 - 128.0  # (H, W) array of float32 in [-128, 128].
        dy = frame[..., 2] + frame[..., 3] * 256.0 - 128.0  # (H, W) array of float32 in [-128, 128].
        angle = np.arctan2(dy, dx)  # (H, W) array of float32 in [-pi, pi].
        mag = np.sqrt(dx ** 2 + dy ** 2)  # (H, W) array of float32 in [0, 256].

The first two channels encode horizontal motion and the last two channels encode vertical motion. Unfortunately I do not know what the unit (i.e. normalization factor) is supposed to be, but please feel free to let us know here if anyone figures it out. Hope this helps!

@wyddmw
Copy link
Author

wyddmw commented Nov 16, 2024

As far as I know from playing around with it myself, when you load an optical flow PNG frame as RGBA, the channels have the following meaning:

        # frame = (H, W, 4) array of float32 in [0, 1].
        dx = frame[..., 0] + frame[..., 1] * 256.0 - 128.0  # (H, W) array of float32 in [-128, 128].
        dy = frame[..., 2] + frame[..., 3] * 256.0 - 128.0  # (H, W) array of float32 in [-128, 128].
        angle = np.arctan2(dy, dx)  # (H, W) array of float32 in [-pi, pi].
        mag = np.sqrt(dx ** 2 + dy ** 2)  # (H, W) array of float32 in [0, 256].

The first two channels encode horizontal motion and the last two channels encode vertical motion. Unfortunately I do not know what the unit (i.e. normalization factor) is supposed to be, but please feel free to let us know here if anyone figures it out. Hope this helps!

Thanks for your reply! I will give it a try following your instruction and see if I can figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants