python ver HorizonNet install & performance

Source from colleague, who found https://sunset1995.github.io/HorizonNet/ for 360 image horizontal correction.

Due to the uncertainty of using the latest (4.4.x) opencv-python version, and python3 version on ubuntu 20.04 is too new to get the suggesting 3.1.0.5 opencv-python, I use ubuntu 18.04 (default python3 is 3.6.9) to install this tool for 360 image horizontal correction.

Here's the full install script.

$ sudo apt-get update
$ sudo apt-get install python3
$ python3 --version
Python 3.6.9
$ sudo apt-get install python3-pip
$ sudo pip3 install opencv-python==3.1.0.5
$ sudo pip3 install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
$ sudo pip3 install numpy
$ sudo pip3 install scipy
$ sudo pip3 install scikit-learn
$ sudo pip3 install pillow
$ sudo pip3 install tqdm
$ sudo pip3 install tensorboardX
$ sudo pip3 install open3d
$ sudo pip3 install shapely
$ sudo pip3 install torchvision
$ sudo apt-get install git
$ git clone https://github.com/sunset1995/HorizonNet.git
$ cd HorizonNet/
$ date; python3 preprocess.py --img_glob ../demo.png  --output_dir ../ ; date
Fri Dec  4 06:44:53 UTC 2020
Processing ../demo.png
Fri Dec  4 06:45:11 UTC 2020
$

However, it takes about 20 secs to process a 6000*3000 image, probably due to python limitation. A C++ version might be more useful, keep looking for it.