Skip to content

Commit

Permalink
use #!/usr/bin/env bash instead
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamerlin committed Jul 26, 2020
1 parent 9118c56 commit 9f89cb2
Show file tree
Hide file tree
Showing 40 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions tests/test_models/test_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def test_init_recognizer():

with pytest.raises(RuntimeError):
# input data type should be consist with the dataset type
init_recognizer(dict(config_file=frame_config_file))
init_recognizer(frame_config_file)

with pytest.raises(RuntimeError):
# input data type should be consist with the dataset type
init_recognizer(dict(config_file=video_config_file), use_frames=True)
init_recognizer(video_config_file, use_frames=True)

if torch.cuda.is_available():
device = 'cuda:0'
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/download_annotations.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/kinetics400/annotations"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/download_videos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

# set up environment
conda env create -f environment.yml
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/kinetics400/videos_train/ ../../data/kinetics400/rawframes_train/ --level 2 --flow-type tvl1 --ext mp4 --task both --new-width 340 --new-height 256
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/kinetics400/videos_train/ ../../data/kinetics400/rawframes_train/ --level 2 --ext mp4 --task rgb --new-width 340 --new-height 256
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/kinetics400/videos_train/ ../../data/kinetics400/rawframes_train/ --level 2 --ext mp4 --task rgb --new-width 340 --new-height 256 --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py kinetics400 data/kinetics400/rawframes_train/ --level 2 --format rawframes --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/generate_videos_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py kinetics400 data/kinetics400/videos_train/ --level 2 --format videos --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/kinetics400/rename_classnames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

# Rename classname for convenience
cd ../../../data/kinetics400/
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/download_data.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/mit/"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mit/videos/training ../../data/mit/rawframes/training/ --level 2 --flow-type tvl1 --ext mp4 --task both
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mit/videos/training ../../data/mit/rawframes/training/ --level 2 --ext mp4 --task rgb
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mit/videos/training ../../data/mit/rawframes/training/ --level 2 --ext mp4 --task rgb --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py mit data/mit/rawframes/training/ --level 2 --format rawframes --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mit/generate_videos_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py mit data/mit/videos/training/ --level 2 --format videos --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mmit/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mmit/videos/ ../../../data/mmit/rawframes/ --task both --level 2 --flow-type tvl1 --ext mp4
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mmit/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mmit/videos/ ../../data/mmit/rawframes/ --task rgb --level 2 --ext mp4
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mmit/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/mmit/videos/ ../../data/mmit/rawframes/ --task rgb --level 2 --ext mp4 --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mmit/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py mmit data/mmit/rawframes/ --level 2 --format rawframes --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/mmit/generate_videos_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py mmit data/mmit/videos/ --level 2 --format videos --num-split 1 --subset train --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv1/extract_flow.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/sthv1/rawframes/ ../../data/sthv1/rawframes/ --task flow --level 1 --flow-type tvl1 --input-frames
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv1/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py sthv1 data/sthv1/rawframes/ --num-split 1 --level 1 --subset train --format rawframe --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv2/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/sthv2/videos/ ../../data/sthv2/rawframes/ --task both --level 1 --flow-type tvl1 --ext webm
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv2/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/sthv2/videos/ ../../data/sthv2/rawframes/ --task rgb --level 1 --ext webm
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv2/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/sthv2/videos/ ../../data/sthv2/rawframes/ --task rgb --level 1 --ext webm --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv2/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py sthv2 data/sthv2/rawframes/ --num-split 1 --level 1 --subset train --format rawframe --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/sthv2/generate_videos_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../
PYTHONPATH=. python tools/data/build_file_list.py sthv2 data/sthv2/videos/ --num-split 1 --level 1 --subset train --format videos --shuffle
Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/download_annotations.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/thumos14/"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/download_videos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/thumos14/"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/thumos14/videos/validation/ ../../data/thumos14/rawframes/validation/ --level 1 --flow-type tvl1 --ext mp4 --task both
Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/thumos14/videos/validation/ ../../data/thumos14/rawframes/validation/ --level 1 --ext mp4 --task rgb
Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/thumos14/videos/validation/ ../../data/thumos14/rawframes/validation/ --level 1 --ext mp4 --task rgb --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/thumos14/fetch_tag_proposals.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

PROP_DIR="../../../data/thumos14/proposals"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/download_annotations.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/ucf101/annotations"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/download_videos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

DATA_DIR="../../../data/ucf101/"

Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/extract_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/ucf101/videos/ ../../data/ucf101/rawframes/ --task both --level 2 --flow-type tvl1
Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/extract_rgb_frames.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/ucf101/videos/ ../../data/ucf101/rawframes/ --task rgb --level 2 --ext avi
Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/extract_rgb_frames_opencv.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../
python build_rawframes.py ../../data/ucf101/videos/ ../../data/ucf101/rawframes/ --task rgb --level 2 --ext avi --use-opencv
Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/generate_rawframes_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../

Expand Down
2 changes: 1 addition & 1 deletion tools/data/ucf101/generate_videos_filelist.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/bash env
#!/usr/bin/env bash

cd ../../../

Expand Down

0 comments on commit 9f89cb2

Please sign in to comment.