This is the main repository for our improvement on Auto-Encoding Twin-Bottleneck Hashing. Note that the codebase is also an adapted version of the TBH repository.
python=3.6
tensorflow>=2.5
numpy
matplotlib
This work supports tf.data.TFRecordDataset
as the data feed.
We use the cifar10 dataset provided by the TBH authors:
For other datasets, please refer to util/data/make_data.py
to build TFRecords.
Please organize the data folder as follows:
data
|-cifar10 (or other dataset names)
|-train.tfrecords
|-test.tfrecords
Simply run
python ./run_tbh.py
to train the model.
The resulting checkpoints will be placed in ./result/set_name/model/date_of_today
with tensorboard events in ./result/set_name/log/date_of_today
.
The mAP results shown on tensorboard are just for illustration (the actual score would be slightly higher than the ones on tensorboard), since I do not update all dataset codes upon testing. Please kindly evaluate the results by saving the proceeded codes after training.
The visualisations can be recreated by running
python ./vis.py