Just a small python web service wrapping a setup of Facebook Detectron project.
curl -v -F image=@parking.jpg http://detectron.ticapix.ovh:8080/analyse -o test.png
I've used Ubuntu 16.04 on top of a G2-15 OVH virtual machine and followed https://hackernoon.com/how-to-use-detectron-facebooks-free-platform-for-object-detection-9d41e170bbcb.
Detailled version below:
sudo apt-get install cmake build-essential python-pip
Get CUDA installer from NVIDIA page.
pip install PeachPy
git clone https://github.com/Maratyszcza/NNPACK.git
cd NNPACK
mkdir build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE .. && make
sudo make install
Register/login on https://developer.nvidia.com/cudnn and download 'cuDNN v7.0.5 Runtime Library for Ubuntu16.04 (Deb)' and 'cuDNN v7.0.5 Developer Library for Ubuntu16.04 (Deb)'
sudo dpkg -i libcudnn*.deb
sudo apt-get install libeigen3-dev libleveldb-dev libopencv-dev librocksdb-dev libgflags-dev python3-dev liblmdb-dev libsnappy-dev libgoogle-glog-dev libopenmpi-dev
sudo apt-get install python-numpy python-setuptools
pip install future six protobuf
git clone --recursive https://github.com/caffe2/caffe2.git && cd caffe2
make && cd build && sudo make install
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
sudo pip install Cython
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
sudo make install
sudo pip install numpy pyyaml matplotlib opencv-python>=3.0 setuptools Cython mock scipy
git clone https://github.com/facebookresearch/Detectron.git && cd Detectron
cd lib && make && cd ..
git clone https://github.com/ticapix/detectron_service.git && cd detectron_service
make install
make run