Skip to content

Commit

Permalink
Add script to convert moment dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Lee authored and Kevin Lee committed Nov 10, 2018
1 parent d47f161 commit 11e4632
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,18 @@ To convert all videos in the data/raw folder to a consistent fps and resolution:
python3 converter.py --fps 30 --out_dim 640 360
```

## Requirements
#### Moments in Time (Mini) Dataset
Download and unzip the dataset
```
wget http://data.csail.mit.edu/soundnet/actions3/split1/Moments_in_Time_Mini.zip
unzip Moments_in_Time_Mini.zip -d data/.
```
Pre-process the dataset
```
./convert_moment_dataset.sh
```

### Requirements

### Dependencies

Expand Down
12 changes: 12 additions & 0 deletions convert_moment_dataset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if [ ! -d data/Moments_in_Time_Mini ]; then
echo "Moments_in_Time_Mini dataset not downloaded";
exit;
fi

mkdir -p data/Moments_processed;

for directory in $(find data/Moments_in_Time_Mini/training -type d -mindepth 1);
do
echo "Converting videos in directory $directory";
python3 converter.py --input_dir "$directory/" --output_dir data/Moments_processed/;
done

0 comments on commit 11e4632

Please sign in to comment.