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:
- Color Features: Utilizing block color moments to capture spatial distribution by dividing the image into segments.
- 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.
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.
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