Skip to content
Available for internships in development, automation, and infrastructure.Get in touch
RGW.
All projects

CBIR

Academic

Content-based image retrieval.

Year
2026
Role
Academic project
Context
Computer vision

Technologies: Python, NumPy, OpenCV, Matplotlib

Overview

An academic Content-Based Image Retrieval implementation with a simplified HOG descriptor and spatial information. The included dataset has 25 documents across five classes and five queries.

Each document is split into nine regions. For every query, the system automatically selects the largest connected component region and compares its descriptor against the indexed regions.

25 documents across five classes used in the evaluation index.
25 documents across five classes used in the evaluation index.

Pipeline

  1. Images in grayscale, 256 x 256.
  2. Fixed 3 x 3 grid of regions.
  3. Simplified 128-dimension HOG descriptor.
  4. Cosine similarity combined with spatial IoU.
  5. Top-5 ranking per query.
score = 0.8 * cosine_similarity + 0.2 * IoU

Results

These numbers describe only the five included queries and should not be read as a general benchmark. The small dataset demonstrates the pipeline but is not enough to compare approaches with statistical significance.

MetricResult
Top-1 accuracy40%
Recall@560%
MRR0.50
The original_11_6 query and the top-5 ranking by visual similarity; best match at 0.70 similarity.
The original_11_6 query and the top-5 ranking by visual similarity; best match at 0.70 similarity.
The same set ranked by spatial overlap (IoU), which accounts for 20% of the final score.
The same set ranked by spatial overlap (IoU), which accounts for 20% of the final score.