Prev: W3 ; Next: W5
Lecture Note
* SlidesLecture 7: Slides, With Quiz
Lecture 8: Link
Annotated Lecture 7 Section 1: Slides
Annotated Week 4 Section 2: Part I, Part II
* Websites
Conv Net on MNIST: Link
Conv Net Vis: Link, Open in FireFox
LeNet: Link
Image Filter: Link
Canny Edge Detection: Link
* Paper References
SIFT: PDF
HOG: PDF
LeNet: PDF
Google Inception Net: PDF
* YouTube videos
How to find the HOG features? Link
How to count the number of weights for training for a convolutional neural network (LeNet)? Link
Example (Quiz): How to find the 2D convolution between two matrices? Link
Example (Homework): How to find a discrete approximate Gausian filter? Link
Written (Math) Problems
Submit on Canvas: PDFProgramming Problem
* Short Instruction(1) Download the images from the list of Faculty of the CS department based on your wisc ID. (Right click the page, not the images, save as ..., select Webpage, Complete (*.htm, *.html) You can download an extra one you like to experiment on.
Type in your ID:
Download the images of the following faculty members:
(2) All images are 150 x 150, compute the pixel intensities as in the homework 2 (you can keep them as integers between 0 and 255), and store the grayscale images.
(3) Compute HOG feature descriptors for the image: use 10 x 10 cells, 1 x 1 blocks, and 8 bins.
* Files to submit
(1) hog.png or hog.jpg etc shows the feature descriptors of one of the images.
(2) output.txt contains the flattened hog feature vectors of the 6 images, one image (or 15 x 15 x 8 numbers) per line, comma separated.
(3) comments.txt contains information on how to run your program, in particular, the names of the data files are required.
(4) code.
* Things to try
(1) (Not required) Try smoothing with different Gaussian filters and compare the results. In particular, compare the results from the derivative filter and the Sobel filter.
(2) (Not required) Try different number of bins besides 8. Please submit the version with 8 bins.
(3) (Not required) Try 2 x 2 blocks to normalized the gradient magnitudes, it should yield better features. See the HOG paper for details.
(4) Make sure the feature vectors look like the one in the following example. You can write your own code to create the image or use the canvas below the image.
Input the number of cells (height x width): x
Input the number of bins:
Input the histogram values (comma seperated, all positive, right click to save the png image file):
The first canvas shows the correct version with opposite directions put in the same bin. The second canvas shows the incorrect version (due to my mistake in the hint file) with opposite directions in different bins.
More (nonessential) details and hints: PDF.
* TAs' Solution
(1) Java: Link written by Ainur
(2) Python: Link written by Dandi
Important note: You are not allowed to copy any code from the solution. MOSS will be used check for code similarity: changing just variable names and the spacing etc is still considered cheating. You can read and learn what the solution is doing but you MUST write all code yourself. The deadline for resubmission without 50 percent penalty is July 7.
Last Updated: July 01, 2019 at 7:07 PM