Adding a little color

During our discussion of chapter 10, we explored how the diffusion can be used to add noise to an image to help train a neural network to understand and reverse the process. The author’s example does not currently take color into account during the entire process. We will attempt to add some color during our recreation of the diffusion training example.

Creating your dataset

For this assignment, you will be creating your own image that will be the basis for your dataset. We recommend that you use Google Drawings to create a simple image with a transparent background. Your image should be at least 960 x 720 (the default for Google Drawings) and feature multiple shapes with at most 3 colors. (Hint: Make sure you know the values of the colors you choose.)

Here is a sample image that I created:

Modify the example as needed

  1. You should use a network architecture based on the example from chapter 10.
  2. You will need to adjust the utility methods and the model to include the color aspects in your model.
  3. You will also need to make slight adjustments to the training loop provided as part of the chapter 10 code.
  4. You will need to experiment with the number of epochs to run to obtain meaningful results.

Demonstrate the effectiveness of your model by plotting the results in a manner similar to that presented by the author. To do the plotting the author uses the seaborn and matplotlib libraries. You will need to install those libraries via the terminal command

pip install matplotlib seaborn

Turn in your work

When you have finished your Jupyter notebook, upload it to the course Canvas page. You will also need to submit the image you created for this assignment.