User Tools

Site Tools


cs501r_f2016:tmp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cs501r_f2016:tmp [2016/11/09 18:19]
wingated
cs501r_f2016:tmp [2016/11/09 18:30]
wingated
Line 19: Line 19:
  
 You should use the [[http://​www.openu.ac.il/​home/​hassner/​data/​lfwa/​|Labeled Faces in the Wild-a]] dataset (also available for  You should use the [[http://​www.openu.ac.il/​home/​hassner/​data/​lfwa/​|Labeled Faces in the Wild-a]] dataset (also available for 
-[[http://​liftothers.org/​byu/​lfwa.tar.gz|download from liftothers]].+[[http://​liftothers.org/​byu/​lfwa.tar.gz|download from liftothers]]).
  
 ---- ----
Line 34: Line 34:
 ====Description:​==== ====Description:​====
  
 +For this lab, you should implement a Siamese network, and train it to recognize whether or not two faces are the same or different.
 +
 +No scaffolding code (except for a simple script for loading the images below) will be provided. ​ The goal of this lab is for you to experiment with implementing an idea end-to-end.
 +
 +The steps for completion of this lab are:
 +
 +  - Load all of the data.  Create a test/​training split.
 +  - Establish a baseline accuracy (ie, if you randomly predict same/​different,​ what accuracy do you achieve?)
 +  - Use tensorflow to create your siamese network.
 +    - Use ResNets to extract features from the images
 +    - Make sure that parameters are shared across both halves of the network!
 +  - Train the network using an optimizer of your choice
 +
 +Note: you will NOT be graded on the accuracy of your final classifier, as long as you make a good faith effort to come up with something that performs reasonably well.
 +
 +Your ResNet should extract a vector of features from each image. ​ Those feature vectors should then be compared to calculate an "​energy";​ that energy should then be input into a contrastive loss function, as discussed in class.
 +
 +Note that some people in the database only have one image. ​ These images are still useful, however (why?), so don't just throw them away.
 +
 +
 +----
 +====Writeup:​====
 +
 +As discussed in the "​Deliverable"​ section, your writeup must include the following:
 +
 +  - A description of your test/​training split
 +  - A description of your resnet architecture (layers, strides, nonlinearities,​ etc.)
 +  - How you assessed whether or not your architecture was working
 +  - The final performance of your classifier
 +
 +This writeup should be small - between 1/2 - 1 page.  You don't need to wax eloquent.
 +
 +----
 +====Hints:​====
 +
 +To help you get started, here's a simple script that will load all of the images and calculate labels. ​ It assumes that the face database has been unpacked in the current directory, and that there exists a file called ''​list.txt''​ that was generated with the following command:
 +
 +<code bash>
 +find ./lfw2/ -name \*.jpg > list.txt
 +</​code>​
 +
 +After running this code, the data will in the ''​data''​ tensor, and the labels will be in the ''​labels''​ tensor:
  
 <code python> <code python>
cs501r_f2016/tmp.txt ยท Last modified: 2021/06/30 23:42 (external edit)