-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Moved pfm file reading into dataset utils #6270
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |||||
| from typing import Any, Callable, List, Iterable, Optional, TypeVar, Dict, IO, Tuple, Iterator | ||||||
| from urllib.parse import urlparse | ||||||
|
|
||||||
| import numpy as np | ||||||
| import requests | ||||||
| import torch | ||||||
| from torch.utils.model_zoo import tqdm | ||||||
|
|
@@ -483,3 +484,39 @@ def verify_str_arg( | |||||
| raise ValueError(msg) | ||||||
|
|
||||||
| return value | ||||||
|
|
||||||
|
|
||||||
| def read_pfm(file_name: str, slice_channels: int = 2) -> np.ndarray: | ||||||
| """Read file in .pfm format. Might contain | ||||||
|
||||||
|
|
||||||
| Args: | ||||||
| file_name (str): Path to the file. | ||||||
| slice_channels (int): Number of channels to slice out of the file. | ||||||
| Useful for reading different data formats stored in .pfm files: Optical Flows, Stereo Disparity Maps, etc. | ||||||
|
||||||
| Useful for reading different data formats stored in .pfm files: Optical Flows, Stereo Disparity Maps, etc. | |
| Useful for reading different data formats stored in .pfm files: Optical Flows, Stereo Disparity Maps, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it private, we don't really need to expose it to users