Spring 2021 CS498DL

Assignment 3 Part 1: Multi-label Image Classification

Due date: Thursday, April 8, 11:59:59PM

Created by Daniel McKee and Maghav Kumar. Updated by Junting Wang.

Source: PASCAL VOC website

This assignment has multiple parts. START EARLY!!!

Part1 Task

In this part of the assignment you will implement a multi-label image classifier on the PASCAL VOC 2007 dataset. You will design and train deep convolutional networks to predict a binary present/absent image-level label for each of the 20 PASCAL classes. This will help you gain experience with PyTorch. You will do the following:

  • Part 1A - Pre-defined Models: Warm-up practice with PyTorch. Run three experiments (listed below) and report your results and observations. MP3_P1A_Introduction.ipynb will guide you to start.
    • Train AlexNet (PyTorch built-in) from scratch.
    • Fine-tune AlexNet (PyTorch built-in), which is pretrained on ImageNet.
    • Train a simple network (defined in classifier.py) from scratch.

  • Part 1B - Self-designed Models: Design your own model architecture to solve this multi-label classification task. MP3_P1B_Develop_Classifier.ipynb will guide you to start.
    • No pre-trained model is allowed for Part 1B.
    • You can use the concepts or ideas from existing models (e.g. VGG, ResNet, DenseNet, etc.), but please don't just copy the existing models. We want to see your own ideas reflected in the model design.
    • You may want to start your design from either a simple network provided in classifiers.py or AlexNet.
    • We will release the targeted mAP soon.

How to start

Download the starting code here.

The top-level notebooks (MP3_P1A_Introduction.ipynb and MP3_P1B_Develop_Classifier.ipynb) will guide you through all the steps of the classifier.

You will be required to use a GPU for this assignment, and hence you will be given Google Cloud credits shortly. However, we encourage you to use Colaboratory to get started and for debugging purposes, as you have limited number of credit hours for this and the following assignments.

Environment Setup (Local)

If you will be working on the assignment on a local machine then you will need a python environment set up with the appropriate packages. We suggest that you use Conda to manage python package dependencies (https://conda.io/docs/user-guide/getting-started.html).

Unless you have a machine with a GPU, running this assignment on your local machine will be very slow and is not recommended.

Data Setup (Local)

Once you have downloaded the zip file, go to the Assignment3 folder and execute the download_data script provided:


Data Setup (For Colaboratory)

If you are using Google Colaboratory for this assignment you will need do some additional setup steps.

You will need to run the download_data.sh script inside colab cells and move all the data to a local directory in colab for fast access.

You will now need to open the assignment 3 ipython notebook file from your Google Drive folder in Colaboratory and run a few setup commands. Make sure to set the GPU as the hardware accelerator. To do this, on the top bar choose Edit->Notebook Settings-> select 'GPU'. We have condensed all the important setup commands you need to run into an ipython notebook here.


The assignment is given to you in the MP3_P1A_Introduction.ipynb and MP3_P1B_Develop_Classifier.ipynb file. As mentioned, if you are using Colaboratory, you can open the ipython notebook directly in Colaboratory. If you are using a local machine, ensure that ipython is installed (https://ipython.org/install.html). You may then navigate the assignment directory in terminal and start a local ipython server using the jupyter notebook command.

Submission Instructions

As before, submission will be done on Compass by one of the partners. The following items must be uploaded for Part 1 (the netid below should be that of the submitting partner).

  1. Upload your output file of Your design network (Part1B) to the Kaggle competition for the Pascal classifier.
  2. All of your code (python files and ipynb file) in a single ZIP file. The filename should be netid_mp3_part1_code.zip.
  3. Your ipython notebook MP3_P1B_Develop_Classifier.ipynb with output cells converted to PDF format. The filename should be netid_mp3_part1b_output.pdf.
  4. A brief report for both parts in PDF format using this template. The filename should be netid_mp3_report.pdf.

Please refer to course policies on collaborations, late submission, and extension requests.