Computer Vision with Neural Networks

Reflect a labelled seed image

A one-column photograph

Botie is reflecting a labelled seed photograph. If its mask stays still, the training pair will teach the model that different pixels contain the seed.

BOTIE

What should a horizontal reflection change when both arrays have only one column?
The inputs we are comparing

Seed photograph

Seed on the left

2002010
1805020

One column

200
10

Aligned seed mask

Seed on the left

100
110

One column

1
0
Result for seed on the left
[
  [
    [
      10,
      20,
      200
    ],
    [
      20,
      50,
      180
    ]
  ],
  [
    [
      0,
      0,
      1
    ],
    [
      0,
      1,
      1
    ]
  ]
]
Choose an explanation to test
A diagonal seed arrangement must keep its labels

This check uses the pieces from “Reflect the image and its labels together”.

BOTIE

Flip the photograph horizontally and apply the same transformation to its binary mask. Return the transformed image first and the transformed mask second. Preserve each pixel's correspondence with its label.
Seed photograph
1010200
1015020
901010
Aligned seed mask
001
010
100

Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.

Build a construction in the workspace above first. This case will test those pieces.

Why should reflected versions of one original photograph stay on the same side of a training-validation split?

Augment after splitting original observations, and transform spatial labels with their images.

This exercise illustrates one deterministic transformation. Real augmentation choices must respect the task and happen after splitting original observations.

Work through the Python challenges →
Continue the courseTransfer Learning →
← Searching a Collection of Pictures