mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-22 20:19:43 +00:00
chore(format): format code
This commit is contained in:
@@ -34,8 +34,8 @@ from .types import (
|
|||||||
from .video import (
|
from .video import (
|
||||||
VALID_VIDEO_CODECS,
|
VALID_VIDEO_CODECS,
|
||||||
VIDEO_ENCODER_INFO_KEYS,
|
VIDEO_ENCODER_INFO_KEYS,
|
||||||
VideoEncoderConfig,
|
|
||||||
DepthEncoderConfig,
|
DepthEncoderConfig,
|
||||||
|
VideoEncoderConfig,
|
||||||
camera_encoder_defaults,
|
camera_encoder_defaults,
|
||||||
depth_encoder_defaults,
|
depth_encoder_defaults,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ from .io_utils import (
|
|||||||
write_info,
|
write_info,
|
||||||
)
|
)
|
||||||
from .utils import (
|
from .utils import (
|
||||||
|
DEFAULT_DEPTH_PATH,
|
||||||
DEFAULT_EPISODES_PATH,
|
DEFAULT_EPISODES_PATH,
|
||||||
DEFAULT_IMAGE_PATH,
|
DEFAULT_IMAGE_PATH,
|
||||||
DEFAULT_DEPTH_PATH,
|
|
||||||
update_chunk_file_indices,
|
update_chunk_file_indices,
|
||||||
)
|
)
|
||||||
from .video_utils import (
|
from .video_utils import (
|
||||||
|
|||||||
@@ -58,9 +58,7 @@ def image_array_to_pil_image(image_array: np.ndarray, range_check: bool = True)
|
|||||||
"""
|
"""
|
||||||
# TODO(CarolinePascal): 4 dimensions RGB-D images
|
# TODO(CarolinePascal): 4 dimensions RGB-D images
|
||||||
if image_array.ndim not in (2, 3):
|
if image_array.ndim not in (2, 3):
|
||||||
raise ValueError(
|
raise ValueError(f"The array has {image_array.ndim} dimensions, but 2 or 3 is expected for an image.")
|
||||||
f"The array has {image_array.ndim} dimensions, but 2 or 3 is expected for an image."
|
|
||||||
)
|
|
||||||
|
|
||||||
# Squeeze 3D single-channel inputs to 2D so depth maps work whether the
|
# Squeeze 3D single-channel inputs to 2D so depth maps work whether the
|
||||||
# caller emits (H, W), (1, H, W), or (H, W, 1).
|
# caller emits (H, W), (1, H, W), or (H, W, 1).
|
||||||
|
|||||||
Reference in New Issue
Block a user