Last active
March 28, 2022 15:07
-
-
Save kiyoon/0499660152c66ec7be1aba5c218b9e6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# If you don't have conda installed, run these in advance. | |
#wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh | |
#bash Miniconda3-latest-Linux-x86_64.sh | |
# Run the script using `source epic_viewer_setup.sh`. | |
if [[ "${BASH_SOURCE[0]}" == "${0}" ]] | |
then | |
echo "Please run script like: source $0" | |
exit 1 | |
fi | |
# IMPORTANT: Replace URLs | |
# split-N | |
epic_viewer_URL='https://...' | |
split_pkl_URL='https://' | |
split_tar_URL='https://' | |
# Extract epic_viewer.tar.gz | |
cd ~ | |
wget "$epic_viewer_URL" -O epic_viewer.tar.gz | |
tar xvzf epic_viewer.tar.gz | |
cd epic_viewer-1.0.2 | |
# Install epic_viewer | |
conda create -n epic_viewer python=3 -y | |
conda activate epic_viewer | |
pip install -e . | |
cd submodules/video_datasets_api | |
pip install -e . | |
# Download video and split data | |
cd ../../data | |
wget --content-disposition "$split_pkl_URL" | |
wget "$split_tar_URL" -O split.tar | |
mkdir videos | |
tar xvf split.tar -C videos | |
# Optionally, installing Pillow-SIMD makes video loading so much faster. | |
# You may see an error if you don't have gcc installed. | |
conda uninstall -y --force pillow pil jpeg libtiff libjpeg-turbo | |
pip uninstall -y pillow pil jpeg libtiff libjpeg-turbo | |
conda install -yc conda-forge libjpeg-turbo | |
CFLAGS="${CFLAGS} -mavx2" pip install --upgrade --no-cache-dir --force-reinstall --no-binary :all: --compile pillow-simd | |
conda install -y jpeg libtiff | |
# Run the program | |
cd ../tools | |
./epic_multilabel.py | |
# The program will ask you for video path and split.pkl path. It's in ../data/videos and ../data/split-N.pkl. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment