ailia
1.5.0.0
|
Public Member Functions | |
bool | Environment (int type) |
Selects the specified type of calculation environment. More... | |
string | EnvironmentName () |
Displays the name of the selected environment. More... | |
int | GetEnvironmentCount () |
Get the number of available computing environments (CPU, GPU). More... | |
Ailia.AILIAEnvironment | GetEnvironment (int idx) |
Obtains the computing environment for the specified index. More... | |
bool | SelectEnvironment (int idx) |
Select the calculation environment. More... | |
Ailia.AILIAEnvironment | GetSelectedEnvironment () |
Retrieves the selected computing environment. More... | |
void | SetMemoryMode (uint set_memory_mode) |
Sets the memory mode. More... | |
void | DisableLayerFusion () |
Disables speedup due to layer fusion. More... | |
virtual bool | OpenFile (string prototxt_path, string model_path) |
Create a network object from a model file. More... | |
virtual bool | OpenMem (byte[] prototxt_buf, byte[] model_buf) |
Creates network objects from memory. More... | |
virtual bool | OpenEx (Ailia.ailiaFileCallback callback, IntPtr arg1, IntPtr arg2) |
Creates a network object from a file callback. More... | |
bool | Predict (float[] output_data, float[] input_data) |
Perform inference and obtain inference results. More... | |
Ailia.AILIAShape | GetInputShape () |
uint[] | GetInputShapeND () |
Obtains the shape of the input data at the time of inference. More... | |
bool | SetInputShape (Ailia.AILIAShape shape) |
Sets the shape of the input data during inference. More... | |
bool | SetInputShapeND (uint[] shape, int dim) |
Change the shape of the input data during inference. More... | |
Ailia.AILIAShape | GetOutputShape () |
Obtains the shape of the output data during inference. More... | |
uint[] | GetOutputShapeND () |
Obtains the shape of the output data during inference. More... | |
Ailia.AILIAShape | GetBlobShape (string layer_name) |
Obtains the shape (layer format) of the internal data (Blob) at the time of inference. (Obsolete) More... | |
int | FindBlobIndexByName (string name) |
Look up and retrieve the index of the internal data (Blob) at the time of inference by name. More... | |
Ailia.AILIAShape | GetBlobShape (uint idx) |
Obtains the shape (layer format) of the internal data (Blob) at the time of inference. More... | |
Ailia.AILIAShape | GetBlobShape (int idx) |
bool | GetBlobData (float[] output_data, uint idx) |
Obtains internal data (Blob) at the time of inference. More... | |
bool | GetBlobData (float[] output_data, int idx) |
bool | SetInputBlobData (float[] input_data, uint idx) |
Set input data to the specified Blob. More... | |
bool | SetInputBlobData (float[] input_data, int idx) |
bool | SetInputBlobShape (Ailia.AILIAShape shape, uint idx) |
Sets the format of the specified input data (Blob). (4 dimensions or less) More... | |
bool | SetInputBlobShape (Ailia.AILIAShape shape, int idx) |
bool | SetInputBlobShapeND (uint[] shape, uint dim, uint idx) |
Sets the format of the input data (Blob). (5D or more) More... | |
bool | SetInputBlobShapeND (uint[] shape, int dim, int idx) |
uint[] | GetInputBlobList () |
Obtains a list of the indices of the input data (Blob). More... | |
uint[] | GetOutputBlobList () |
Obtains a list of indices of the output data (Blob). More... | |
bool | CopyBlobData (uint dst_blob_idx, uint src_blob_idx, AiliaModel src_model=null) |
Perform copies between blobs that specified. More... | |
bool | Update () |
Inference is performed with pre-populated data. More... | |
virtual void | Close () |
Destroys network objects. More... | |
virtual void | Dispose () |
Release resources. More... | |
string | GetStatusString (int status) |
Returns a string corresponding to the status code. More... | |
string | GetErrorDetail () |
Returns error details. More... | |
bool | SetProfileMode (uint profile_mode) |
Enable profile mode. More... | |
string | GetSummary () |
Obtain network information and profile results. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Protected Attributes | |
IntPtr | ailia = IntPtr.Zero |
bool | logging = true |
Properties | |
int | Status [get, protected set] |
Status code @detail Get the library status code. More... | |
|
inlinevirtual |
Destroys network objects.
Destroys and initializes the network object.
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inline |
Perform copies between blobs that specified.
dst_blob_idx | The index of destination blob |
src_blob_idx | The index of source blob |
src_mdoel | The model object that contains source blob. If specify null, perform copy blob inner this model object. |
|
inline |
|
inlinevirtual |
Release resources.
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inlineprotectedvirtual |
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inline |
Selects the specified type of calculation environment.
環境選択(簡易)
type | Type of environment ( AILIA_ENVIRONMENT_TYPE_CPU or BLAS or GPU) |
Simply select the calculation environment from the environment type. To explicitly specify the computing environment, use GetEnvironmentCount(), GetEnvironment(), and SelectEnvironment().
|
inline |
|
inline |
Look up and retrieve the index of the internal data (Blob) at the time of inference by name.
layer_name | Blob name to search |
Ailia.ailiaFindBlobIndexByName() searches for and retrieves the index of the internal data (Blob) at the time of inference by name.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Obtains internal data (Blob) at the time of inference.
output_data | Where to export inference results |
idx | Index of Blob (0 to ailiaGetBlobCount() -1) |
Ailia.ailiaGetBlobData() to get the internal data (Blob) at the time of inference. If the inference has never been performed, it fails.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Obtains the shape (layer format) of the internal data (Blob) at the time of inference. (Obsolete)
layer_name | Blob name to search |
Ailia.ailiaFindBlobIndexByName() to get the index of a Blob from the Blob name. Ailia.ailiaGetBlobShape() obtains the shape (layer format) of the internal data (Blob) at the time of inference and stores it in shape.
|
inline |
Obtains the shape (layer format) of the internal data (Blob) at the time of inference.
idx | Index of Blob |
Ailia.ailiaGetBlobShape() obtains the shape (layer format) of the internal data (Blob) at the time of inference and stores it in shape.
|
inline |
Obtains the computing environment for the specified index.
idx | Index of Environmental Information (0~ ailiaGetEnvironmentCount() -1) |
Obtains detailed information about the specified computing environment.
|
inline |
Get the number of available computing environments (CPU, GPU).
環境選択(詳細)
Get the number of available environments.
|
inline |
Returns error details.
|
inline |
Obtains a list of the indices of the input data (Blob).
|
inline |
|
inline |
Obtains the shape of the input data at the time of inference.
|
inline |
Obtains a list of indices of the output data (Blob).
|
inline |
Obtains the shape of the output data during inference.
Ailia.ailiaGetOutputShape() to get the shape of the output data during inference. If the shape has more than 5 dimensions, use GetOutputShapeND().
|
inline |
Obtains the shape of the output data during inference.
Get the dimension of the output data during inference with ailiaGetOutputDim(). Ailia.ailiaGetOutputShapeND() to get the shape of the output data during inference.
|
inline |
Retrieves the selected computing environment.
Retrieves detailed information about the selected calculation environment.
|
inline |
Returns a string corresponding to the status code.
status | Status code |
|
inline |
Obtain network information and profile results.
|
inlinevirtual |
Creates a network object from a file callback.
callback | User-defined file access callback function structure |
arg1 | Argument pointer notified to AILIA_USER_API_FOPEN |
arg2 | Argument pointer notified to AILIA_USER_API_FOPEN |
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inlinevirtual |
Create a network object from a model file.
prototxt_path | Pathname of the prototxt file(MBSC or UTF16) |
model_path | Path name of protobuf/onnx file(MBSC or UTF16) |
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inlinevirtual |
Creates network objects from memory.
prototxt_buf | Pointer to data in prototxt file |
model_buf | Pointer to data in protobuf/onnx file |
Reimplemented in ailia.AiliaPoseEstimatorModel, ailia.AiliaFeatureExtractorModel, ailia.AiliaDetectorModel, and ailia.AiliaClassifierModel.
|
inline |
Perform inference and obtain inference results.
output_data | Output data export destination |
input_data | Inference data |
|
inline |
Select the calculation environment.
idx | Index of Environmental Information (0~ ailiaGetEnvironmentCount() -1) |
Selects the computing environment for the specified index as the inference environment.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Set input data to the specified Blob.
input_data | Inference data X,Y,Z,W, in that order, stored as numeric type Size is inputSize of net file (I'm not sure if this is strictly the same as ailia.cs description, since buffer is allocated) |
idx | Index of Blob to change settings |
Ailia.ailiaSetInPutBlobData() gives the input data to the specified Blob.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Sets the format of the specified input data (Blob). (4 dimensions or less)
shape | Shape information of input data |
idx | Index of Blob to be changed |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inline |
Sets the format of the input data (Blob). (5D or more)
shape | Shape information of input data |
dim | Dimensions of shape |
idx | Index of Blob to be changed |
|
inline |
Sets the shape of the input data during inference.
shape | Shape information of input data |
|
inline |
Change the shape of the input data during inference.
net | Network object pointer |
shape | Array of sizes of each dimension of input data (dim-1, dim-2, ... ,1, 0) |
dim | Dimensions of shape |
Changes the input geometry defined in prototxt. It should be the same as the rank described in prototxt. Note that an error may be returned if the shape of the weight coefficients depends on the input geometry, for example.
|
inline |
Sets the memory mode.
set_memory_mode | Memory mode (multiple specifiable by logical. AILIA_MEMORY_XXX (default: AILIA_MEMORY_REDUCE_CONSTANT ) |
Changes the memory usage policy setting; if anything other than AILIA_MEMORY_NO_OPTIMIZATION is specified, the intermediate buffer allocated during inference is released, thus reducing the amount of memory used during inference.
|
inline |
Enable profile mode.
|
inline |
Inference is performed with pre-populated data.
|
protected |
|
protected |
|
getprotected set |