Adaptive Adjustment of Feature Weight Coefficients Based on Genetic Algorithm in Image Retrieval

Zhihui Wang, Xiaoli Ge, Jinlin Li, Qila Sa, Wenbo Xu, Yuejiao Fan, Yiqun Zhao2016 · DOI

Abstract

Content-Based Image Retrieval (CBIR) effectiveness depends heavily on how image features are utilized. This paper proposes an adaptive retrieval algorithm that combines color and texture features, using a Genetic Algorithm (GA) to determine their optimal weight coefficients. By evolving an initial population of potential weight solutions through selection, crossover, and mutation, the system adaptively adjusts weights for each specific query. Experimental results demonstrate that this GA-based approach improves both recall and precision by automatically setting ideal weights tailored to the user's query image.

Introduction

In Content-Based Image Retrieval (CBIR), visual data such as color, texture, and shape are used to find similar images. A common challenge is determining the relative importance of these features. Traditional systems often use fixed weight coefficients, which fail to account for the diverse visual characteristics of different query images. For example, a sunset query might prioritize color, while a textured fabric query should prioritize texture. This paper addresses this limitation by introducing an adaptive weighting mechanism powered by a Genetic Algorithm.

Methodology

The proposed system fuses two primary feature descriptors:

  1. Color Features: Utilizing block color moments to capture spatial distribution by dividing the image into segments.
  2. Texture Features: Employing the Gray Level Co-occurrence Matrix (GLCM) on edge maps generated by a Canny operator to ensure computational efficiency while preserving essential structural information.

Genetic Algorithm Optimization

The core of the algorithm is the dynamic adjustment of weights ($w_c$ for color and $w_t$ for texture) using a GA. The process follows these steps:

  • Encoding: Weights are encoded as 7-bit binary strings.
  • Fitness Evaluation: A fitness function based on precision and recall metrics evaluates the quality of each weight combination.
  • Evolutionary Operations: The population undergoes selection, crossover, and mutation to converge toward the optimal solution for the specific query.
Flowchart of the proposed adaptive image retrieval algorithm based on Genetic Algorithm.

Experimental Results

The algorithm was tested on a subset of the "coral" image library, containing 40 images across four categories: bus, flowers, buildings, and people. The system's performance was compared against a baseline using fixed weights ($w_c = 0.5, w_t = 0.5$).

The GA-tuned system demonstrated superior performance by adapting to the specific query. For a query image featuring people in traditional dress, the GA determined optimal weights of $w_t = 0.77$ and $w_c = 0.23$. This adjustment improved retrieval precision compared to the fixed-weight baseline. While the fixed-weight system mistakenly included multiple irrelevant flower images in the top results, the adaptive system prioritized texture features that better characterized the query image, leading to a more accurate set of results.

Retrieval results using adaptive weights ($W_t=0.77, W_c=0.23$) determined by the Genetic Algorithm.

Conclusion

The integration of a Genetic Algorithm into the CBIR process allows for the automatic and adaptive setting of feature weights. This approach moves beyond static configurations, providing a more flexible and accurate retrieval system that responds to the unique visual properties of every user query. Future work will explore scaling this method to larger datasets and incorporating additional feature types like shape descriptors.

Summary updated

Abstract

It is worth studying that how to utilize image features so as to achieve the satisfied result of CBIR (content-based image retrieval). To solve this problem, this paper proposes an adaptive image retrieval algorithm based on color feature and texture feature, in which the two kinds of features are combined and the weight coefficients of them are determined with genetic algorithm. Genetic algorithm, starting from solving practical problems, constructs an initial population with the potential solutions of practical problems. In the proposed algorithm, firstly, the initial population consisted with the weight coefficients of texture features (or color ones) is randomly generated; then, selection, crossover, and mutation are operated so that each new generation of population is gradually closed to the optimal solution; finally, the adaptively adjusted weight coefficients are obtained. Experimental results show that when fusing color feature and texture feature in image retrieval, the introduction of genetic algorithm, by which determine the weight coefficients of two kinds of features, makes both the recall ration and precision ratio of retrieval are improved. The proposed algorithm of image retrieval combined with genetic algorithm can automatically set the optimal weights of the image features according to the different image to be retrieved submitted by users, and can basically achieve the ideal suitable weights and output the relative ideal retrieval results.
BibTeX
@misc{wang2016adaptive,
  author = {Zhihui Wang and Xiaoli Ge and Jinlin Li and Qila Sa and Wenbo Xu and Yuejiao Fan and Yiqun Zhao},
  title = {{Adaptive Adjustment of Feature Weight Coefficients Based on Genetic Algorithm in Image Retrieval}},
  year = {2016},
  doi = {10.2991/icimm-16.2016.43},
}
Figure