Prev: HW5, Next: HW7 

# Warning: auto-grading is not working at the moment, please wait for an announcement on Canvas.


# A6 Project Submission Checklist

📗 Regular component (out of 5) should be submitted using the "Grade" and "Submit" buttons at the bottom of the page.
➩ Submission of the text file generated by the auto-grader to Canvas Assignment A6 is optional.
➩ Due date: August 9, no submission after that will be accepted.
📗 Competition component (out of 5) text file generated using Question 9 "Generate" button should be submitted to the Canvas Assignment A6C: Link
➩ Submission of an incorrectly formatted text file and any additional files to A6C will result in a competition score of \(-\infty\).
➩ Due date: August 4, no submission after that will be accepted under any circumstances.
📗 Note: Canvas A6 and A6C due date is the recommended due date, early submissions of competitions before the recommended due date will participate in trial competitions with the option to keep the score (not ranking).
📗 Hint: example submissions, discussion session schedules, and group recommendations (very different for different assignments) can be found on Piazza: Link.

# A6 Project Instruction

📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit the "Enter" key)
📗 You can also load from your saved file
and click .
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The same ID should generate the same set of questions. Your answers are not saved when you close the browser. You could either copy and paste or load your program outputs into the text boxes for individual questions or print all your outputs to a single text file and load it using the button at the bottom of the page.
📗 Please do not refresh the page: your answers will not be saved.
📗 You can write the code in any programming language and using any large language models. You do not have to submit your code.
📗 Please report any bugs on Piazza.

# Warning: please enter your ID before you start!


CP


📗 (Introduction) In this project, you will find the eigenfaces for a collection of some emoji faces and use K nearest neighbor to perform face recognition on some blurry or noisy versions of these emoji faces. Story: you are a detective working on murder cases and you have the images of a large collection of suspects and blurry images of the criminals. Your task is to build a tool to find the criminals as fast as possible.

📗 (Part 1) Perform principal component analysis (PCA) to compute the eigenvalues and eigenvectors of the emoji face images. The eigenvectors are the eigenfaces when reshaped back into the original image dimensions.

📗 (Part 2) Implement K nearest neighbor to find the emoji that is the closest to a blurry emoji face in the PCA feature space.

For Part 1 and Part 2, you will use the following emojis.


Emoji name: - 

Pixel intensities (32 x 32):


Warning: some emojis look different on different browsers, please use the training set below for Part 1 and Part 2:


📗 (Competition) Submit your eigenfaces and your favorite suspects (select emoji faces). The most popular suspects will be used as the test case. Your score is computed based on the number of eigenfaces you picked and the accuracy of the detection.

You can participate in one of five groups:

➩ The people group:



➩ The animal group:



➩ The food group:



➩ The travel group:



➩ The object group:



Given \(n\) emojis in each group, suppose you submitted \(k\) eigenfaces \(p_{1}, p_{2}, ..., p_{k}\) in a group with average number of eigenfaces \(\overline{k}\) and the top 5 voted emojis are \(f_{1}, f_{2}, ..., f_{5}\) with corresponding clean images \(x_{1}, x_{2}, ..., x_{5}\) and noisy images \(y_{1}, y_{2}, ..., y_{5}\) (after subtracting the training set means). Let \(r_{i}\left(y\right)\) be the ranking in terms of \(L_{1}\) distances between \(y\) and \(\begin{bmatrix} p^\top_{1} x_{i} \\ p^\top_{2} x_{i} \\ ... \\ p^\top_{k} x_{i} \end{bmatrix}\) within the set \(\left\{\begin{bmatrix} p^\top_{1} x_{j} \\ p_{2^\top} x_{j} \\ ... \\ p_{k^\top} x_{j} \end{bmatrix} \right\}_{j=1}^{n}\), then your score is,
➩ \(\displaystyle\sum_{i=1}^{5} -r_{i}\left(\begin{bmatrix} p^\top_{1} y_{i} \\ p^\top_{2} y_{i} \\ ... \\ p^\top_{k} y_{i} \end{bmatrix} \right) - \dfrac{k - \overline{k}}{n}\)
that is,
➩ If all nearest neighbor predictions are correct, which would likely happen if you (and all your group members) pick \(k = m\), your score will be \(-5\).
➩ If you join a group that uses a smaller number of eigenfaces on average, it will be harder to get a high score.

Your project grade is based on your submission to this assignment (out of 5) plus your ranking in the class (out of 5):
Top 20% gets 5/5.
Next 20% gets 4/5.
Next 20% gets 3/5.
Next 20% gets 2/5.
Next 20% gets 1/5.
(The students who do not participate in the competition will be given scores of negative infinities when computing the rankings).

# Competition Simulator [DO NOT USE FOR TESTING]



Item: out of 10
Test items:

Submissions:

Leader board:
Team:

# Question 1 (Part 1)

📗 [2 points] Enter the first \(k\) axes directions as unit vectors (\(k\) lines, each line containing 1024 numbers, comma-separated).
Hint




Plot the images:


# Question 2 (Part 1)

📗 [10 points] Enter projected lengths of the \(n\) images provided in the instructions onto the first \(k\) axes directions (\(n\) lines, each line containing \(k\) numbers, comma-separated, rounded to 4 decimal places).
Hint




# Question 3 (Part 1)

📗 [10 points] Enter the reconstructed images based on the projected lengths from the previous question (\(n\) lines, each line containing 1024 numbers, comma-separated, rounded to 4 decimal places).
Hint




Plot the images:


# Question 4 (Part 1)

📗 [10 points] Enter the first \(k\) principal component directions as unit vectors (\(k\) lines, each line containing 784 numbers, comma-separated, rounded to 4 decimal places).
Hint




Plot the images:


# Question 5 (Part 1)

📗 [2 points] Enter projected lengths of the \(n\) images provided in the instructions onto the first \(k\) principal component directions (\(n\) lines, each line containing \(k\) numbers, comma-separated, rounded to 4 decimal places). These are your PCA features.
Hint




# Question 6 (Part 1)

📗 [10 points] Enter the reconstructed images based on the PCA features from the previous question (\(n\) lines, each line containing 1025 numbers, comma-separated, rounded to 4 decimal places).
Hint




Plot the images:


# Question 7 (Part 2)

📗 [10 points] Compute the \(k\) PCA features for all images in your training set, and enter the \(k\) PCA features of the 1 nearest neighbors for each of the \(n\) images in the training set (\(n\) lines, each line containing \(k\) numbers, comma-separated, rounded to 4 decimal places).
Hint




# Question 8 (Part 2)

📗 [2 points] Enter the reconstructed images based on the PCA features from the previous question (\(n\) lines, each line containing 784 numbers, comma-separated, rounded to 4 decimal places).
Hint




Plot the images:


# Question 9 (Competition)

📗 [1 points] Please use the following form to generate a text file:
➩ Wisc Net ID (the ??? in ???@wisc.edu):
➩ Group:
➩ Player Icon (text from this icon):
➩ Player ID (a number between 0 and 9999):
➩ Network First (see net):

➩ Network Second:


➩ Output file:

📗 Every student must perform training independently and submit different trained networks.
📗 Submit this file on Canvas to Assignment A?C.
📗 To get the point to this question, please check this box if you submitted the file on Canvas or decided not to participate in the competition:

# Question 10

📗 [1 points] Please list the AI tools and references you used and the names of other students and course staff you discussed the assignment or competition with. Please also enter any comments and suggestions including possible mistakes and bugs with the questions and the auto-grading. If you completed the assignment without any help (not recommended), please enter "None" and do not leave this question blank.
📗 Answer: .

# Grade


 * * * *

 * * * * *
📗 Grading may take around 5 to 10 seconds. Please be patient and do not click "Grade" multiple times.

# Submission

 
📗 Please do not modify the content in the above text field: use the "Grade" button to update.


📗 You could submit multiple times (but please do not submit too often): only the latest submission will be counted. 
📗 Please also save the text in the above text box to a file using the button or copy and paste it into a file yourself .
📗 You could load your answers from the text (or txt file) in the text box below using the button . The first two lines should be "##a: 6" and "##id: your id", and the format of the remaining lines should be "##1: your answer to question 1" newline "##2: your answer to question 2", etc. Please make sure that your answers are loaded correctly before submitting them.



📗 Saving and loading may take around 5 to 10 seconds. Please be patient and do not click "Load" multiple times.

# Presentations and Interviews

📗 Presentations and interviews are optional for the competitions.
📗 If your competition grade is 2, 3, or 4, you can book an interview with the TA for 15 to 30 minutes.
📗 Interviews can only be booked during discussion sessions on Zoom (either during the current discussion session or for a future date and time): Link. Please do not email/spam the TA.
📗 A maximum of 3 interviews can be booked per person, and in the case you need 1 point for the next letter grade, we will allow a 4th one after the final exam.
📗 During the interviews, you will give a 5 to 10 minutes presentation to explain anything you did on the project that is creative or technically challenging. Then you will answer three technical questions about your presentation or any materials related to the assignment.
➩ If you answer any one of the three questions incorrectly, you will get \(-1\).
➩ If you answer all questions correctly, and if your presentation ideas are correct, interesting, consistent with your submissions, and not done by many other students (we will make the decision after all interviews are done), you will get \(+1\). 
➩ Otherwise, your grade will not change.





Last Updated: June 26, 2026 at 3:06 AM