August 2018
Intermediate to advanced
344 pages
9h 20m
English
Now that we have created our file and saved the results of our trained neural network, we can put this trained system to work by having it identify from images whether or not there is a toy in the image. We start a new Python program file and call it test_the_network.py.
We start with a header and import our libraries for Python. We use OpenCV (cv2) to perform our image manipulation, and Keras for the neural networks:
# Test Network Program # part of the toy detector # uses LeNet to detect if toys are in the image # # Francis X. Govers 2018 # # references: # https://www.pyimagesearch.com/2017/12/18/keras-deep-learning-raspberry-pi/ # # import the necessary packages from keras.preprocessing.image import img_to_array ...
Read now
Unlock full access