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 into a project Flow.

  • From your project, navigate to Macros in the “More Options” menu of the top navigation bar.

  • Click Download pre-trained model (v2).

  • For “Output managed folder”, create a new Filesystem folder, and name it Pre-trained model (imagenet).

  • Select Resnet trained on Imagenet as the “Pre-trained model to download”.

  • Click Run Macro.

Dataiku screenshot of dialog for macro to download a pre-trained deep learning model for image classification.

When the process completes, you can see in the Flow that the macro has downloaded the pre-trained model files into 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.

Open the pre-trained model folder, and take note of several files:

  • Config.json contains information on the pre-trained model used, the dataset it has been previously trained on and the layer used to do 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.

Dataiku screenshot of the Resnet model files folder.