An efficient deep learning hashing neural network for mobile visual search

Heng Qi, Wu Liu, Liang Liu

Abstract

Mobile visual search requires high-accuracy image retrieval within strict hardware constraints. This paper presents a lightweight deep learning hashing network that integrates a hash-like latent layer into the MobileNet architecture. By leveraging depthwise separable convolutions, the model achieves state-of-the-art retrieval accuracy with a memory footprint of only 13 MB, enabling efficient on-device visual search for smartphones.

Introduction

Mobile visual search applications, such as landmark recognition and product search, are increasingly popular. However, deploying deep learning models for these tasks on mobile devices is challenging due to limited memory, computational power, and network bandwidth. To address these constraints, hashing techniques are used to compress images into compact binary codes, facilitating faster search and reduced data transmission.

While traditional hashing methods using handcrafted features often lack accuracy, recent deep learning-based hashing models provide high precision but are typically based on heavy architectures like VGG or AlexNet. These models can require hundreds of megabytes of memory, making them impractical for edge devices. This research bridges the gap by proposing a supervised deep hashing network built on the efficient MobileNet backbone.

Methods

The core of the proposed architecture is the MobileNet backbone, which replaces standard convolutions with depthwise separable convolutions. This approach decomposes a standard convolution into a depthwise convolution (applying a single filter per input channel) and a pointwise convolution (a 1x1 convolution to combine the outputs). This factorization significantly reduces computational costs—by a factor of 8 to 9—with only a minor impact on accuracy.

Overview of the proposed hashing network architecture based on MobileNet, featuring depthwise separable convolutions and a latent hash layer.

To generate binary hash codes, the authors introduce a latent hash layer ($H$) with $K$ units, positioned just before the final classification layer. During training, a sigmoid activation function is used to constrain the outputs between 0 and 1. For inference, a sign function thresholds these values into discrete binary codes. The network is trained end-to-end using semantic labels, forcing the latent layer to act as a bottleneck that captures essential semantic features in a compact format.

Datasets and Evaluation

The MobileNet backbone was initialized with weights pre-trained on the ImageNet dataset, which contains 14 million images across 1,000 classes. The hashing performance was then evaluated on a specific mobile location recognition dataset consisting of 8,062 images from 162 distinct locations. This dataset reflects the real-world challenges of mobile visual search, including varying lighting conditions and perspectives.

Key Insights

  • Efficiency and Stability: Contrary to the trend of increasing model complexity for better accuracy, this work shows that optimized, mobile-first architectures can provide more stable and effective representations for specific tasks like hashing.
  • Joint Semantic Learning: By embedding the hash layer within the classification pipeline, the model learns features and hashing functions simultaneously. This ensures that the resulting binary codes are semantically meaningful, where similar images result in similar hash codes.
  • High Performance with Short Codes: The architecture's ability to learn robust representations allows it to achieve high accuracy even with very short (16-bit) hash codes, outperforming traditional methods that use much longer bitstrings.

Key Results

The proposed method demonstrates significant improvements over existing deep hashing baselines. It achieved a Mean Average Precision (MAP) of 96.66% for 16-bit codes, rising to 97.80% for 64-bit codes.

Comparison of Mean Average Precision (MAP) across different hashing bit lengths, showing the proposed method's superior performance.

Compared to other deep learning hashing methods like SSDH (92.43% at 64-bit) and DLBH (87.15% at 64-bit), the proposed model offers a substantial performance boost. Crucially, the model size is reduced to just 13 MB, compared to the 230+ MB required by competing deep models. This 18x reduction in memory demand makes high-performance visual search feasible on standard smartphones.

Conclusion and Future Work

This paper successfully demonstrates a lightweight yet powerful deep hashing network for mobile environments. By combining the efficiency of MobileNet with a supervised latent hash layer, the authors achieved state-of-the-art results with minimal resource requirements. While the current evaluation is focused on location recognition, future research could explore the generalizability of this architecture to larger-scale datasets and diverse tasks such as fine-grained product retrieval or facial recognition.

Summary updated

BibTeX
@inproceedings{qi2017efficient,
  author = {Heng Qi and Wu Liu and Liang Liu},
  title = {{An efficient deep learning hashing neural network for mobile visual search}},
  booktitle = {GlobalSIP},
  year = {2017},
  url = {https://openreview.net/forum?id=7RqXAZ2Q3T},
}
Figure