Module Configuration File
The module configuration settings are located in the <file name x>.json file (in this example, ai-object-matching-module.json), and are used to configure how the network module evaluates image data.
An example of module configuration JSON settings is shown below.
{
"$schema": "schemas/lumiscan-ai-object-matching-module.schema.json",
"meta":
{
"inputFileType": "LumiScan-CtrlX-AI-Object-Matching-Module",
"inputFileVersion": "1.0.0",
"targetMachine": "Example",
"programName": "AI-Object-Matching",
"programVersion": "1.0.0"
},
"name": "example",
"neuralNetworkConfig": "models/model_description.json",
"externalImagePath": "hdvisionsystems/lumiscan-cam-driver/camera1/output/image"
}
The description of the parameters mentioned above can be found in the following Table 6.
| Parameter | Description |
|---|---|
meta |
Place to set meta information: inputFileType and inputFileVersion are required. |
inputFileType |
In this case it must be: |
inputFileVersion |
Currently, only version 1.0.0 is supported. |
targetMachine |
Optional. Enter the name of the machine in use here to indicate that the current application configuration is being used for this particular machine. |
programName |
Optional. This parameter indicates by which application the current file is used. In this case: |
programVersion |
Optional. Currently used program version. |
name |
A unique identifier for the neural network, which is also used as the network name in the datalayer address: |
neuralNetworkConfig |
The file path to the neural network model parameters. These parameters are generated by the LumiScan Training Framework. |
externalImagePath |
Path to datalayer address that contains image. given image address must contains data, height, width, pixel-type. |
stream |
Experimental (from v2.2.0). Optional. Inference on an image stream, from one source: the settings below. Without this section, or without |
stream.enable |
|
stream.address |
The image stream to infer on: its folder, for example |
stream.tag |
The tag on the module’s results: the module’s step in the lineage of each stream result carries it, so whoever reads a result downstream sees which module made it. Optional. Left out or empty: the module id, the last segment of the module’s address - |
stream.queueSize |
How many images may wait for the inference: 1 to 64, 1 by default. 1 infers on the newest image; more keeps more images when the network falls behind. See The queue size. |
stream.keepLatestOutput |
|
stream.onEntry |
The steps applied to each image as it arrives, before the inference, each an object with a |
stream.onExit |
Reserved for steps applied to each result. Not read yet: the application logs a warning, and the steps are not applied. |
|
After changing the parameters, the LumiScan AI Object Matching application should be restarted. A
reset is enough for the The stream layouts of earlier test builds are no longer read: the top-level |
Automatic Copying of External Image
To automatically copy an external image from another application, the application must provide an address containing the following parameters:
| Address | Type |
|---|---|
|
array of uint8_t |
|
uint32_t |
|
uint32_t |
|
string, possible values: Mono8, RGB8 |
<address> is the image field specified in externalImagePath in the module configuration file.
| This interface is designed and tested for use with the LumiScan Cam Driver. Compatibility with image data provided by other applications cannot be guaranteed. |
Complete reference
Every setting of this file as its JSON Schema lumiscan-ai-object-matching-module.schema.json defines it, generated for version 2.1.0:
| Setting | Type | Default | Allowed values | Description |
|---|---|---|---|---|
|
object |
Required. |
||
|
string |
not empty |
Required. |
|
|
string |
not empty |
Required. |
|
|
string |
not empty |
Required. |
|
|
string |
not empty |
Required. |
|
|
string |
not empty |
Required. |
|
|
string |
pattern |
Required. only [a-Z], [0-9], '-' and '_' are allowed. Unique ID of the camera configuration. This is used to identify different camera on datalayer. |
|
|
string |
not empty |
Required. Path to network description file. |
|
|
string |
not empty |
If specified, the image will be loaded from the specified path instead of the ai-object-matching app managed input image. |
|
|
object |
If specified, input image will be cropped and then used for inference. Note that the detected pixel position is related to original image. Use it if you want to accelerate the inference by reducing the image size. |
||
|
number |
≥ 0 |
Required. |
|
|
number |
≥ 0 |
Required. |
|
|
number |
Required. |
||
|
number |
Required. |
||
|
string |
not empty |
If specified, the result will be simulated. This is useful for testing the application without the actual neural network. |
|
|
object |
If specified, the detected object's index will be remapped to other index. Ke |
||
|
integer |
JSON Schemas
The application keeps the JSON Schemas of its settings files in its schemas folder; those copies always match the installed version.
The schemas of LumiScan AI Object Matching 2.1.0 can also be downloaded: JSON Schemas of LumiScan AI Object Matching 2.1.0.
To have an editor such as Visual Studio Code check a copy of a settings file that you edit on your PC, point its $schema entry at the published schema:
{
"$schema": "https://docs.hdvisionsystems.com/schemas/lumiscan-ai-object-matching/2.1.0/lumiscan-ai-object-matching-module.schema.json",
...
}
Leave the $schema entry of the files on the device as the application wrote it.