Skip to content

Instantly share code, notes, and snippets.

Avatar

Tejus Gupta tejus-gupta

View GitHub Profile
@tejus-gupta
tejus-gupta / summary.md
Last active Dec 12, 2019
Google Summer of Code - 2017
View summary.md

Project Abstract

I proposed to

  1. Add a package for image segmentation as part of JuliaImages with several algorithms -
  • Thresholding - Otsu’s method and Adaptive thresholding
  • K-means clustering
  • Mean shift segmentation
  • Watershed segmentation
  • Felzenszwalb's efficient region merging algorithm
  • Shi and Malik’s normalized graph-cut based segmentation
@tejus-gupta
tejus-gupta / detection.md
Created Aug 26, 2017
Object Detection Tutorial
View detection.md

In this tutorial, we will use Histogram of Oriented Gradient (HOG) feature descriptor based linear SVM to create a person detector. We will first create a person classifier and then use this classifier with a sliding window to identify and localize people in an image.

The key challenge in creating a classifier is that it needs to work with variations in illumination, pose and oclussions in the image. To achieve this, we will train the classifier on an intermediate representation of the image instead of the pixel-based representation. Our ideal representation (commonly called feature vector) captures information which is useful for classification but is invariant to to small changes in illumination and oclussions. HOG descriptor is a gradient-based representation which is invariant to local geometric and photometric changes (i.e. shape and illumination changes) and so is a good choice for our problem. Infact HOG descriptor are widely used for object detection.

We will use [this data](//Add link) for training

View median.jl
function median_filter{T, N}(img::AbstractArray{T, N}, window::NTuple{N, Int})
all(isodd(w) for w in window) || error("entries in window must be odd, got $window")
R = CartesianRange(size(img))
half_window = map(w->w>>1, window)
Rinner = CartesianRange(first(R)+CartesianIndex(half_window), last(R)-CartesianIndex(half_window))
for i in Rinner
if i[1] = first(Rinner)[1]