Midterm 1 (2019)

Assignment Rules and Execution

The first midterm covers the basic pattern recognition techniques introduced up to Lecture 3. To pass the midterm you should

  1. perform one (only one) of the assignments described in the following;
  2. prepare the short presentation describing your results and upload it here by the (strict) deadline;
  3. give your short presentation in front of the class on the midterm date: 

01 April 2019 - h. 13.30-16 Room L1


You can use library functions to perform the analysis (e.g. to do the DFT, to perform ncut clustering, etc.) unless explicitly indicated (e.g. as in Assignment 5). You can use whatever programming language you like, but I strongly suggest to use either Python or Matlab for which you have coding examples.

The midterm presentation MUST take a maximum of 5 minutes and should include a maximum of 5 slides, whose content should cover:

  1. A title slide with the assignment number and your name
  2. A slide with code snippets highlighting the key aspects of your code
  3. Slides showing the results of the analysis
  4. A final slide with your personal considerations (fun things, weak aspects, possible ways to enhance the analysis, etc.).

Don’t waste slides and time to describe the dataset or the assignment you are solving as we will all be already informed on it.

List of Midterm Assignments

Signal processing assignments

All the signal processing assignments require to use the following dataset:

https://archive.ics.uci.edu/ml/datasets/Appliances+energy+prediction#

Assignment 1

Perform an autoregressive analysis of the “Appliances” column of the dataset which measures the energy consumption of appliances across a period of 4.5 months. Fit an autoregressive model on the first 3 months of data and estimate performance on the remaining 1.5 months. Experiment with AR models of order 3, 5 and 7.

Hint: in Python, use the ARIMA class of the statsmodels library (set order=(3,0,0) for an AR of order 3); in Matlab you can use the ar function to fit the model and the forecast function to test.

Assignment 2

Perform a correlation analysis on the temperature data in the dataset (i.e. the columns marked as Ti). It is  sufficient to pick up just one of the 10 sensors and show the cross-correlation plot against the remaining 9 sensors (make a plot for each of the sensors, but try to put 4/5 of them in the same slide in a readable form).

Image processing assignments

All the image processing assignments require to use the following dataset:

http://download.microsoft.com/download/A/1/1/A116CD80-5B79-407E-B5CE-3D5C6ED8B0D5/msrc_objcategimagedatabase_v1.zip

The dataset includes original images as well as their semantic segmentation in 9 object classes (i.e. the image files whose name ends  in “_GT”, where each pixel has a value which is the identifier of the semantic class associated to it).

Assignment 3

Perform image segmentation on one of the eight image thematic subsets. Note that each file has a name starting with a number from 1 to 8, which indicates the thematic subset, followed by the rest of the file name. I suggest to use image subsets “1_*” or “2_*”.  Use the normalized cut algorithm to perform image segmentation. You are welcome to confront the result with kmeans segmentation algorithm if you wish.

Hint: in Python, you have an NCut implementation in the scikit-image library; in Matlab, you can use the original NCut implementation here.

Assignment 4

Select one image from each of the eight thematic subsets (see previous assignment), for a total of 8 images. Extract the SIFT descriptors for the 8 images using the visual feature detector embedded in SIFT to identify the points of interest. Show the resulting points of interest overlapped  on the image. Then provide a confrontation between two SIFT descriptors showing completely different information (e.g. a SIFT descriptor from a face portion Vs a SIFT descriptor from a tree image). The confrontation can be simply visual: for instance you can plot the two SIFT descriptors closeby as barplots (remember that SIFTs are histograms).

Assignment 5

Implement the convolution of a Sobel filter with an image and apply it to one face image and one tree image of your choice from the dataset to obtain edges. You should not use the library functions for performing the convolution or to generate the Sobel filter. Implement your own!