ICN Architecture

In short terms, ICN will make a configurable image classifier device available at Orion that allows to perform automatic or on-demand image classification of images stored at an image database service, using a Machine Learning or Deep Leaning model available at a model database service. ICN was not designed to perform model training but to make use of such models instead.

When ICN starts, it communicates via HTTP with Orion, creating the Classification Result Entity and the corresponding data persistency, ensured by Cygnus. Then, it communicates with JSON IoT Agent also via HTTP to create the classifier device, which in turn will create the corresponding entity at Orion (IoT Agent intrinsic functionality).

With the proper initial configuration performed, ICN then subscribes to the changes of a specified Image Reference Entity through Orion's subscription mechanism, performing an image classification each time the entity is updated.

Additionally to the automatic image classification functionality, ICN is represented as a device at Orion with the classify, listModels and selectModel commands available through the intrinsic functionality of generic devices provided by JSON IoT Agent.

Each classify command receives a Image Reference data model as an input. According to the provided information, an image is consumed from the image database service, to which ICN is connected to, and the user-defined image classification operation is performed, updating the Classification Result Entity with the corresponding context data at Orion.

The listModels command allows to list all the available models at the model database to which ICN is connected to.

At each selectModel command, a model is selected to perform the following image classification tasks. The desired model needs to be available at the model database to which ICN is connected to.

To issue these commands, one can use HTTP requests or direct MQTT messages, both respecting the FIWARE JSON IoT Agent functionality. For the latter, one needs to be aware that the IoT Agent will not be handling the execution requests (southbound functionality) and therefore will not update the device context data to PENDING status for the corresponding command.

It is important to mention that Orion's subscription mechanism also does not trigger the IoT Agent southbound functionality and therefore there is no HTTP request issuing the classify command. The impact would be the classifier device context data never presenting the PENDING status for the classify command.

ICN handles the PENDING status update for the classify command, implementing the same behavior provided by the IoT Agent. The following diagram illustrates the described functionality and should be compared to the FIWARE IoT Agent for southbound functionality.

ICN southbound traffic

The following image presents how ICN positions itself in a FIWARE solution:

Image Classification Node

Note that the dependency on a message broker such as Mosquitto (depending on IoT Agent configuration) and on the entity data persistency service Cygnus still exist. In the previous image, these can be considered to be implicitly included into the IoT Agent and Orion respectively.

ICN imposes that a Image Reference data model needs to be used to ensure its functionality, this requirements is fulfilled if the Generic Camera Node (GCN) is used.

The ICN and GCN were designed to work together, presenting an ideal synergy. Despite said synergy, they not have direct dependencies and allow usage as standalone services.


Previous: Index | Next: Installation and Administration Guide