Giter Site home page Giter Site logo

bag-of-words-with-template-matching-for-image-classification's Introduction

Bag-of-Words-with-Template-Matching-for-Image-Classification

Overview

This project focuses on the implementation of Template Matching and Bag of Visual Words techniques in image processing. The main objective is to apply these techniques for pattern recognition in a set of images.

Task 1: Template Matching

Objective

  • Implement a custom function for template matching.
  • Compare results with built-in functions.
  • Investigate the effect of different scales.

Steps

  1. Download Images and Visual Words

    • Get the images from images.zip.
    • Download visual words from words.zip.
  2. Implement Template Matching

    • Develop a custom function for template matching.
    • Use Normalized Cross-Correlation (NCC) to compute similarity.
  3. Result Analysis

    • Identify the best fit location using the highest NCC value.
    • Analyze how different scales affect the results.
  4. Visualization

    • Plot four examples where the template is successfully found.
    • Highlight the template position with a bounding box.

Task 2: Bag of Visual Words

Objective

  • Use template matching to compute association strength between visual words and images.
  • Implement k-nearest neighbors (kNN) for image classification.

Steps

  1. Feature Vector Computation

    • Develop a function to return a feature vector for an image.
    • Each vector has 6 values representing the highest NCC for each visual word.
  2. Feature Vector Analysis

    • Compute feature vectors for all 6 images.
    • Plot these vectors: x-axis for visual word index, y-axis for NCC value.
  3. kNN Implementation and Classification

    • Implement the kNN algorithm with k=3.
    • Classify test images based on majority voting procedure.
  4. Classification of Test Images

    • Use images 1 to 4 as training samples.
    • Run kNN on test images 5 and 6.
    • Plot the results with the predicted class.

bag-of-words-with-template-matching-for-image-classification's People

Contributors

midhun-kanadan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.