PyTorch framework for Deep Learning research and development.
It was developed with a focus on reproducibility,
fast experimentation and code/ideas reusing.
Being able to research/develop something new,
rather than write another regular train loop.
Break the cycle - use the Catalyst!
Project manifest. Part of PyTorch Ecosystem. Part of Catalyst Ecosystem:
- Alchemy - Experiments logging & visualization
- Catalyst - Accelerated Deep Learning Research and Development
- Reaction - Convenient Deep Learning models serving
You will learn how to build video classification pipeline with transfer learning using the Catalyst framework to get reproducible results.
You have to split your video files into classes in the following format:
video_dataset/
action_0/
video_abc.avi
...
action_1/
video_abcd.avi
...
catalyst-data tag2label \
--in-dir=./data/video_dataset \
--out-dataset=./data/dataset.csv \
--out-labeling=./data/labeling.json \
--tag-column=video
python tsn/process_data.py \
--in-csv=./data/dataset.csv \
--datapath=./data/video_dataset \
--out-csv=./data/dataset_processed.csv \
--out-dir=./data/video_dataset_processed \
--n-cpu=4 \
--verbose
PYTHONPATH=tsn python tsn/prepare_splits.py \
--base_path=./data/video_dataset \
--dataset_path=./data/dataset.csv \
--out_folder=./data \
--k_fold=5 \
--use_folds=4
CUDA_VISIBLE_DEVICES=0 catalyst-dl run --config configs/train.yml
CUDA_VISIBLE_DEVICES="" tensorboard --logdir /mnt/ssd1/logs/tsn --host=0.0.0.0 --port=6006
Don't forget to fix data_params at infer.yaml
export LOGDIR=/mnt/ssd1/logs/tsn
CUDA_VISIBLE_DEVICES=1 PYTHONPATH=tsn catalyst-dl infer \
--expdir=tsn \
--resume=${LOGDIR}/checkpoint.best.pth.tar \
--out-prefix=${LOGDIR}/dataset.predictions.npy \
--config=${LOGDIR}/config.json,./configs/infer.yml \
--verbose
Build
docker build -t tsn .
Run
docker run --rm -it \
-p 8893:8893 \
--ipc=host \
--runtime=nvidia \
tsn \
flask run -p 8893 --host=0.0.0.0