turicreate.image_analysis.get_deep_features

turicreate.image_analysis.get_deep_features(images, model_name, batch_size=64, verbose=True)

Extracts features from images from a specific model.

Parameters:
images : SArray

Input data.

model_name : string

string optional Uses a pretrained model to bootstrap an image classifier:

  • “resnet-50” : Uses a pretrained resnet model.
    Exported Core ML model will be ~90M.
  • “squeezenet_v1.1” : Uses a pretrained squeezenet model.
    Exported Core ML model will be ~4.7M.
  • “VisionFeaturePrint_Scene”: Uses an OS internal feature extractor.
    Only on available on iOS 12.0+, macOS 10.14+ and tvOS 12.0+. Exported Core ML model will be ~41K.

Models are downloaded from the internet if not available locally. Once downloaded, the models are cached for future use.

Returns:
out : SArray

Returns an SArray with all the extracted features.

Examples

>>> url = 'https://static.turi.com/datasets/images/nested'
>>> image_sframe = turicreate.load_images(url)
>>> image_sarray = image_sframe["image"]
>>> deep_features_sframe = turicreate.image_analysis.get_deep_features(image_sarray, model_name="resnet-50")