image_data[:, :, :, 0] = 2.0 / 255.0 * image_data[:, :, :, 0] - 1
Image comes with data 0…255. The above line normalizes it to 0…2 which is rarely the case. Usually NNs expect normalization to 0…1 or 0…255 for images. MobileNet expects 0…255, but ImagaNet-based NNs expect 0…255.
Instead the tutorial should explain to the user that they should normalize to the range expected by the NN.
Additionally, it is WRONG to access pixels in Python. This was the whole idea to use Python for data management and topology construction, and make C/C++ do the heavy lifting like per-pixel operations. You teach users to do this in Python, which is wrong and shouldn’t be in the tutorial.