Syntax
int sod_realnet_model_config(sod_realnet *pNet, sod_realnet_model_handle handle, SOD_REALNET_MODEL_CONFIG conf, ...);
Description
Configure a sod_realnet model that was previously loaded via sod_realnet_load_model_from_mem() or sod_realnet_load_model_from_disk() and identified by the handle returned by one of these interfaces.
The third argument to sod_realnet_model_config() is an integer configuration option that determines what property of the RealNet Model is to be configured. Subsequent arguments vary depending on the configuration option in the third argument. The default configuration is recommended for most applications and so this routine is usually not necessary.
Pre-trained RealNet models can be downloaded from pixlab.io/downloads or trained via the RealNet training interfaces.
Parameters
sod_realnet *pNet
A pointer to a valid sod_realnet object obtained from a prior successful call to sod_realnet_create().
sod_realnet_model_handle handle
Unique ID assigned by the RealNet container to identify a model after prior successful registration via sod_realnet_load_model_from_mem() or sod_realnet_load_model_from_disk().
SOD_REALNET_MODEL_CONFIG conf
An integer configuration option that determines what property of this model is to be configured. Subsequent arguments vary depending on the configuration verb. Here is a list of the allowed configuration options:
Configuration Verb | Expected Arguments | Description |
---|---|---|
SOD_REALNET_MODEL_MINSIZE | One Arg: int minSize |
Detection window minimum size (default value set to 128). |
SOD_REALNET_MODEL_MAXSIZE | One Arg: int maxSize |
Detection window maximum size (default value set to 1024). |
SOD_RELANET_MODEL_DETECTION_THRESHOLD | One Arg: float threshold |
Detection threshold value above which mark a region of interest (i.e. object detected). Default value set to 5.0. |
SOD_REALNET_MODEL_SCALEFACTOR | One Arg: float scalefactor |
How much to rescale the window during the multiscale detection process (default value set to 1.1). |
SOD_REALNET_MODEL_STRIDEFACTOR | One Arg: float stridefactor |
How much to move the window between neighboring detections (default value set to 0.1 i.e. 10%). |
SOD_REALNET_MODEL_NAME | One Arg: const char *zName |
Human readable model name (i.e. face, car, pedestrian, etc.). |
SOD_REALNET_MODEL_ABOUT_INFO | One Arg: const char *zAbout |
Copyright notice or any other information related to this model. |
Return Value
SOD_OK is returned on success. Any other code indicates failure.
Example
Checkout the introduction course, the C/C++ samples on the download page or refer to the SOD Github Repository.
See also
sod_realnet_create • sod_realnet_load_model_from_mem • sod_realnet_destroy • sod_realnet_detect • sod_realnet_load_from_disk.