- Linux
- pytorch >= 1.4 python>=3.6.5 and corresponding torchvision,numpy,tqdm,etc.
- NVIDIA GPU 3090ti *8 CUDA V9.2
dataset | class_num | label type | source |
ImageNet | 100 | single | source# |
COCO | 80 | multi | source# |
NUS-WIDE | 21 | multi | source# |
VOC2012 | 20 | multi | source |
CIFAR-10 | 10 | single | source |
- Note that '#' means it is not the official source, for fair comparision, we obtain the data from HashNet ,which is the same as CSQ
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
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
>
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.