wangzhuo2019 / SSAN

Domain Generalization via Shuffled Style Assembly for Face Anti-Spoofing, CVPR2022.
MIT License
95 stars 22 forks source link

How to extract images from videos? #11

Open maywander opened 2 years ago

maywander commented 2 years ago

请问在oulu-npu训练集和测试集中,如何从avi取出需要的帧

Wamgz commented 1 year ago

def avi2jpg(avi_path, jpgs_path): if not os.path.exists(jpgs_path): os.makedirs(jpgs_path) subprocess.run(["ffmpeg", "-i", avi_path, "-q:v", "2", jpgs_path + "/%03d.jpg"])