/LSCSH_sourcecode

A new version can be run on signal card and pytorch 2.0.1

environment

  • Linux
  • pytorch >= 1.4 python>=3.6.5 and corresponding torchvision,numpy,tqdm,etc.
  • NVIDIA GPU 3090ti *8     CUDA V9.2

dataset

datasetclass_numlabel typesource
ImageNet100singlesource#
COCO80multisource#
NUS-WIDE21multisource#
VOC201220multisource
CIFAR-1010singlesource
  • Note that '#' means it is not the official source, for fair comparision, we obtain the data from HashNet ,which is the same as CSQ

train

coco/nuswide/voc2012

python train.py --data_path xxxx --data_name coco --word2vec_file ../data/coco/coco_bert768_word2vec.pkl --epochs 90 --center_update --R 5000 --batch_size 32 --hash_bit 64

ImageNet/cifar-10

python train.py --data_path xxxx --data_name imagenet --word2vec_file ../data/imagenet/imagenet_bert768_word2vec.pkl --epochs 90 --fixed_weight --center_update --R 1000 --batch_size 32 --hash_bit 64

 

data_path settings
>

ImageNet: image_path: xx/xxx/imagenet/image/xxxx.JPEG so that the data_path : xx/xxx/imagenet

>

COCO: image_path: xx/xxx/coco/data/train2014/xxxx.JPEG so that the data_path : xx/xxx/coco

  • you can modify the dataloader/data_list.py to adapt to your file path as well.