CS 5043: HW8: Semantic Labeling

Assignment notes:

Data Set

The Chesapeake Watershed data set is derived from satellite imagery over all of the US states that are part of the Chesapeake Bay watershed system. We are using the patches part of the data set. Each patch is a 256 x 256 image with 26 channels, in which each pixel corresponds to a 1m x 1m area of space. Some of these channels are visible light channels (RGB), while others encode surface reflectivity at different frequencies. In addition, each pixel is labeled as being one of:

Here is an example of the RGB image of one patch and the corresponding pixel labels:

Notes:

Data Organization

All of the data are located on the supercomputer in: /home/fagg/datasets/radiant_earth/pa. Within this directory, there are both train and valid directories. Each of these contain directories F0 ... F9 (folds 0 to 9). Each training fold is composed of 5000 patches. Because of the size of the folds, we have provided code that produces a TF Dataset that dynamically loads the data as you need it. We will use the train directory to draw our training and validation sets from and the valid directory to draw our testing set from.

Local testing: the file chesapeake_small.zip contains the data for folds 0 and 9 (it is 6GB compressed).

Within each fold directory, the files are of the form: SOME_NON_UNIQUE_HEADER-YYY.npz. Where YYY is 0 ... 499 (all possible YYYs occur in each fold directory. There are multiple files with each YYY number in each directory (100 in the training fold directories, to be precise).

Data Access

chesapeake_loader.py is provided. The key function call is:
dataset = create_dataset(base_dir='/home/fagg/datasets/radiant_earth/pa',
                         partition='train', fold=0, filt='*', 
                         batch_size=8, prefetch=2, num_parallel_calls=4):

where:

The returned Dataset will generate batches of the specified size of input/output tuples.

A returned Dataset can be used for fitting or evaluating a model.

The Problem

Create an image-to-image translator that does semantic labeling of the images.

Details:

Deep Learning Experiment

For what you think is your best performing model type (and hyper-parameters), perform 5 different experiments:

The five different experiments will use folds F0 ... F4 (so, no overlap in any of the datasets).

Reporting

  1. Figure 1: model architecture from plot_model(). One figure

  2. Figure 2: Validation accuracy as a function of training epoch. Show 5 curves.

  3. Figures 3...7: for each model, evaluate using the test data set and generate a confusion matrix. (so, one confusion matrix per rotation)

  4. Figure 8: histogram of test accuracy. Plot a vertical line indicating the mean (and give the mean as text on the figure)

  5. Figure 9: for one model, show three examples (one per row). Each row includes: Satellite image (channels 0,1,2); true labels; predicted labels.

    plt.imshow can be useful here, but make sure for the label images that the label-to-color mapping is the same


What to Hand In

Hand in a PDF file that contains:

Grades

References

Hints


andrewhfagg -- gmail.com

Last modified: Mon May 2 14:14:52 2022