The purpose of this page is to layout exactly what elements of SIC are being run and where, why, and how, to gain more insight into the design of the framework. It is not to analyze how face detection works.
I will break it down into different levels of increasing detail as to not be too overwhelming at once. In this simple example, a desktop computer uses its camera to detect and display bounding boxes around faces.
Level 1 (Components, Connectors, and Managers)
FaceDetection service is ran in a separate shell, creating an associated ComponentManager
Code Block | ||
---|---|---|
| ||
run-face-detection |
within a shell
This runs the main() function of face_detection.py, which starts a ComponentManager
assigned to the FaceDetectionComponent
. In this example, this script is ran on the same computer as the rest of the application, although it may be ran on another computer.
...
Code Block | ||
---|---|---|
| ||
# Connect to the services desktop = Desktop(camera_conf=conf) |
within desktop_camera_facedetection.py
Rather than running a ComponentManager
in a separate terminal, the Desktop class (inherits from Device) creates a new thread where its ComponentManager
runs.
...
Components like
FaceDetection
do not run just by themselves. They consist of aConnector
which is basically a remote control for the actual component, aComponentManager
which runs them, and then the component itself.
Level 2 (Redis Channels)
FaceDetection service is ran in a separate shell, creating an associated ComponentManager
...
A component (desktop.camera) is passed into the connect() method of a Connector
.