Assignment 3

Since it does not take significantly longer on my computer, all experiments were performed on the set of all images.

In order to get the backpropagation to recognize sunglasses instead of Mr. Glickman, I made the following change to the code:

--- a/imagenet.c
+++ b/imagenet.c
@@ -36,7 +36,7 @@ BPNN *net;
   sscanf(NAME(img), "%[^_]_%[^_]_%[^_]_%[^_]_%d.%[^_]",
     userid, head, expression, eyes, &scale, photo);
 
-  if (!strcmp(userid, "glickman")) {
+  if (!strcmp(eyes, "sunglasses")) {
     net->target[1] = TARGET_HIGH;  /* it's me, set target to HIGH */
   } else {
     net->target[1] = TARGET_LOW;   /* not me, set it to LOW */

The maximum classification accuracies found on the training set, validation set, and test set were 100%, 87.7698%, and 80.6792%, respectively. This was done in 54, 56, and 73 epochs, respectively.

For pose recognition, I had four output nodes, where each output node being high corresponded to looking straight, left, right, or up, in that order. The maximum classification accuracies found on training set, validation set, and test set were 100%, 94.2446%, and 94.75%, respectively. This was done in 36, 48, and 67 epochs, respectively.

I tried using the random weights, but I had difficulty discerning a pattern from the noise. With the zero-initialized network, the weights look like horrible monstrosities from beyond space and time, but that’s just because my internal facial recognition is telling me that I’m looking at things that look like faces, but aren’t. However, this is telling, as there is a clear outline of a face in every node. Hidden nodes 2 and 3 both seem to emphasize the right side of the face. I suspect that those features help a bit with determining left from right. Nodes 1 and 6 look similar, as they’re dark where eyes should be and look like they have a large mouth below that. I suspect that this is good for determining upward-facing shots from straight shots. Node 5 looks like an overlay of a face looking left and a face looking right. I suspect that it can tell if a face is turned horizontally. I’m not sure what node 4 is doing, but it’s seems to be looking at the right cheek and the left side of the neck.

 

Figure 1: Hidden node 1
Figure 2: Hidden node 2
Figure 3: Hidden node 3
Figure 4: Hidden node 4
Figure 5: Hidden node 5
Figure 6: Hidden node 6