Feature Pyramid Hashing

Yifan Yang, Libing Geng, Hanjiang Lai, Yan Pan, Jian Yin · DOI

Abstract

Large-scale image retrieval typically relies on hashing to generate compact binary codes. However, standard deep hashing methods often fail in fine-grained scenarios where subtle structural differences are more important than high-level semantic categories. This paper presents Feature Pyramid Hashing (FPH), a "Two-Pyramid" architecture that combines a Vertical Pyramid for semantics with a Horizontal Pyramid for structural details. By fusing these features through a Consensus Module, FPH achieves state-of-the-art performance on challenging fine-grained datasets like CUB-200-2011 and Stanford Dogs.

Introduction

Image retrieval at scale necessitates transforming high-dimensional image data into short binary strings, or hash codes. This allows for efficient searching in Hamming space. While deep hashing models leveraging Convolutional Neural Networks (CNNs) excel at coarse-grained retrieval—such as distinguishing a vehicle from an animal—they often struggle with fine-grained tasks.

Fine-grained vs. coarse-grained retrieval challenges: (a) car, (b) dog, (c) and (d) different seagull species.

In fine-grained retrieval, the goal is to differentiate between highly similar sub-categories, such as specific species of birds. Standard CNNs prioritize high-level semantic features in their deeper layers, often discarding the subtle spatial and structural details (e.g., beak shape or feather patterns) necessary for these tasks.

Methodology: Feature Pyramid Hashing (FPH)

The proposed FPH framework addresses the loss of detail in deep networks through a dual-pyramid structure:

1. Vertical and Horizontal Pyramids

The Vertical Pyramid follows a standard feed-forward backbone (e.g., ResNet-18) to capture global semantic information. In contrast, the Horizontal Pyramid utilizes lateral connections to extract feature maps from intermediate stages of the network. These earlier layers preserve the fine-grained structural information that is typically lost as the network depth increases.

2. Consensus Fusion and Multi-Scale Pooling

To integrate these diverse features, the authors introduce a Consensus Module. Instead of simple concatenation, this module uses "mediators" to aggregate information from different network stages, ensuring the final hash code balances global context with local detail. Additionally, the horizontal pyramid employs varied average pooling strategies (e.g., $2 \times 2$, $4 \times 4$) to maintain spatial awareness across different scales.

3. Training Objective

The model is trained using a Triplet Ranking Loss. This objective ensures that the Hamming distance between a query and a similar image is minimized, while the distance to dissimilar images is maximized, effectively preserving relative similarity in the binary space.

Experimental Evaluation

The FPH model was evaluated on three benchmark fine-grained datasets: CUB-200-2011 (birds), Stanford Dogs, and Oxford Flower-17. These datasets are characterized by low inter-class variance and high intra-class variance.

Key Results

FPH consistently outperformed state-of-the-art baselines, including DTH, DSH, and HashNet, across various bit lengths (16 to 64 bits).

  • CUB-200-2011: Achieved a Mean Average Precision (MAP) of 0.5169 at 16 bits, outperforming the next best model (DTH) by over 5%.
  • Stanford Dogs: Demonstrated a relative MAP improvement of 8.4% to 16.6% over competing methods.

The results confirm that explicitly incorporating low-level features from earlier network stages provides a significant advantage for fine-grained retrieval tasks without sacrificing the efficiency of binary hashing.

Conclusion

Feature Pyramid Hashing introduces a robust architecture for capturing the subtle details required for fine-grained image retrieval. By leveraging a dual-pyramid structure and a consensus-based fusion mechanism, the model generates highly discriminative hash codes. Future work may explore the integration of more advanced backbones, such as Vision Transformers, and sophisticated hard-negative mining techniques to further enhance performance.

Summary updated

BibTeX
@inproceedings{yang2019feature,
  author = {Yifan Yang and Libing Geng and Hanjiang Lai and Yan Pan and Jian Yin},
  title = {{Feature Pyramid Hashing}},
  booktitle = {ICMR},
  year = {2019},
  doi = {10.1145/3323873.3325015},
}
Figure