|
ailia
1.6.0.0
|
クラス | |
| class | AILIADetectorObject |
公開メンバ関数 | |
| static int | ailiaCreateDetector (ref IntPtr detector, IntPtr net, UInt32 format, UInt32 channel, UInt32 range, UInt32 algorithm, UInt32 category_count, UInt32 flags) |
| 検出オブジェクトを作成します。 [詳解] | |
| static void | ailiaDestroyDetector (IntPtr detector) |
| 検出オブジェクトを破棄します。 [詳解] | |
| static int | ailiaDetectorCompute (IntPtr detector, IntPtr src, UInt32 src_stride, UInt32 src_width, UInt32 src_height, UInt32 src_format, float threshold, float iou) |
| 物体認識を行います。 [詳解] | |
| static int | ailiaDetectorGetObjectCount (IntPtr detector, ref UInt32 obj_count) |
| 認識結果の数を取得します。 [詳解] | |
| static int | ailiaDetectorGetObject (IntPtr detector, [In, Out] AILIADetectorObject obj, UInt32 obj_idx, UInt32 version) |
| 認識結果を取得します。 [詳解] | |
| static int | ailiaDetectorSetAnchors (IntPtr detector, float[] anchors, UInt32 anchors_count) |
| YoloV2などのためにアンカーズ (anchors又はbiases) の情報を設定します。 [詳解] | |
| static int | ailiaDetectorSetInputShape (IntPtr detector, UInt32 input_width, UInt32 input_height) |
| YoloV3でのモデルへの入力画像サイズを指定します。 [詳解] | |
静的公開変数類 | |
| const Int32 | AILIA_DETECTOR_OBJECT_VERSION = (1) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_YOLOV1 = (0) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_YOLOV2 = (1) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_YOLOV3 = (2) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_YOLOV4 = (3) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_YOLOX = (4) |
| const Int32 | AILIA_DETECTOR_ALGORITHM_SSD = (8) |
| const Int32 | AILIA_DETECTOR_FLAG_NORMAL = (0) |
| static int ailia.AiliaDetector.ailiaCreateDetector | ( | ref IntPtr | detector, |
| IntPtr | net, | ||
| UInt32 | format, | ||
| UInt32 | channel, | ||
| UInt32 | range, | ||
| UInt32 | algorithm, | ||
| UInt32 | category_count, | ||
| UInt32 | flags | ||
| ) |
検出オブジェクトを作成します。
| detector | 検出オブジェクトポインタ |
| net | ネットワークオブジェクトポインタ |
| format | ネットワークの画像フォーマット (AILIA_NETWORK_IMAGE_FORMAT_*) |
| channel | ネットワークの画像チャンネル (AILIA_NETWORK_IMAGE_CHANNEL_*) |
| range | ネットワークの画像レンジ (AILIA_NETWORK_IMAGE_RANGE_*) |
| algorithm | 検出アルゴリズム(AILIA_DETECTOR_ALGORITHM_*) |
| caregory_count | 検出カテゴリ数(VOCの場合は20、COCOの場合は80、などを指定) |
| flags | 追加オプションフラグ(AILIA_DETECTOR_FLAG_*) |
Create a detector object.
| detector | Detector object pointer |
| net | Network object pointer |
| format | Image format of the network (AILIA_NETWORK_IMAGE_FORMAT_*) |
| channel | Image channel of the network (AILIA_NETWORK_IMAGE_CHANNEL_*) |
| range | Image range of the network (AILIA_NETWORK_IMAGE_RANGE_*) |
| algorithm | Detection algorithm (AILIA_DETECTOR_ALGORITHM_*) |
| caregory_count | Number of detection categories (20 for VOC, 80 for COCO, etc.) |
| flags | Additional option flags (AILIA_DETECTOR_FLAG_*) |
| static void ailia.AiliaDetector.ailiaDestroyDetector | ( | IntPtr | detector | ) |
検出オブジェクトを破棄します。
| detector | 検出オブジェクトポインタ |
| static int ailia.AiliaDetector.ailiaDetectorCompute | ( | IntPtr | detector, |
| IntPtr | src, | ||
| UInt32 | src_stride, | ||
| UInt32 | src_width, | ||
| UInt32 | src_height, | ||
| UInt32 | src_format, | ||
| float | threshold, | ||
| float | iou | ||
| ) |
物体認識を行います。
| detector | 検出オブジェクトポインタ |
| src | 画像データ(32bpp) |
| src_stride | 1ラインのバイト数 |
| src_width | 画像幅 |
| src_height | 画像高さ |
| src_format | 画像フォーマット(AILIA_IMAGE_FORMAT_*) |
| threshold | 検出しきい値(0.1f等)(小さいほど検出されやすくなり、検出数増加) |
| iou | 重複除外しきい値(0.45f等)(小さいほど重複を許容せず検出数減少) |
| static int ailia.AiliaDetector.ailiaDetectorGetObject | ( | IntPtr | detector, |
| [In, Out] AILIADetectorObject | obj, | ||
| UInt32 | obj_idx, | ||
| UInt32 | version | ||
| ) |
認識結果を取得します。
| detector | 検出オブジェクトポインタ |
| obj | オブジェクト情報 |
| obj_idx | オブジェクトインデックス |
| version | AILIA_DETECTOR_OBJECT_VERSION |
ailiaPredict() を一度も実行していない場合は AILIA_STATUS_INVALID_STATE が返ります。 認識結果は確率順でソートされます。
| static int ailia.AiliaDetector.ailiaDetectorGetObjectCount | ( | IntPtr | detector, |
| ref UInt32 | obj_count | ||
| ) |
認識結果の数を取得します。
| detector | 検出オブジェクトポインタ |
| obj_count | オブジェクト数 |
| static int ailia.AiliaDetector.ailiaDetectorSetAnchors | ( | IntPtr | detector, |
| float[] | anchors, | ||
| UInt32 | anchors_count | ||
| ) |
YoloV2などのためにアンカーズ (anchors又はbiases) の情報を設定します。
| detector | 検出オブジェクトポインタ |
| anchors | アンカーズの寸法 (検出ボックスの可能な形、高さと広さ) |
| anchors_count | アンカーズの数 (anchorsの配列サイズの半分) |
YoloV2などは既定の複数な形の検出ボックスを同時に試しています。このデータはそのボックスの複数な形の情報を記述します。 anchorsには{x,y,x,y...}の形式で格納します。 anchors_countが5の場合、anchorsは10次元の配列になります。
| static int ailia.AiliaDetector.ailiaDetectorSetInputShape | ( | IntPtr | detector, |
| UInt32 | input_width, | ||
| UInt32 | input_height | ||
| ) |
YoloV3でのモデルへの入力画像サイズを指定します。
| detector | 検出オブジェクトポインタ |
| input_width | モデルの入力画像幅 |
| input_height | モデルの入力画像高さ |
YoloV3では単一のモデルが任意の入力解像度に対応します。(32 の倍数制限あり) 計算量の削減等でモデルへの入力画像サイズを指定する場合この API を実行してください。 ailiaCreateDetector() と ailiaDetectorCompute() の間に実行する必要があります。 この API を実行しない場合、デフォルトの 416x416 を利用します。 YOLOv3 以外で実行した場合、 AILIA_STATUS_INVALID_STATE を返します。
|
static |
SSD
|
static |
YOLOV1
|
static |
YOLOV2
|
static |
YOLOV3
|
static |
YOLOV4
|
static |
YOLOX
|
static |
オプションなし
|
static |