You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/tutorials/standalone_mode.rst
+29-18Lines changed: 29 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Standalone mode
2
2
===============
3
3
4
-
**Standalone / Hostless / On-The-Edge mode** means that the camera starts the (:ref:`flashed <Flash the pipeline>`) application as soon as it gets power, without being connected to any particular host computer.
4
+
**Standalone** mode means that the camera starts the (:ref:`flashed <Flash the pipeline>`) application as soon as it gets power, without being connected to any particular host computer.
5
5
This is useful for applications where camera is stationary and just inspecting the world and providing analytics (eg. people/vehicle counting, LPR, fall detection, etc.)
6
6
7
7
Usually, this mode is also more robust to any instabilities (eg. networking issues, where connection between camera and host computer would drop), as application will restart automatically.
@@ -15,7 +15,7 @@ Standalone mode is **only possible on OAKs that have on-board flash** memory, wh
15
15
- License Plate Recognition (LPR) camera (`demo here <https://github.com/luxonis/depthai-experiments/tree/master/gen2-license-plate-recognition>`__). Each camera does vehicle detection, license plate detection and LPR, and only reports license plate (in string) to a server.
16
16
- Fall detection for elderly people (`demo here <https://www.youtube.com/watch?v=npiG-Dy7yQ4>`__). Each camera tracks people and checks their poses for any anomalies (eg. person falling down). If anomaly is detected, it sends an alert to a server.
17
17
18
-
In case you already have a computer on-board (eg. a robot/drone), standalone mode isn't as useful, and just adds extra complexity.
18
+
In case you already have a computer on-board (eg. a robot/drone), standalone mode isn't as useful, and adds extra complexity.
19
19
20
20
Communication with the camera
21
21
#############################
@@ -35,35 +35,43 @@ Converting a demo to standalone mode
35
35
####################################
36
36
37
37
Since there won't be any communication between the host and the device, you first need to remove all
38
-
:ref:`XLinkOut` and :ref:`XLinkIn` nodes. This means that the device will only communicate with the "outside world"
38
+
:ref:`XLinkOut` and :ref:`XLinkIn` nodes.
39
+
40
+
This means that the device will only communicate with the "outside world"
39
41
via either SPI (:ref:`SPIOut`/:ref:`SPIIn`) or :ref:`Script` node (GPIO/UART or network protocols if you have
40
42
OAK POE mode; HTTP/TCP/UDP...).
41
43
42
-
Next thing you can also remove the host-side code, which usually looks something like this:
+ progress = lambda p : print(f'Flashing progress: {p*100:.1f}%')
64
+
+ bootloader.flash(progress, pipeline)
54
65
55
66
56
-
After you remove all host-side code, you would only be left with the :ref:`Pipeline` definition (with nodes/links).
57
-
Since device no longer communicates with the host, you need to "route" your program's output through either SPI
58
-
or script node, as mentioned above.
67
+
Now, whenever the device gets power, it will start the application which starts the TCP server. You can connect to it with any TCP client (eg. `host.py script <https://github.com/luxonis/depthai-experiments/blob/master/gen2-poe-tcp-streaming/host.py>`__)
68
+
and start receiving the video stream.
59
69
60
70
Flash the bootloader
61
71
####################
62
72
63
73
To run the application on the camera, a `Bootloader` is required. Note that bootloader is already flashed on all POE cameras, as it's also required for network booting.
64
-
The :ref:`Bootloader` is packaged together with the depthai, so if you have the latest depthai version, you can flash the
65
-
latest bootloader version. To flash the latest bootloader, we suggest using the :ref:`Device Manager`. To view the API code behind
66
-
it, see :ref:`Flash Bootloader` example code.
74
+
To flash the latest bootloader, we suggest using the :ref:`Device Manager`. To view the API code behind it, see :ref:`Flash Bootloader` example code.
67
75
68
76
Flash the pipeline
69
77
##################
@@ -91,6 +99,9 @@ can flash the pipeline to the device, along with its assests (eg. AI models). Yo
91
99
After successfully flashing the pipeline, it will get started automatically when you power up the device.
92
100
If you would like to change the flashed pipeline, simply re-flash it again.
93
101
102
+
DepthAI Application Package (.dap)
103
+
##################################
104
+
94
105
Alternatively, you can also flash the pipeline with the :ref:`Device Manager`. For this approach, you will need a Depthai Application Package (.dap), which you
0 commit comments