Dummy dataset

  • Find this notebook at EpyNN/epynnlive/dummy_image/prepare_dataset.ipynb.

  • Regular python code at EpyNN/epynnlive/dummy_image/prepare_dataset.py.

Run the notebook online with Google Colab.

Level: Intermediate

This notebook is part of the series on preparing data for Neural Network regression with EpyNN.

In addition to the topic-specific content, it contains several explanations about basics or general concepts in programming that are important in the context.

Note that elements developed in the following notebooks may not be reviewed herein:

What is an image?

Instinctively, an image may resemble a 2D plane composed of WIDTH * HEIGHT colored units arranged together in a particular manner.

In computing, a 2D image is generally a 3D object which is composed of WIDTH * HEIGHT units within each plane with respect the the third dimension, which is the DEPTH of the image, therefore giving WIDTH * HEIGHT * DEPTH = N_FEATURES.

Image depth is simply the number of channels which compose the image. You are certainly aware of RGB colors, for instance. In the RGB scheme, one color is written such as rgb(int, int, int) or rgb(255, 0, 0), rgb(0, 255, 0) and rgb(0, 0, 255) for pure red, green and blue, respectively. One RGB image would therefore have a DEPTH equal to 3, because of the three channels within.

Note that following this scheme, an image is made of Numerical data, namely integer or int.

Why preparing a dummy dataset of images?

In addition to general considerations reviewed here, this may be a good idea to practically understand what an image is, how to build an image, and how to handle such kind of data overall.

Live examples

The function prepare_dataset() presented herein is used in the following live examples:

  • Notebook atEpyNN/epynnlive/dummy_image/train.ipynb or following this link.

  • Regular python code at EpyNN/epynnlive/dummy_image/train.py.