Monthly Archives: March 2014

Convolutional Neural Networks

WHAT IS CNN A Convolutional Neural Network (CNN) is comprised of one or more convolutional layers, pooling layers and then followed by one or more fully connected layers as in a standard neural network. The architecture of a CNN is designed to take advantage of the 2D structure of an input image (or other 2D input […]

Posted in Algorithm, Machine Learning, OpenCV | Tagged , , , , | 41 Responses

A Fake Convolutional Neural Network

This is the early version of my CNN, at that time, I incorrectly thought that I can just use some randomly chosen Gabor filters to do the convolution, so I wrote this.  Actually, the test result is not bad for simple datasets such as MNIST, I think it’s just a fake CNN, but a nice […]

Posted in Algorithm, Machine Learning | Tagged , | 4 Responses

A Simple Deep Network

During this spring break, I worked on building a simple deep network, which has two parts, sparse autoencoder and softmax regression. The method is exactly the same as the “Building Deep Networks for Classification” part in UFLDL tutorial. For better understanding it, I re-implemented it using C++ and OpenCV.  GENERAL OUTLINE Read dataset (including training data […]

Posted in Algorithm, Machine Learning, OpenCV | Tagged , , , , , , , , | 37 Responses

[UFLDL Exercise] Convolution and Pooling

I’m learning Prof. Andrew Ng’s Unsupervised Feature Learning and Deep Learning tutorial, This is the 8th exercise, which is a simple ConvNet with Pooling process. I’ll not go through the detail of the material. More details about this exercise can be found HERE. I’ll try to implement it using C++ and OpenCV if I have time next week.

Posted in Algorithm, Machine Learning | Tagged , , , , , | 1 Response

Poisson Blending II

I re-wrote the Poisson Blending code using C++ and OpenCV. About the Algorithm, see my Previous Poisson Blending post. This time, I just used the most stupid way, just solving the Poisson Equation. You can improve it by using advanced methods. About solving discrete Poisson Equation using Jacobi, SOR, Conjugate Gradients, and FFT, read THIS.   In […]

Posted in Algorithm, Maths, OpenCV | Tagged , , , , | 16 Responses

Softmax Regression (with OpenCV)

This is the same algorithm with the previous SOFTMAX REGRESSION post. Because I’m going to try to build deeper neural networks for images, so as a review of OpenCV programming, I rewrote the Softmax regression code using OpenCV mat, instead of Armadillo. I used Matlab, Octave, Armadillo a lot these days, it is kind of […]

Posted in Algorithm, Machine Learning, OpenCV | Tagged , , , , | 3 Responses

[UFLDL Exercise] Implement deep networks for digit classification

I’m learning Prof. Andrew Ng’s Unsupervised Feature Learning and Deep Learning tutorial, This is the 6th exercise, which is a combination of Sparse Autoencoder and Softmax regression algorithm, and fine-tuning algorithm. It builds a 2-hidden layers sparse autoencoder net and one layer Softmax regression, we first train this network layer by layer, from left to right, then […]

Posted in Algorithm, Machine Learning | Tagged , , , , , , , | 3 Responses

C++ code for reading MNIST dataset

Here’s a code for reading MNIST dataset in C++, the dataset can be found HERE, and the file format is as well. Using this code, you can read MNIST dataset into a double vector, or an OpenCV Mat, or Armadillo mat. Feel free to use it for any purpose. (part of this code is stolen from […]

Posted in Machine Learning, OpenCV | Tagged , , , , | 5 Responses

[UFLDL Exercise] Self-Taught Learning

I’m learning Prof. Andrew Ng’s Unsupervised Feature Learning and Deep Learning tutorial, This is the 5th exercise, which is a combination of Sparse Autoencoder and Softmax regression algorithm. It uses the features trained by sparse autoencoder as training input of Softmax regression, and builds a classifier which have more accuracy than regular softmax regression. I’ll not go through […]

Posted in Algorithm, Machine Learning | Tagged , , , , | 2 Responses