Hands-On: Add a Pre-Trained Model to the Flow¶
The Deep learning on images plugin includes a macro for downloading a pre-trained deep learning model. Navigate to the project home, then to Macros in the top navigation bar. Click Download pre-trained model.
In the Download pre-trained model dialog, type Pre-trained model (imagenet)
as the output folder name. Click Run Macro. When the process completes, go back to the flow to see the pre-trained model has been added and is ready for use.
You can see that the macro has downloaded model files to your project and added them to an output folder. These Resnet model files have been trained on the Imagenet dataset which contains millions of images trained to recognize images in thousands of categories.
You will also notice the folder includes several files:
Config.json contains information on the pretrained model used, the dataset it has been previously trained on and the layer used to do feature extraction (described in the leson on image feature extraction),
Model_info.json reveals the model architecture,
Model_labels.csv gathers all the labels to predict in this pre-trained model, among them, “tiger” and “lion”, and
Two “h5” formatted files that contain your pre-trained model. The file suffixed with “notop” indicates it does not contain the last fully connected layer whereas the other file does.
What’s Next¶
In the next hands-on lesson, we’ll use this pre-trained model to classify a set of test images.