元編程參考文件

視覺模型

4 個節點

本頁內容 4

影像分類

函數

The labels that best describe a picture, best first, from those the classifier knows.

簽名
影像分類 -> (標籤: 文字陣列, 分數: 數字陣列)
    分類器: Image Classifier
    影像: Pixel Image
    前幾名: 整數
string[] ClassifyImage(
    ImageClassifier classifier,
    PixelImage image,
    int top,
    out double[] scores)

參數

名稱型別預設值說明
分類器Image Classifier—An image classifier.
影像Pixel Image—The picture.
前幾名整數—How many labels to give.

返回

標籤文字陣列
分數數字陣列
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
視覺模型
所屬包
機器學習

零樣本影像分類

函數

Scores a picture against labels written in words, best first; the scores add up to 1 across the labels given.

簽名
零樣本影像分類 -> (標籤: 文字陣列, 分數: 數字陣列)
    分類器: Zero Shot Image Classifier
    影像: Pixel Image
    標籤: 文字陣列
    範本: 文字
string[] ClassifyImageZeroShot(
    ZeroShotImageClassifier classifier,
    PixelImage image,
    string[] labels,
    string template,
    out double[] scores)

參數

名稱型別預設值說明
分類器Zero Shot Image Classifier—A zero-shot image classifier.
影像Pixel Image—The picture.
標籤文字陣列—The candidate labels, such as "a cat", "a dog", "a car".
範本文字—The sentence each label is put into before it is compared; {} stands for the label.

返回

標籤文字陣列
分數數字陣列
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
視覺模型
所屬包
機器學習

載入影像分類器

函數

Loads an image classifier and its image processor from a Hub repository or a folder.

簽名
載入影像分類器 -> Image Classifier
    模型: 文字
    裝置: Compute Device
    精度: Precision
ImageClassifier LoadImageClassifier(
    string model,
    ComputeDevice device = ComputeDevice.Auto,
    Precision precision = Precision.Auto)

參數

名稱型別預設值說明
模型文字—A repository id such as google/vit-base-patch16-224, or a folder.
裝置Compute Device自動Where it runs.
精度Precision自動The number format of its weights.

返回

分類器Image Classifier
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
視覺模型
所屬包
機器學習

載入零樣本影像分類器

函數

Loads a zero-shot image classifier (an image and a text model trained together) from a Hub repository or a folder.

簽名
載入零樣本影像分類器 -> Zero Shot Image Classifier
    模型: 文字
    裝置: Compute Device
    精度: Precision
ZeroShotImageClassifier LoadZeroShotImageClassifier(
    string model,
    ComputeDevice device = ComputeDevice.Auto,
    Precision precision = Precision.Auto)

參數

名稱型別預設值說明
模型文字—A repository id such as openai/clip-vit-base-patch32 or google/siglip-base-patch16-224, or a folder.
裝置Compute Device自動Where it runs.
精度Precision自動The number format of its weights.

返回

分類器Zero Shot Image Classifier
所屬發行版
元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
視覺模型
所屬包
機器學習