Fall'21 - Computer Vision Assignment
Details
For this small homework, you will make a colorization model based on new/existing deep learning models, train the model using the provided train/validation dataset and test the model using test dataset.
Specifically, you need to perform the following:
- You need to train the model, save checkpoints and perform validation.
- You need to implement a test dataloader based on the validation dataloader.
- You need to implement a ‘test’ method that will take a grayscale “L” image and “AB” color hints and produce a color image (same as validation method).
- You need to test your trained model using the provided test images and save the images.
- You need to write a short report on your methodology.
- Make a zip file containing your codes and report in one folder and the result images in other folder.
Refer to the previous lab sessions (ipynb files) for pointers/help with test function.
Dataset
For this homework, a dataset will be provided containing training, validation and testing images. The training folder consists of \(7000\) training images, the validation folder contains \(2000\) validation images and the test folder contains \(1000\) images. All images are randomly sampled from Places365 dataset. Images are resized to \(256\times256\). For training/validation/test, all images have to be resized to \(128\times128\).
Training details
For the colorization task, the inputs will be an L image and corresponding color hint map. A sample dataloader for PyTorch is already provided in the ipynb file. The dataloader handles both color space conversion and generation of hint images. In training time, the dataloader will produce L images from the ground truth images and also randomly sample color hints from the corresponding images. Note that the color hints will be generated by a random sampling in a ratio of \(1\% - 5\%\).
Testing details
The test images contains both L image and AB color hints, concatenated and converted into a RGB image. You can use the dataloader to extract L and AB channels, same as training dataloader. Please refer to the provided dataloader for this. $1000$ test images will be provided to the students. All test images will be resized to \(256\times256\). However, you have to resize it into \(128\times128\) and all output images should have the same dimension (\(128\times128\)).
Training Environment
All student are expected to use Google Colab for the training purpose. The deep learning framework should be PyTorch. Note that, the maximum time for training in Colab is 12 hours.