A PyTorch Implementation of Deep Class-Wise Hashing: Semantics-Preserving Hashing via Class-Wise Loss (DCWH)
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".
Simply add "-e" to turn into evaluation mode:
python dcwh.py -e --network google --dataset cifar100 --len 32 --path cifar100_google_32.pth
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 | |
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.