Starting from:
$28

$19.60

SOLVED (ECSE 415) Assignment 3: Classifiers, Object Recognition

1 CIFIAR10 Classification using SVM and Random Forest (50 points) In this section, we will ask you to train Classifiers on the CIFIAR10 dataset. The CIFIAR10 dataset contains 60000 32x32 images. Ten classes are included, with 6000 images per class in it. Further information can be found on the dataset webpage https://www.cs.toronto.edu/ kriz/cifar.html. GPU is highly recommended for running code in this section. 1. Resize the train/test images to 64x64 and convert them to grayscale images. Compute HoG features with cells of 8x8 pixels, blocks of 4x4 cells, and 4 bins. This should generate a feature vector of size 1600 per image, which can be regarded as features for training classifiers. 2. Fit a non-linear SVM classifier with default hyperparameters on the features and the class features of the training images. 3. Predict labels of the test images by feeding the test features to the trained classifier and calculate classification accuracy. 4. Tune values of hyperparameters ’gamma’ and ’C’ to observe the accuracy change and select the hyperparameters with the highest test accuracy. Display your fine-tuning process by listing all the test cases with their parameter and corresponding accuracy. 5. Fit a Random Forest(RF) classifier (set n_estimators=10, max_depth=5, and criterion=’entropy’) on the features and the class labels of the training images. 6. Predict labels of the test images by feeding the test features to the trained classifier and calculate classification accuracy. 7. Compare the performance of SVM and RF. Experiment training both classifiers with a range of random states(different values for random_state). Evaluate the stability within the random state. List the strengths and weaknesses of each model. 2 Face Detection (50 points) In this section, you will work on face detection. To achieve this purpose, you are required to compute EigenFaces and use the Viola-Jones detector to identify faces. We have provided a subset from CelebA(1) face dataset under the folder Q2 part1. The subset contains 100 color images. Figure 1: Sample images from CelebA dataset. 1. Read this subset into the code environment and convert all images into grayscale. 2. Implement the Snapshot method for PCA (covered in Lecture 8, Slide 55) from scratch using Numpy. Display the first five face images. 2 3. Use a sliding window method to detect faces in the image??, which is named Person.png under folder Q2 part2. Use the result from the previous step to compute the distance in the eignspace between the window contents and your training data. 4. Set a threshold to detect faces and select the best-performed value. Show your fine-tuned process. 5. Label the detected images with bound boxes and display the final result image with labels. 6. Use an existing implementation of the Viola-Jones face detector to detect faces on the same image. Compare the result with the method you implemented. 7. Evaluate your predicted result in both methods(True/False, Positive/Negative). 8. Explain under what conditions the Viola-Jones detector works when PCA does not. Figure 2: Face Detection on Multi-person image. 9. Evaluate the performance of this model and explain the steps that this network took to achieve the final result. References [1] LIU, Z., LUO, P., WANG, X., AND TANG, X. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV)