From 8838100d6f8203bc69cf7b99d9022b1b7ce6deb4 Mon Sep 17 00:00:00 2001 From: Sadeep Jayasumana Date: Fri, 29 Nov 2019 19:49:56 +0530 Subject: [PATCH] Update README.md --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a0c8062..cde8b12 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Caffe version: [http://github.com/torrvision/crfasrnn](http://github.com/torrvision/crfasrnn)
Tensorflow/Keras version: [http://github.com/sadeepj/crfasrnn_keras](http://github.com/sadeepj/crfasrnn_keras)
-This repository contains PyTorch code for the "CRF-RNN" semantic image segmentation method, published in the ICCV 2015 paper [Conditional Random Fields as Recurrent Neural Networks](http://www.robots.ox.ac.uk/~szheng/papers/CRFasRNN.pdf). This paper was initially described in an [arXiv tech report](http://arxiv.org/abs/1502.03240). The [online demo](http://crfasrnn.torr.vision) of this project won the Best Demo Prize at ICCV 2015. Original Caffe-based code of this project can be found [here](https://github.com/torrvision/crfasrnn). Results produced with this PyTorch code are almost identical to that with the Caffe-based version. +This repository contains the PyTorch implementation of the "CRF-RNN" semantic image segmentation method, published in the ICCV 2015 paper [Conditional Random Fields as Recurrent Neural Networks](http://www.robots.ox.ac.uk/~szheng/papers/CRFasRNN.pdf). This research was initially described in an [arXiv tech report](http://arxiv.org/abs/1502.03240). The [online demo](http://crfasrnn.torr.vision) of this project won the Best Demo Prize at ICCV 2015. Original Caffe-based code of this project can be found [here](https://github.com/torrvision/crfasrnn). Results produced with this PyTorch code are almost identical to that with the Caffe-based version. If you use this code/model for your research, please cite the following paper: ``` @@ -30,7 +30,7 @@ The root directory of the clone will be referred to as `crfasrnn_pytorch` hereaf **Note**: If you are using a Python virtualenv, make sure it is activated before running each command in this guide. -Use the `requirements.txt` file (or `requirements_gpu.txt`, if you have a GPU device) in this repository to install all the dependencies via `pip`: +Use the `requirements.txt` file in this repository to install all the dependencies via `pip`: ``` $ cd crfasrnn_pytorch $ pip install -r requirements.txt @@ -43,16 +43,15 @@ $ python ``` You should not see any errors while importing `torch` above. -### Step 3: Build CRF-RNN custom op C++ code +### Step 3: Build CRF-RNN custom op -Run `make` inside the `crfasrnn_keras/src/cpp` directory: +Run `setup.py` inside the `crfasrnn_pytorch/crfasrnn` directory: ``` -$ cd crfasrnn_pytorch +$ cd crfasrnn_pytorch/crfasrnn $ python setup.py install ``` Note that the `python` command in the console should refer to the Python interpreter associated with your PyTorch installation. - ### Step 4: Download the pre-trained model weights Download the model weights from [here](https://goo.gl/ciEYZi) or [here](https://github.com/sadeepj/crfasrnn_keras/releases/download/v1.0/crfrnn_keras_model.h5) and place it in the `crfasrnn_pytorch` directory with the file name `crfasrnn_weights.pth`. @@ -63,4 +62,3 @@ $ cd crfasrnn_pytorch $ python run_demo.py ``` If all goes well, you will see the segmentation results in a file named "labels.png". -