A CategoricalDistribution for every unique pixel value. E.g pixel [45, 89] has value 21. That means it’s labeling can be found at
results[21].
That CategoricalDistribution e.g. determines that pixel is either a pear or banana with corresponding values in the distribution.
Pixel [45, 90] also has value 21, referring to the same CategoricalDistribution, though pixel [56,94] has value 2 so refers to results[2], which says that pixel is most likely an apple etc.
The max value of the image +1 corresponds to the length of the .results-array.