For camera frames that are not uint8, the two LeRobot v3 writer modes convert differently:
- image mode (
video=False) clips: np.clip(array, 0, 255).astype(np.uint8)
- video mode goes through
forge.video.encoder.VideoEncoder, which wraps: .astype(np.uint8)
A uint16 source therefore yields different pixels depending on the mode. Clipping is the
more defensible behaviour; the two paths should agree, and a scaling conversion
(array >> 8 or a full-range rescale) is probably what a 16-bit source actually wants.
Deferred from the LeRobot v3 image-mode PR; targeted at a patch release.
For camera frames that are not
uint8, the two LeRobot v3 writer modes convert differently:video=False) clips:np.clip(array, 0, 255).astype(np.uint8)forge.video.encoder.VideoEncoder, which wraps:.astype(np.uint8)A
uint16source therefore yields different pixels depending on the mode. Clipping is themore defensible behaviour; the two paths should agree, and a scaling conversion
(
array >> 8or a full-range rescale) is probably what a 16-bit source actually wants.Deferred from the LeRobot v3 image-mode PR; targeted at a patch release.