Coder Social home page Coder Social logo

araujoalexandre / youtube8m-circulant Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 830 KB

Training compact deep learning models for video classification using circulant matrices

License: Apache License 2.0

Python 100.00%
deep-learning kaggle-competition eccv-2018 compression

youtube8m-circulant's Introduction

Training compact deep learning models for video classification using circulant matrices

This repository contains the code used for the experiments presented in the paper

The repository is a fork of google's repository and borrows from Miech et al

The experiments was run with TensorFlow 1.8 on POWER8 machines with 4 TESLA v100 GPU.

The code is released under Apache License Version 2.0.

Setup

export TRAIN_FOLDER=data/yt8m/frame/ 
export OUT_FOLDER=output_folder 
export N_GPUS=4 

/!\ The files in the output_folder will be erase if you re-run an experiment in the same folder.

Record the global parameters:

export PARAMS="--train_data_pattern=${TRAIN_FOLDER}train*.tfrecord,${TRAIN_FOLDER}validate[A-Za-z]*.tfrecord --frame_features=True --feature_names=rgb,audio --feature_sizes=1024,128 --iterations=15 --sample_random_frames=True --num_gpu=${N_GPUS} --num_readers=100 --batch_size=80 --num_epochs=15 --base_learning_rate=0.0002 --learning_rate_decay=0.8 --data_augmentation=True --n_bagging=10 --moe_num_mixtures=4 --moe_add_batch_norm=True --k_factor=1 --dbof_cluster_size=8192 --fc_hidden_size=512 --fv_cluster_size=64 --netvlad_cluster_size=64 --model=CirulantDiagonalNetwork --start_new_model" 

Experiment 1

Alt text

python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --video_level_classifier_model=MoeModel ${PARAMS} 
python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --use_d_matrix=True --fc_dbof_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 

Experiment 2

Alt text

DBoF figure

python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --video_level_classifier_model=MoeModel ${PARAMS}
python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --fc_dbof_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 

NetVLAD figure

python3 code/train.py --train_dir=${OUT_FOLDER} --add_netvlad=True --video_level_classifier_model=MoeModel ${PARAMS} 
python3 code/train.py --train_dir=${OUT_FOLDER} --add_netvlad=True --fc_netvlad_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 

NetFisher figure

python3 code/train.py --train_dir=${OUT_FOLDER} --add_fisher_vector=True --video_level_classifier_model=MoeModel ${PARAMS} 
python3 code/train.py --train_dir=${OUT_FOLDER} --add_fisher_vector=True --fc_netvlad_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 

Experiment 3

Alt text

python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --no_audio=True --video_level_classifier_model=MoeModel ${PARAMS}
python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --no_audio=True --dbof_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 
python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --no_audio=True --fc_dbof_circulant=True --video_level_classifier_model=MoeModel ${PARAMS} 
python3 code/train.py --train_dir=${OUT_FOLDER} --add_dbof=True --no_audio=True --video_level_classifier_model=Circulant_MoeModel ${PARAMS} 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.