Install PyTorch for LCRnet using KB

Posted 2019.04.30 06:08
...더보기

#!/bin/bash

 

# http_proxy_on # do this first

 

# python setting update

apt-get upgrade

# apt-get update # somehow timeout happens

 

# python setting update

pip install --upgrade pip

pip install --upgrade numpy

 

# jupyter notebook setting

pip install jupyterthemes

pip install --upgrade jupyterthemes

jt -t grade3 -fs 95 -altp -tfs 11 -nfs 115 -cellw 88% -T # i like this

 

# opencv install

pip install cython

pip install opencv-python

apt update && apt install -y libsm6 libxext6

apt-get install python-matplotlib

pip install matplotlib

 

# other python packages install

pip install pandas

pip install sklearn

pip install seaborn

pip install skorch

pip install tqdm

pip install SimpleITK

pip install imageio

pip install ujson

pip install pytest

pip install pytest-cov

pip install pytest-datafiles

pip install pylint

 

# install tensorboardX

# pip install tensorboardX

# pip3 install --upgrade --user tensorflow-gpu

# ln -s ~/.local/bin/tensorboard /usr/bin

 

# Jupyter notebook execution

# jupyter notebook --allow-root --ip=0.0.0.0 --port 1028

#

 

# install misc.

apt-get install screen

 

# pytorch 0.4.1? with Python 3.5

pip install https://download.pytorch.org/whl/cu90/torch-0.4.1-cp35-cp35m-linux_x86_64.whl

pip install packaging

pip install pycocotools

pip install cffi

 

# clone

git clone https://github.com/roytseng-tw/Detectron.pytorch.git

 

# cuda compile things required by Detectron.pytorch

# cd Detectron.pytorch

# cd lib

# sh make.sh

# mkdir data/pretrained_model

# download weights

pip install argparse-color-formatter

pip install colorama

pip install requests

pip install pyyaml

python tools/download_imagenet_weights.py

 

# symbolic link

# cd ~/github/LCRNet_v2.0

# ln -s ~/github/Detectron.pytorch/ Detectron.pytorch

 

# run demo

# python demo.py Human3.6-17J-ResNet50 Directions1_S11_C1_1.jpg 0 # NOT working (cannot download)

# python demo.py InTheWild-ResNet50 058017637.jpg 0 # this one is working

 

# hyemin's code

pip install joblib

pip install youtube_dl

pip install moviepy

pip install scikit-image

mkdir videos

# Make youtube_list.txt

mkdir tmp_images

mkdir detection_result

 

# Download youtube videos:

# 1. youtube_list.txt

#        https://www.youtube.com/watch?v=DyDfgMOUjCI

# 2. Download_video.ipynb

# 3. 3d_converter.py

# 4. process_download_video.ipynb

#        Results will be saved into ./detection_result/(id).dat.gz

# 5. Done!

# 

« PREV : 1 : 2 : 3 : 4 : 5 : ··· : 633 : NEXT »