- Notifications
You must be signed in to change notification settings - Fork0
kamwoh/sdc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Official pytorch implementation of the paper: "Unsupervised Hashing with Similarity Distribution Calibration"
Unsupervised hashing methods typically aim to preserve the similarity between data points in a feature space by mappingthem to binary hash codes. However, these methods often overlook the fact that the similarity between data points in thecontinuous feature space may not be preserved in the discrete hash code space, due to the limited similarity range ofhash codes.The similarity range is bounded by the code length and can lead to a problem known assimilarity collapse. That is,the positive and negative pairs of data points become less distinguishable from each other in the hash space.To alleviate this problem, in this paper a novel Simialrity Distribution Calibration (SDC) method is introduced.SDC aligns the hash code similarity distribution towards a calibration distribution (e.g., beta distribution) withsufficient spread across the entire similarity range, thus alleviating the similarity collapse problem.Extensive experiments show that our SDC outperforms significantly the state-of-the-art alternatives on coarsecategory-level and instance-level image retrieval.
python main_v2.py model=sdc model.nbit=64 dataset=cifar10
The above command runs cifar10 with 64-bits settings. We usehydra as config system.
python val.py model=sdc logdir=/path/to/logdir
The above command runs validation for the trained model, please seeval.py
to have different validation parameters.
Please refer tohttps://fast-image-retrieval.readthedocs.io/en/latest/dataset.html for dataset downloading.
Suggestions and opinions on this work (both positive and negative) are greatly welcomed. Please contact the authors bysending an email tokamwoh.ng at surrey.ac.uk
.
- Deep Polarized Network (DPN) - (https://github.com/kamwoh/DPN)
- One Loss for All (OrthoHash) - (https://github.com/kamwoh/orthohash)
- Fast Image Retrieval (FIRe) - (https://github.com/CISiPLab/cisip-FIRe)
We also implemented (some copied from original authors):
- Unsupervised GreedyHash
- BiHalf
- Weighted Contrastive Hashing
- Naturally Sort Hash
- CIBHash
Seemodels/arch
,models/trainers
andmodels/loss
.
If you find this work useful for your research, please cite
@inproceedings{ng2023sdc,author ={Ng, Kam Woh and Zhu, Xiatian and Hoe, Jiun Tian and Chan, Chee Seng and Zhang, Tianyu and Song, Yi-Zhe and Xiang, Tao},booktitle ={British Machine Vision Conference},title ={Unsupervised Hashing with Similarity Distribution Calibration},year ={2023}}