|
facebook360_dep
Facebook360 Depth Estimation Pipeline
|
Classes | |
| class | Address |
| class | LAN |
| class | NetcatClient |
Functions | |
| def | get_os_type (ip) |
| def | get_frame_name (frame) |
| def | get_frame_range (first, last) |
| def | get_frame_fns (msg, frames, uncompressed=False, src=None) |
| def | download_rig (msg) |
| def | get_cameras (msg, dst_field="cameras") |
| def | download_image_type (msg, image_type, frames, level=None) |
| def | download_image_types (msg, image_type_to_level, frames=None) |
| def | tar_frame (src, frame, tar_h) |
| def | tar_frames (src, frames) |
| def | upload_image_type (msg, image_type, frames=None, level=None) |
| def | copy_image_level (msg, src_image_type, dst_image_type, cameras, frames, src_level=None, dst_level=None, uncompressed=False) |
| def | local_rig_path (msg) |
| def | local_image_type_path (msg, image_type, level=None) |
| def | remote_image_type_path (msg, image_type, level=None) |
| def | download (src, dst, filters=None, run_silently=False) |
| def | upload (src, dst, filters=None, run_silently=False) |
| def | copy_frame (src, dst, frame, cameras, run_silently=False, uncompressed=False) |
| def | listdir (src, run_silently=False, recursive=True) |
| def | get_sample_file (src, run_silently=False) |
Variables | |
| dir_scripts = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| dir_root = os.path.dirname(dir_scripts) | |
| def scripts.render.network.copy_frame | ( | src, | |
| dst, | |||
| frame, | |||
| cameras, | |||
run_silently = False, |
|||
uncompressed = False |
|||
| ) |
Copies a single frame to a new directory. A standard cp operation is
performed for local paths.
Args:
src (str): Path to the source directory.
dst (str): Path to the destination directory.
frames (list[str]): Frame names being copied.
run_silently (bool, optional): Whether or not to display results to stdout.
uncompressed (bool, optional): Whether or not the src should be uncompressed before
copying to the destination. Only relevant for archived intermediates.
| def scripts.render.network.copy_image_level | ( | msg, | |
| src_image_type, | |||
| dst_image_type, | |||
| cameras, | |||
| frames, | |||
src_level = None, |
|||
dst_level = None, |
|||
uncompressed = False |
|||
| ) |
Copies frames and cameras of an image type to a new type.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
src_image_type (str): Image type of the source.
dst_image_type (str): Image type of the destination.
cameras (list[str]): List of cameras to be copied.
frames (list[str]): List of frame names to be copied.
src_level (int, optional): Image level of the source. If None is passed in, the
location of the full-size images is used.
dst_level (int, optional): Image level of the destination. If None is passed in, the
location of the full-size images is used.
uncompressed (bool, optional): Whether or not the src should be uncompresseded before
copying to the destination. Only relevant for archived intermediates.
| def scripts.render.network.download | ( | src, | |
| dst, | |||
filters = None, |
|||
run_silently = False |
|||
| ) |
Recursively downloads the objects from source that adhere to the filters. No
operation is performed for local paths.
Args:
src (str): Path to the source directory.
dst (str): Path to the destination directory where downloaded files will be saved.
filters (list[str], optional): List of filters to choose files to download.
run_silently (bool, optional): Whether or not to display results to stdout.
Returns:
bool: Success of download.
| def scripts.render.network.download_image_type | ( | msg, | |
| image_type, | |||
| frames, | |||
level = None |
|||
| ) |
Downloads frames of an image type to the appropriate local path.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
image_type (str): Name of an image type (re: source/util/ImageTypes.h).
frames (list[str]): List of frame names to download.
level (None, optional): Level to download. If None is passed in, the full-size
image is downloaded.
Returns:
bool: Success of download.
| def scripts.render.network.download_image_types | ( | msg, | |
| image_type_to_level, | |||
frames = None |
|||
| ) |
Downloads frames of image types to the appropriate local paths.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
image_type_to_level (dict[str, int]): Map of image type to level to download.
frames (list[str], optional): List of frame names to download. If None is passed in,
the range from [first, last) are downloaded (extracted from msg).
Returns:
bool: Success of download.
| def scripts.render.network.download_rig | ( | msg | ) |
Downloads rig to the appropriate local path.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
Returns:
bool: Success of download.
| def scripts.render.network.get_cameras | ( | msg, | |
dst_field = "cameras" |
|||
| ) |
Gets the cameras pertinent to the render.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
dst_field (str, optional): Field mapping to cameras in msg.
Returns:
list[str]: List of camera names.
| def scripts.render.network.get_frame_fns | ( | msg, | |
| frames, | |||
uncompressed = False, |
|||
src = None |
|||
| ) |
| def scripts.render.network.get_frame_name | ( | frame | ) |
Gets the frame name for a frame number.
Args:
frame (int): Frame number.
Returns:
str: 0-padded frame name (with length 6).
| def scripts.render.network.get_frame_range | ( | first, | |
| last | |||
| ) |
Gets list of frame names within the range specified.
Args:
first (str): Name of the first frame.
last (str): Name of the last frame.
Returns:
list[str]: Names of the frames between the specified frames (includes first, excludes last).
| def scripts.render.network.get_os_type | ( | ip | ) |
Determines the operating system of the machine assuming it can be reached.
Args:
ip (str): IP of the machine in interest.
Returns:
OSType: Type of operating system.
Raises:
Exception: If the operating system cannot be properly determined as being
Linux, Mac OS X, or Windows.
| def scripts.render.network.get_sample_file | ( | src, | |
run_silently = False |
|||
| ) |
Gets the name of a single objects in the source directory. Local paths are
also supported.
Args:
src (str): Path to the source directory.
run_silently (bool, optional): Whether or not to display results to stdout.
Returns:
str: Single filename from the directory. If no such file or directory exists,
None is returned instead.
| def scripts.render.network.listdir | ( | src, | |
run_silently = False, |
|||
recursive = True |
|||
| ) |
Lists objects in a source directory. A standard ls is performed for local paths.
Args:
src (str): Path to the source directory.
run_silently (bool, optional): Whether or not to display results to stdout.
Returns:
set[str]: Set of contained filenames.
| def scripts.render.network.local_image_type_path | ( | msg, | |
| image_type, | |||
level = None |
|||
| ) |
Gets local path to the directory for an image type.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
image_type (str): Name of an image type (re: source/util/ImageTypes.h).
level (int, optional): Image level to be returned. If None is passed in, the
location of the full-size images is returned.
Returns:
str: Path to local image type directory.
| def scripts.render.network.local_rig_path | ( | msg | ) |
Gets local path of the rig.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
Returns:
str: Path to local rig.
| def scripts.render.network.remote_image_type_path | ( | msg, | |
| image_type, | |||
level = None |
|||
| ) |
Gets remote path to the directory for an image type.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
image_type (str): Name of an image type (re: source/util/ImageTypes.h).
level (int, optional): Image level to be returned. If None is passed in, the
location of the full-size images is returned.
Returns:
str: Path to remote image type directory.
| def scripts.render.network.tar_frame | ( | src, | |
| frame, | |||
| tar_h | |||
| ) |
Tars a directory.
Args:
path (str): Path to the directory to be packed.
frame (str): Name of the frame (6 digit, zero padded)
tar_h (file handle): File handle to the tar file to be written.
| def scripts.render.network.tar_frames | ( | src, | |
| frames | |||
| ) |
Tars a frame.
Args:
src (str): Path to the directory with frames to be packed.
frames (list[str]): List of frame names (6 digit, zero padded)
| def scripts.render.network.upload | ( | src, | |
| dst, | |||
filters = None, |
|||
run_silently = False |
|||
| ) |
Recursively uploads the objects from source that adhere to the filters. No
operation is performed for local paths.
Args:
src (str): Path to the source directory.
dst (str): Path to the destination directory where uploaded files will be saved.
filters (list[str], optional): List of filters to choose files to upload.
run_silently (bool, optional): Whether or not to display results to stdout.
Returns:
bool: Success of upload.
| def scripts.render.network.upload_image_type | ( | msg, | |
| image_type, | |||
frames = None, |
|||
level = None |
|||
| ) |
Uploads frames of an image type to the appropriate local path.
Args:
msg (dict[str, str]): Message received from RabbitMQ publisher.
image_type (str): Name of an image type (re: source/util/ImageTypes.h).
frames (list[str], optional): List of frame names to upload. If None is passed in,
the range from [first, last) are uploaded (extracted from msg).
level (int, optional): Level to upload. If None is passed in, the full-size
image is uploaded.
Returns:
bool: Success of upload.
| scripts.render.network.dir_root = os.path.dirname(dir_scripts) |
| scripts.render.network.dir_scripts = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
1.8.15