Homework 8

This homework focuses on a simple image generation task. You’ll use the new tux dataset and design a model to upsample images. In contrast to regular upsampling you’ll also be given a label map of tux you can use in your network. Try to keep your model compact (less than 100k parameters) during prototyping, as it makes training faster. Your final model can be a bit larger (500k+).

starter code data

Image upsampling

Design a network similar to HW7 taking a full resolution label map and a low resolution image as input. Your output should be a high resolution image. Unlike HW7 you don’t have to deal with class imbalance much, and can use a simple L1 loss.

Once you have specified the network, train it. The code will measure L1 loss as you train the model.

Input example

Output example

Visualization example


We will have a linear grading scheme depending on your test L1 score (loss):

L1=14: 0 points
L1=9: 100 points

Note, bilinear upsampling achieves an L1 score of 14. Extra credit

L1=8: +5 points
L1=7: +5 points
L1=6: +5 points
L1=5: +5 points

Getting Started

We provide you with starter code that loads the image dataset and the corresponding labels from a training and validation set. The starter code also produces the low resolution image. We also provide an optional tensorboard interface.

  1. Define your model in models.py and modify the training code in train.py.
  2. Train your model.
     python3 -m homework.train
  3. Optionally, you can use tensorboard to visualize your training loss and accuracy.
     python3 -m homework.train -l myRun

    and in another terminal tensorboard --logdir myRun, where myRun is the log directory. Pro-tip: You can run tensorboard on the parent directory of many logs to visualize them all.

  4. Test your model by visualizing the predicted images.
     python3 -m homework.test -i 2
  5. To evaluate your code against grader, execute:
     python3 -m grader homework
  6. Create the submission file
     python3 -m homework.bundle

    Relevant operations