Skip to content

mzhang367/dcwh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DCWH

A PyTorch Implementation of Deep Class-Wise Hashing: Semantics-Preserving Hashing via Class-Wise Loss (DCWH)

Demo

Training

python dcwh.py  --network google  --dataset cifar100 --len 32 --path cifar100_google_32.pth

This will train a model using pre-trained GoogLeNet architecture with 32-bit codes on CIFAR-100 dataset. The model will be saved as "cifar100_google_32.pth" under the directory "./checkpoint".

Evaluation

Simply add "-e" to turn into evaluation mode:

python dcwh.py  -e --network google  --dataset cifar100 --len 32 --path cifar100_google_32.pth

Results

The experimental results of our implementation are shown as follows:

Net Structure Dataset mAP (%)
16-bit 24-bit 32-bit 48-bit
GoogLeNet CIFAR-10 95.74 96.03 96.05 96.04
CIFAR-100 63.93 74.33 74.84 76.37
Our results on CIFAR-10 are better than the original paper, which were 94.0%, 95.0%, 95.4%, and 95.2% under 16-bit, 24-bit, 32-bit, and 48-bit, respectively.

For CIFAR-100 dataset, our results are comparable to the original paper since DCWH achieved 75.70% and 76.90% under 32-bit and 48-bit codes, respectively.

About

Deep Class-Wise Hashing: Semantics-Preserving Hashing via Class-Wise Loss

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages