compile.rst 3.46 KB
Newer Older
Zhang's avatar
v0.2.0  
Zhang committed
1
2
Install and Citations
=====================
Hang Zhang's avatar
docs  
Hang Zhang committed
3

Hang Zhang's avatar
v0.1.0  
Hang Zhang committed
4

Hang Zhang's avatar
Hang Zhang committed
5
6
Installation
------------
Hang Zhang's avatar
v0.1.0  
Hang Zhang committed
7

Hang Zhang's avatar
Hang Zhang committed
8
    * Install PyTorch 1.4.0 by following the `PyTorch instructions <http://pytorch.org/>`_.
Hang Zhang's avatar
Hang Zhang committed
9
 
Hang Zhang's avatar
Hang Zhang committed
10
    * PIP Install::
Hang Zhang's avatar
v0.1.0  
Hang Zhang committed
11

Hang Zhang's avatar
Hang Zhang committed
12
        pip install torch-encoding --pre
Hang Zhang's avatar
Hang Zhang committed
13
14
        # macOS
        CC=clang CXX=clang++ pip install torch-encoding --pre
Hang Zhang's avatar
docs  
Hang Zhang committed
15

Hang Zhang's avatar
Hang Zhang committed
16
    * Install from source:: 
Hang Zhang's avatar
docs  
Hang Zhang committed
17

Hang Zhang's avatar
Hang Zhang committed
18
        git clone https://github.com/zhanghang1989/PyTorch-Encoding && cd PyTorch-Encoding
Hang Zhang's avatar
Hang Zhang committed
19
        # ubuntu
Hang Zhang's avatar
Hang Zhang committed
20
        python setup.py install
Hang Zhang's avatar
Hang Zhang committed
21
22
        # macOS
        CC=clang CXX=clang++ python setup.py install
Hang Zhang's avatar
docs  
Hang Zhang committed
23

Hang Zhang's avatar
Hang Zhang committed
24

Hang Zhang's avatar
Hang Zhang committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Using Docker
------------

We strongly recommend using the docker option, if you are experiencing any errors using standard installation.

    * Install Docker Engine by following the `Install Docker Engine <https://docs.docker.com/engine/install/>`_.
    * Build the docker image::

        git clone https://github.com/zhanghang1989/PyTorch-Encoding && cd PyTorch-Encoding
        bash scripts/build_docker.sh

    * Run the docker::

        bash scripts/run_docker.sh


Hang Zhang's avatar
Hang Zhang committed
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Detailed Steps
--------------

This tutorial is a sucessful setup example for AWS EC2 p3 instance with ubuntu 16.04, CUDA 10.
We cannot guarantee it to work for all the machines, but the steps should be similar.
Assuming CUDA and cudnn are already sucessfully installed, otherwise please refer to other tutorials.

      * Install Anaconda from the `link <https://www.anaconda.com/distribution/>`_ .

      * Install ninja::
 
         wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip
         sudo unzip ninja-linux.zip -d /usr/local/bin/
         sudo update-alternatives --install /usr/bin/ninja ninja /usr/local/bin/ninja 1 --force

      * Install PyTorch::

Hang Zhang's avatar
Hang Zhang committed
58
         conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
Hang Zhang's avatar
Hang Zhang committed
59
60
61
62
63

      * Install this package::

         pip install torch-encoding --pre

Zhang's avatar
v0.2.0  
Zhang committed
64
Citations
Hang Zhang's avatar
v0.1.0  
Hang Zhang committed
65
---------
Hang Zhang's avatar
v1.0.1  
Hang Zhang committed
66
67

    .. note::
68
69
70
71
72
73
74
75
        * Hang Zhang et al. "ResNeSt: Split-Attention Networks" *arXiv 2020*::

            @article{zhang2020resnest,
            title={ResNeSt: Split-Attention Networks},
            author={Zhang, Hang and Wu, Chongruo and Zhang, Zhongyue and Zhu, Yi and Zhang, Zhi and Lin, Haibin and Sun, Yue and He, Tong and Muller, Jonas and Manmatha, R. and Li, Mu and Smola, Alexander},
            journal={arXiv preprint arXiv:2004.08955},
            year={2020}
            }
Hang Zhang's avatar
v0.2.0  
Hang Zhang committed
76
77
78
79
80
81
82
83
84
85
86

        * Hang Zhang, Kristin Dana, Jianping Shi, Zhongyue Zhang, Xiaogang Wang, Ambrish Tyagi, Amit Agrawal. "Context Encoding for Semantic Segmentation"  *The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2018*::

            @InProceedings{Zhang_2018_CVPR,
            author = {Zhang, Hang and Dana, Kristin and Shi, Jianping and Zhang, Zhongyue and Wang, Xiaogang and Tyagi, Ambrish and Agrawal, Amit},
            title = {Context Encoding for Semantic Segmentation},
            booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
            month = {June},
            year = {2018}
            }

Hang Zhang's avatar
v1.0.1  
Hang Zhang committed
87
88
89
90
91
92
93
94
95
96

        * Hang Zhang, Jia Xue, and Kristin Dana. "Deep TEN: Texture Encoding Network." *The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2017*::

            @InProceedings{Zhang_2017_CVPR,
            author = {Zhang, Hang and Xue, Jia and Dana, Kristin},
            title = {Deep TEN: Texture Encoding Network},
            booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
            month = {July},
            year = {2017}
            }