Share via


DnnImageModelSelector Class

Definition

Helper class for selecting a pre-trained DNN image featurization model to use in the DnnImageFeaturizerEstimator.

public sealed class DnnImageModelSelector
type DnnImageModelSelector = class
Public NotInheritable Class DnnImageModelSelector
Inheritance
DnnImageModelSelector

Constructors

DnnImageModelSelector()

Extension Methods

AlexNet(DnnImageModelSelector, IHostEnvironment, String, String, String)

This allows a custom model location to be specified. This is useful is a custom model is specified, or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models must be in a directory all by themselves for the OnnxTransformer to work, this method appends a AlexNetOnnx/AlexNetPrepOnnx subdirectory to the passed in directory to prevent having to make that directory manually each time.

AlexNet(DnnImageModelSelector, IHostEnvironment, String, String)

Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the AlexNet pipeline. Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. This should be the default way to use AlexNet if importing the model from a NuGet.

ResNet101(DnnImageModelSelector, IHostEnvironment, String, String, String)

This allows a custom model location to be specified. This is useful is a custom model is specified, or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models must be in a directory all by themselves for the OnnxTransformer to work, this method appends a ResNet101Onnx/ResNetPrepOnnx subdirectory to the passed in directory to prevent having to make that directory manually each time.

ResNet101(DnnImageModelSelector, IHostEnvironment, String, String)

Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. This should be the default way to use ResNet101 if importing the model from a NuGet.

ResNet18(DnnImageModelSelector, IHostEnvironment, String, String, String)

This allows a custom model location to be specified. This is useful is a custom model is specified, or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because ONNX models must be in a directory all by themselves for the OnnxTransformer to work, this method appends a ResNet18Onnx/ResNetPrepOnnx subdirectory to the passed in directory to prevent having to make that directory manually each time.

ResNet18(DnnImageModelSelector, IHostEnvironment, String, String)

Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. This should be the default way to use ResNet18 if importing the model from a NuGet.

ResNet50(DnnImageModelSelector, IHostEnvironment, String, String, String)

This allows a custom model location to be specified. This is useful is a custom model is specified, or if the model is desired to be placed or shipped separately in a different folder from the main application. Note that because Onnx models must be in a directory all by themselves for the OnnxTransformer to work, this method appends a ResNet50Onnx/ResNetPrepOnnx subdirectory to the passed in directory to prevent having to make that directory manually each time.

ResNet50(DnnImageModelSelector, IHostEnvironment, String, String)

Returns an estimator chain with the two corresponding models (a preprocessing one and a main one) required for the ResNet pipeline. Also includes the renaming ColumnsCopyingTransforms required to be able to use arbitrary input and output column names. This assumes both of the models are in the same location as the file containing this method, which they will be if used through the NuGet. This should be the default way to use ResNet50 if importing the model from a NuGet.

Applies to

See also