To view this file in your browser, visit this link.
You are provided a set of images. These images may belong to either of these classes:
-
Portraits or faces of people. The object in focus is a person or several people.
-
Images of landscapes, mountains, city skylines, buildings, monuments, etc.
Your task: Build a model to identify the two classes of images as 'face' or 'place' respectively.
You have a directory of images, images/
, which contains all of the .jpg images in the train and test set. In case you don't have this directory, the zip file can be downloaded here.
-
gt_train.pkl
is a Python pickle file containing the images and ground-truth labels in the training set. It contains a dictionary where the keys is the base filename of an image (e.g.,img_792.jpg
) and the corresponding values are binary numbers (0 or 1) where 0 = place and 1 = face. -
gt_test.pkl
is a Python pickle file containing the images and ground-truth labels in the test set. It is organized in the same fashion as the training set. Due to the brevity of this interview, you will be able to evaluate your model on the test set right away.
starter.py
contains some code to train and evaluate a basic model. It will run right away. Check out the main method: frommain()
, you can run eithertrain_model()
ortest_model(<WEIGHTS_FILE>)
to train or test a model, respectively, whereWEIGHTS_FILE
is a Keras.hdf5
saved model.
You are welcome to use the starter code starter.py
-- however, it contains many errors! (Not syntax errors or things inherently designed to trip you up, but rather mistakes that a naive AI practitioner might implement). If you would prefer to start afresh, you may disregard the starter code. There are no pre-trained models contained in the starter code. Just make sure to include all of your code in the places-or-faces/
directory.
You will have access to a GPU for training and running your models (if you wish to use it). The Alienware laptop has one GTX 1080 GPU on it. Run the command nvidia-smi
to view the available GPU.
Our GPUs have TensorFlow, Keras, and scikit-learn installed already (and libraries like NumPy, SciPy, etc). You may download other libraries using a virtual environment, if needed. TensorFlow and Keras are set up to automatically use the GPU.
Please feel free to look up anything online, just document your sources if you use others' code. There is no need to cite documentation.
In this line, transfer learning from pre-trained models is allowed.
- Your code, written in
starter.py
or elsewhere. - Accuracy scores on the training/validation set and test set
- A simple bullet point list of (1) things you implemented and (2) things you would like to try, given more time.