Extract features from video file as the format in Youtube-8M.
Note Google now share their own feature extractor with pre-trained model. That'd better to use theirs.
scripts/download.py: download videos from YouTube corresponding to the TFRecord file.scripts/decode.py: decode frames from video and save them to data folder.scripts/train_pca.py: load extracted inception_v3 features and fit PCA with them.scripts/test.py: test single video file and generate TFRecord.scripts/extract.py: extract inception_v3 features from decoded image folders.scripts/pack.py: transform and pack your downloaded videos into Youtube-8M-dataset-like TFRecord file.scripts/pipeline.py: download videos and extract inception_v3 features.scripts/label_converter.py: convert label numbers into names.scripts/checker.py: check if downloaded TFRecord is valid and complete.demo.sh: all-in-one shell script for testing single video file and get its tags.
- Run
virtualenv -p python3 yt8m-env && source yt8m-env/bin/activatefor virtual Python environment. - Run
pip3 install -r requirements.txtfor required Python packages.
- You may install
pytorchby the instruction of its official website.
- Modify
misc/config.pyfor custom configuration. - Run
python3 scripts/pipeline.pyto download videos and extract inception_v3 features. - Once you've downloaded enough videos, you can run
python3 scripts/train_pca.pyto fit pca. - After fitting PCA, run
python3 scripts/pack.pyto transform and pack your downloaded videos into Youtube-8M-dataset-like TFRecord file. - Just run your training scripts for Youtube-8M and enjoy!