This is an example on how to take a trained model from the neon Model Zoo model and apply it to custom data.
This example works with the Alexnet image classification model in the neon Model Zoo. The readme on that same page has a link to the trained Alexnet model file. Download those trained weights to your local directory.
This script requires the neon, PIL, scipy and numpy are installed in the system. neon must be installed and if it was installed into a virtualenv the virtualenv must be activated. An example jpeg file with an image of a dog (german short hair pointer) was used here and can be download from this link. In order to get the class names for the predictions the meta data from the ILSVCR2012 dev kit will be needed.
To run this model through neon, the image must be put into BGR order, the channel means from the trianing image set for each color channel need to be subtracted, and the image array needs to be swapped from (H, W, C) to (C, H, W) and flattened.