Showing posts with label Computer Vision. Show all posts
Showing posts with label Computer Vision. Show all posts
Oct 21, 2017
Apr 17, 2017
Deep Residual Network (ResNet)
Main idea:
The central idea of the paper itself is simple and elegant. They take a standard feed-forward ConvNet and add skip connections that bypass (or shortcut) a few convolution layers at a time. Each bypass gives rise to a residual block in which the convolution layers predict a residual that is added to the block's input tensor.
Reference
Although, Deep feed-forward conv nets tend to suffer from optimization difficulty (high training and high validation error). The residual network architecture solves this by adding shortcut connections that are summed with the output of the convolution layers.
Observations:
The central idea of the paper itself is simple and elegant. They take a standard feed-forward ConvNet and add skip connections that bypass (or shortcut) a few convolution layers at a time. Each bypass gives rise to a residual block in which the convolution layers predict a residual that is added to the block's input tensor.
Reference
Although, Deep feed-forward conv nets tend to suffer from optimization difficulty (high training and high validation error). The residual network architecture solves this by adding shortcut connections that are summed with the output of the convolution layers.
Observations:
- add the previous conv output 'x' (as residual) to the next output
- H(x) = F(x)+x
- = F(x)+Ix // multiplication with identity I-called identity mapping
- If x is sufficient then F(.) will learn to weight the filters to zero. Otherwise learn to adjust weights to get optimal value.
- Simply adding series of conv layers has large training error. 56-layer net has higher training error and test error than 20-layer net "Overly deep" plain nets have higher training error
- Very simple design (series of fixed 3x3 conv layers)
- Shortcut mapping is identity then forward pass additively propagates and Loss additively passes back as gradient (as opposed to multiplicative gradient propagation in other case)
- what if shortcut mapping ℎ ≠ identity?
- eg, conv(), xor, multiply with 0.5 etc increases the error
- Keep the shortest path as smooth as possible by
- using identity
- forward/backward signals directly flow through this path
- More on ResNet details
- Update (09/25/21): another good ResNet tutorial
Apr 13, 2017
Sep 28, 2016
Oct 21, 2015
Inference algorithms in Graphical Model
Inference algorithms in undirected graphical model or markov random field categories:
- Propagation based
- Loopy belief propagation
- Variational method based (approximate not exact)
- Mean field
- Advantage
- Intuition is that complex graphs can be probabilistically simple; in particular, in graphs with dense connectivity there are averaging phenomena that can come into play, rendering nodes relatively insensitive to particular settings of values of their neighbors. This average phenomena leads to simple inference algorithm.
- Monte Carlo method based
- Gibbs sampling based
- Advantage
- simple to implement
- theoretical guarantee to converge
- Disadvantage
- slow to converge
- hard to diagnose
- Exact inference by the Junction-Tree algorithm (Lauritzen and Spiegelhalter, 1988)
- Loopy Belief Propagation (Pearl, 1988)
- Generalized Belief Propagation (Yedidia et al., 2005)
- Tree Re-weighted Belief Propagation (Wainwright et al., 2005)
- Propagation based on convexification of the Bethe free energy (Meshiet al., 2009).
- Mean field (Jordan et al., 1998)
- Gibbs sampling (Geman and Geman, 1984)
Sep 1, 2014
Apr 13, 2014
Oct 15, 2013
OpenCV goodies
- Set new window position:
cvMoveWindow("image", 10, 50);- write/read xml/yml using FileStorage:
- Read:
FileStorage storage("test.xml", FileStorage::READ); storage["depth_1"] >> img; storage.release(); - write:
FileStorage storage("test.yml", FileStorage::WRITE); storage << "img" << img; storage.release(); - release previous image content:
cvReleaseImage(&images[i]);- matrix type conversion:
cv::Mat A = loadMat("mymat.xml"); A.convertTo(A, CV_32FC1); // or CV_64FC1
Oct 14, 2013
Sep 27, 2013
Object category variations
Highly textured: Grass, trees, water waves.
Highly structured: Cars, Building, Faces.
Highly Articulated: Cow, Body.
Highly structured: Cars, Building, Faces.
Highly Articulated: Cow, Body.
Sep 26, 2013
Sep 18, 2013
Sep 1, 2013
Aug 27, 2013
Jul 19, 2013
Standardize the data
%% standardize the data
numDsc = size(X,1);
fprintf('numDsc = %d\n',numDsc);
meanData = mean(X); % column-wise mean
meanDuplicate = meanData(ones(1,numDsc), :); % replicate
normData = X - meanDuplicate;
stdData = std(X); % column-wise std
stdData(stdData == 0) = 1; % if standard deviation is 0, set to 1 to avoid zero-denominator problems in normalization
stdDuplicate = stdData(ones(1,numDsc), :); % replicate
normData = normData ./stdDuplicate;
numDsc = size(X,1);
fprintf('numDsc = %d\n',numDsc);
meanData = mean(X); % column-wise mean
meanDuplicate = meanData(ones(1,numDsc), :); % replicate
normData = X - meanDuplicate;
stdData = std(X); % column-wise std
stdData(stdData == 0) = 1; % if standard deviation is 0, set to 1 to avoid zero-denominator problems in normalization
stdDuplicate = stdData(ones(1,numDsc), :); % replicate
normData = normData ./stdDuplicate;
Jun 26, 2013
CVPR-2013
Sunday 23rd June:
SUN: Scene Understanding workshop.
Poster Sessions:
Social activity:
Monday 24th June:
Attribute Tutorial:
Tuesday 25th June:
Oral followed by Poster session (Morning):
Poster session (Afternoon):
Social activity:
Wednesday 26th June:
Poster session (Morning):
Oral session (Afternoon):
Social activity:
SUN: Scene Understanding workshop.
Poster Sessions:
Social activity:
Monday 24th June:
Attribute Tutorial:
Tuesday 25th June:
Oral followed by Poster session (Morning):
Poster session (Afternoon):
Social activity:
Wednesday 26th June:
Poster session (Morning):
Oral session (Afternoon):
Social activity:
Jun 17, 2013
May 21, 2013
Mar 26, 2013
Mean shift clustering (non parametric approach of finding modes of distribution)
For each data point, Mean shift associates it with
the nearby peak of the dataset’s probability density function. For each
data point, Mean shift defines a window around it and computes the mean
of the data point. Then it shifts the center of the window to the mean
and repeats the algorithm till it converges. After each iteration, we
can consider that the window shifts to a more denser region of the
dataset.
At the high level, we can specify Mean Shift as follows :
1. Fix a window around each data point.
2. Compute the mean of data within the window.
3. Shift the window to the mean and repeat till convergence.
Mean shift treats the points the feature space as an probability density function . Dense regions in feature space corresponds to local maxima or modes. So for each data point, we perform gradient ascent on the local estimated density until convergence. The stationary points obtained via gradient ascent represent the modes of the density function. All points associated with the same stationary point belong to the same cluster.
1. Even though mean shift is a non parametric algorithm , it does require the bandwidth parameter h to be tuned. We can use kNN to find out the bandwidth. The choice of bandwidth in influences convergence rate and the number of clusters.
2. Choice of bandwidth parameter h is critical. A large h might result in incorrect clustering and might merge distinct clusters. A very small h might result in too many clusters.
3. When using kNN to determining h, the choice of k influences the value of h. For good results, k has to increase when the dimension of the data increases.
4. Mean shift might not work well in higher dimensions. In higher dimensions , the number of local maxima is pretty high and it might converge to a local optima soon.
mean-shift-clustering
1. Fix a window around each data point.
2. Compute the mean of data within the window.
3. Shift the window to the mean and repeat till convergence.
Mean shift treats the points the feature space as an probability density function . Dense regions in feature space corresponds to local maxima or modes. So for each data point, we perform gradient ascent on the local estimated density until convergence. The stationary points obtained via gradient ascent represent the modes of the density function. All points associated with the same stationary point belong to the same cluster.
1. Even though mean shift is a non parametric algorithm , it does require the bandwidth parameter h to be tuned. We can use kNN to find out the bandwidth. The choice of bandwidth in influences convergence rate and the number of clusters.
2. Choice of bandwidth parameter h is critical. A large h might result in incorrect clustering and might merge distinct clusters. A very small h might result in too many clusters.
3. When using kNN to determining h, the choice of k influences the value of h. For good results, k has to increase when the dimension of the data increases.
4. Mean shift might not work well in higher dimensions. In higher dimensions , the number of local maxima is pretty high and it might converge to a local optima soon.
mean-shift-clustering
Subscribe to:
Posts (Atom)
Notebooks
illuminate.google.com notebooklm.google.com
-
To install pngwrite we need to install to helper library before we install pngwriter. 1. libpng 2. freetype2 We can use fink or macport to i...
-
Unity engine Unreal engine Godot engine



