Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bl0 authored Aug 31, 2018
1 parent d816b5f commit e92458b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ The implemented models include:

## Requirements

- Python3
- Other packages: `pip install tensorflow-gpu scipy h5py`
- Python3: Anaconda is recommended because it already contains a lot of packages:
```
conda create -n DeepHash python=3.6 anaconda
source activate DeepHash
```
- Other packages:
```
conda install -y tensorflow-gpu
conda install -y -c conda-forge opencv
```

To import the algorithms implemented in `./DeepHash`, we need to add the path of `./DeepHash` to environment variables as:
To import the pakcages implemented in `./DeepHash`, we need to add the path of `./DeepHash` to environment variables as:

```shell
export PYTHONPATH=/path/to/project/DeepHash/DeepHash:$PYTHONPATH
Expand All @@ -25,6 +33,8 @@ export PYTHONPATH=/path/to/project/DeepHash/DeepHash:$PYTHONPATH
## Data Preparation
In `data/cifar10/train.txt`, we give an example to show how to prepare image training data. In `data/cifar10/test.txt` and `data/cifar10/database.txt`, the list of testing and database images could be processed during predicting procedure. If you want to add other datasets as the input, you need to prepare `train.txt`, `test.txt` and `database.txt` as CIFAR-10 dataset.

We also recommend you to follow https://github.com/thuml/HashNet/tree/master/pytorch#datasets to prepare NUSWIDE_81 and COCO datasets.

## Get Started

### Pre-trained model
Expand All @@ -41,7 +51,7 @@ Make sure the tree of `/path/to/project/DeepHash/architecture` looks like this:

### Training and Testing

The example of `$method` (DCH, DVSQ, DQN and DHN) can be run with the following command:
The example of `$method` (DCH, DVSQ, DQN, DHN and DTQ) can be run like:

```shell
cd example/$method/
Expand Down

0 comments on commit e92458b

Please sign in to comment.