csq_resnet50_hash
A CNN with a hash layer, trained so that the hash codes of similar images approach a shared hash center.
Image classification · 181 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Image classification
- Parameters
- 34.1M
- Operations
- 181
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2020
- Cited by
- 410 (as of 22 October 2026)
- Authors
- Li Yuan, Tao Wang, Xiaopeng Zhang and others
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m3992
- Graph hash
- 9de7b63932ee9cedf280140eb4c2cfa8bc5a11b7a3b97bc547a02b6f44a4a4b3
- Skeleton hash
- 44456c9e28a0c095e150276947c002c7debe586390d3329085d761914a35e0e3
- Architecture hash
- bf7fbb91a411a700eda43addd9eac43ec9034e79a2142c9894f6cbe44bd110a3
- Diagram SHA-256
- 56ece82d4a0fb78bde0c2755104aae8ab816fd87e85157e298a3901823ad00cc
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
CSQ, short for Central Similarity Quantization, is a deep hashing method for image and video retrieval. Earlier hashing methods usually learned from pairwise or triplet relationships between data points, which the paper says capture similarity only locally. CSQ instead encourages the hash codes of similar items to approach a common center and those of dissimilar items to converge to different centers.
The hash centers are fixed in advance: the paper constructs them either from a Hadamard matrix or by random sampling from Bernoulli distributions. The network pairs convolutional layers that learn the data features with a hash layer that yields the hash codes. Because hash centers are binary vectors, Binary Cross Entropy measures the distance between a code and its center, and a quantization loss refines the generated codes.
The image experiments use ImageNet, NUS WIDE and MS COCO. The paper reports improvements of 3%-20% in mAP, with 3 to 5.5 × faster training than the latest methods of its time. The authors' repository offers a pre-trained 64-bit ResNet50 model for ImageNet.
Key idea. The paper proposes central similarity, which pulls the hash codes of similar data toward shared hash centers built from the Hadamard matrix and Bernoulli distributions instead of optimizing local similarity.
- csq
- central similarity quantization
- deep hashing
- image hashing
- video hashing
- hash centers
- hadamard matrix hashing
- image retrieval
- hash codes
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{yuan2020centralsimilarityquantizationefficient,
title={Central Similarity Quantization for Efficient Image and Video Retrieval},
author={Li Yuan and Tao Wang and Xiaopeng Zhang and Francis EH Tay and Zequn Jie and Wei Liu and Jiashi Feng},
year={2020},
eprint={1908.00347},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1908.00347},
}