Tips in Selecting a Model
There are many pretrained models to choose from, and each model will have tradeoffs:
- Size: How much memory does the model need
The final location of the model will determine how much the network size needs to be considered.
When choosing to deploy to a low memory system, choose a model specifically designed for this task.
See Models for Edge Deployment
- Accuracy: How well does the model perform prior to retraining
Typically, a model that performs well for the ImageNet dataset indicates a model that has learned informative features, and could perform well in new, similar tasks as well.
Explore Higher Accuracy Models
- Prediction Speed: How fast can the model predict on new images
While prediction speed can vary based on many factors such as hardware and batch size, speed will also vary based on architecture of the chosen model, and the size of model.
Compare prediction speeds with Simple Models to Get Started.
Explore tradeoffs between models in the following sections.
To import any model into MATLAB, the structure is:
>> net = networkname
>> net = alexnet >> net = resnet50
If the model is not already downloaded, a link will be provided to download the model in MATLAB.
You can iterate on these models quickly and try out different settings such as data preprocessing steps and training options. Once you have a feel for which settings work well, try a more accurate network to see if it improves your results.
For Semantic Segmentation workflows:
Using any of the predefined network architectures provides a convenient starting point for training semantic segmentation networks. These are commonly used layer architectures for semantic segmentation problems:
- DeepLab v3+
See more on creating a semantic segmentation network using Deeplab v3+ here.
Models from Other Frameworks
Looking for models from other frameworks? Use ONNX, TensorFlow-Keras, and Caffe importers to import any network into MATLAB.
See how to import pretrained Keras layers, and replace unsupported layers with custom layers.