Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.09 KB

File metadata and controls

23 lines (18 loc) · 1.09 KB

Deep-Hash-learning-for-Remote-Sensing-Image-Retrieval

The official codes for paper "Deep hash learning for remote sensing image retrieval"

Install dependencies

numpy
opencv-python
torch
torchvision

Data

We conduct the experiments on three data sets, including UC Merced, AID, and NWPU-RESISC45. To train and test our model, you should download the data set and modify each image's path in the dataset/AID/.txt or dataset/NWPU/.txt or dataset/UC_Merced/.txt (depending which data set you select to conduct the experiment)

Training

All the configurations are in trainerAndHash.py, and you can modify them by your needs.

train the model

python trainerAndHash.py --phase=0

extract hash codes

python trainerAndHash.py --phase=1

the path of codes can be modified the line about "parser.add_argument('--codes_dir', default=root + '/codes', type=str)" in trainerAndHash.py

calculate the (mean average precision) mAP value

python trainerAndHash.py --phase=2