Last active
February 1, 2019 09:33
-
-
Save dsalaj/ae1424592f7d88f7554c95d8f0708f2c to your computer and use it in GitHub Desktop.
shell commands used to extract and downsample video to numpy arrray
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Anaconda to control the environment: https://www.anaconda.com/distribution/#linux | |
wget https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh | |
chmod +x Anaconda3-2018.12-Linux-x86_64.sh | |
./Anaconda3-2018.12-Linux-x86_64.sh | |
# answer to the installation prompts | |
# activate environment and install the required libraries | |
conda create -n vid2frame | |
conda activate vid2frame | |
conda install opencv scipy | |
# there are plenty of nice target videos here: https://www.sample-videos.com/ | |
wget https://www.sample-videos.com/video123/mp4/240/big_buck_bunny_240p_1mb.mp4 | |
mv big_buck_bunny_240p_1mb.mp4 vid.mp4 | |
# download the script for extracting and downsampling (https://gist.github.com/dsalaj/b9143289784fbd7f741518301e6037ce) | |
wget https://gist.githubusercontent.com/dsalaj/b9143289784fbd7f741518301e6037ce/raw/075d61d2d3fa534f7af3d8ca2cc82efb05ab9a02/extract_frames.py | |
python3 extract_frames.py | |
# finally use frames_data.npy for supervised training target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment