プログラム
import numpy as np
import cv2
from pathlib import Path
file_list = []
for file in file_list:
# (height, width, 2)の形にreshape
yuv_array = np.fromfile(file, np.uint8).reshape([1200, 1920, 2])
bgr = cv2.cvtColor(yuv_array, cv2.COLOR_YUV2BGR_UYVY)
cv2.imwrite(str(Path(file).with_suffix('.jpg')), bgr)
bgr = cv2.cvtColor(yuv_array, cv2.COLOR_YUV2BGR_UYVY)
のcv2.COLOR_YUV2BGR_UYVY
部分をバイナリファイルの形式に合わせれば、他のYUV形式に応用可能。