Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
SzabolcsGergely committed Apr 27, 2022
2 parents 7b7cd92 + 31ab3e5 commit 7ad4cdb
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ execute_process(COMMAND ${CMAKE_COMMAND}
)

# Build
execute_process(COMMAND ${CMAKE_COMMAND} --build build --parallel 3 WORKING_DIRECTORY ${project_root} COMMAND_ECHO STDOUT)
execute_process(COMMAND ${CMAKE_COMMAND} --build build --parallel 2 WORKING_DIRECTORY ${project_root} COMMAND_ECHO STDOUT)
8 changes: 8 additions & 0 deletions docs/source/components/nodes/color_camera.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ Usage
cam->setInterleaved(false);
cam->setColorOrder(dai::ColorCameraProperties::ColorOrder::RGB);

Limitations
###########

Here are known camera limitations for the Myriad X:

- **ISP can process about 600 MP/s**, and about **500 MP/s** when the pipeline is also running NNs and video encoder in parallel
- **3A algorithms** can process about **200..250 FPS overall** (for all camera streams). This is a current limitation of our implementation, and we have plans for a workaround to run 3A algorithms on every Xth frame, no ETA yet

Examples of functionality
#########################

Expand Down
9 changes: 6 additions & 3 deletions docs/source/components/nodes/imu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,14 @@ List of devices that have an IMU sensor on-board:
* `OAK-D <https://docs.luxonis.com/projects/hardware/en/latest/pages/BW1098OAK.html>`__
* `OAK-D-IoT-40 <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM1092.html>`__
* `OAK-D-IoT-75 <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM1098OBC.html>`__
* `OAK-D-CM4 <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM1097.html>`__
* `OAK-D-PoE <https://docs.luxonis.com/projects/hardware/en/latest/pages/SJ2088POE.html>`__
* `OAK-D CM4 PoE <https://docs.luxonis.com/projects/hardware/en/latest/pages/SJ2088POE.html>`__
* `OAK-FFC-3P <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM1090.html>`__
* OAK-D-Pro
* OAK-WD-Pro
* `OAK-FFC-4P <https://docs.luxonis.com/projects/hardware/en/latest/pages/DD2090.html>`__
* `OAK-D Pro <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM9098pro.html>`__ (All varients)
* `OAK-D S2 <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM9098s2.html>`__ (All varients)
* `OAK-D S2 PoE <https://docs.luxonis.com/projects/hardware/en/latest/pages/NG9097s2.html>`__ (All varients)
* `OAK-D Pro PoE <https://docs.luxonis.com/projects/hardware/en/latest/pages/NG9097pro.html>`__ (All varients)


IMU sensors
Expand Down
4 changes: 2 additions & 2 deletions docs/source/components/nodes/yolo_detection_network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ Usage
yoloDet.setConfidenceThreshold(0.5)
yoloDet.setNumClasses(80)
yoloDet.setCoordinateSize(4)
yoloDet.setAnchors(np.array([10,14, 23,27, 37,58, 81,82, 135,169, 344,319]))
yoloDet.setAnchorMasks({"side26": np.array([1, 2, 3]), "side13": np.array([3, 4, 5])})
yoloDet.setAnchors([10,14, 23,27, 37,58, 81,82, 135,169, 344,319])
yoloDet.setAnchorMasks({"side26": [1, 2, 3], "side13": [3, 4, 5]})
yoloDet.setIouThreshold(0.5)

.. code-tab:: c++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Usage
# Yolo specific parameters
yoloSpatial.setNumClasses(80)
yoloSpatial.setCoordinateSize(4)
yoloSpatial.setAnchors(np.array([10,14, 23,27, 37,58, 81,82, 135,169, 344,319]))
yoloSpatial.setAnchorMasks({ "side26": np.array([1,2,3]), "side13": np.array([3,4,5]) })
yoloSpatial.setAnchors([10,14, 23,27, 37,58, 81,82, 135,169, 344,319])
yoloSpatial.setAnchorMasks({ "side26": [1,2,3], "side13": [3,4,5] })
yoloSpatial.setIouThreshold(0.5)

.. code-tab:: c++
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ node functionalities are presented with code.
tutorials/ram_usage.rst
tutorials/dispaying_detections.rst
tutorials/camera_tuning.rst
tutorials/low-latency.rst

.. toctree::
:maxdepth: 1
Expand Down
114 changes: 114 additions & 0 deletions docs/source/tutorials/low-latency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Low Latency
===========

These tables show what performance you can expect from **USB 3.2** Gen 1 (5 Gbps) connection with an OAK camera. XLink chunking was
disabled for these tests (:code:`pipeline.setXLinkChunkSize(0)`).

.. list-table::
:header-rows: 1

* - What
- Resolution
- FPS
- FPS set
- Time-to-Host [ms]
- Bandwidth
- Histogram
* - Color (isp)
- 1080P
- 60
- 60
- 33
- 1.5 Gbps
- `link <https://user-images.githubusercontent.com/18037362/162675407-77882498-5bf1-4af8-b779-9b9e8321af57.png>`__
* - Color (isp)
- 4K
- 28.5
- 30
- 150
- 2.8 Gbps
- `link <https://user-images.githubusercontent.com/18037362/162675403-f3c5a4c3-1f7d-4acc-a5d5-f5aecff5a66a.png>`__
* - Mono
- 720P/800P
- 120
- 120
- 24.5
- 442/482 Mbps
- `link <https://user-images.githubusercontent.com/18037362/162675400-b19f1e2c-bee0-4482-a861-39481bf2e35e.png>`__
* - Mono
- 400P
- 120
- 120
- 7.5
- 246 Mbps
- `link <https://user-images.githubusercontent.com/18037362/162675393-e3fb08fb-0f17-49d0-85d0-31ae7b5af0f9.png>`__

- **Time-to-Host** is measured time between frame timestamp (:code:`imgFrame.getTimestamp()`) and host timestamp when the frame is received (:code:`dai.Clock.now()`).
- **Histogram** shows how much Time-to-Host varies frame to frame. Y axis represents number of frame that occured at that time while the X axis represents microseconds.
- **Bandwidth** is calculated bandwidth required to stream specified frames at specified FPS.

Encoded frames
##############

.. list-table::
:header-rows: 1

* - What
- Resolution
- FPS
- FPS set
- Time-to-Host [ms]
- Histogram
* - Color video H.265
- 4K
- 28.5
- 30
- 210
- `link <https://user-images.githubusercontent.com/18037362/162675386-a59a58d1-1d5c-4c82-89d8-12882926425b.png>`__
* - Color video MJPEG
- 4K
- 30
- 30
- 71
- `link <https://user-images.githubusercontent.com/18037362/162675384-64842bd6-f5e7-4b40-adf4-39b9c25d1c89.png>`__
* - Color video H.265
- 1080P
- 60
- 60
- 42
- `link <https://user-images.githubusercontent.com/18037362/162675356-c7c86730-63cd-4de8-bad6-4e1484b29ca5.png>`__
* - Color video MJPEG
- 1080P
- 60
- 60
- 31
- `link <https://user-images.githubusercontent.com/18037362/162675371-62aadb93-20f0-4838-9aab-727fb1bfe6f4.png>`__
* - Mono H.265
- 800P
- 60
- 60
- 23.5
- `link <https://user-images.githubusercontent.com/18037362/162675318-92a8541b-424c-49b1-8ec4-6d9e0170410a.png>`__
* - Mono MJPEG
- 800P
- 60
- 60
- 22.5
- `link <https://user-images.githubusercontent.com/18037362/162675328-20afbe8f-4587-4263-8981-919e5a8811c7.png>`__
* - Mono H.265
- 400P
- 120
- 120
- 7.5
- `link <https://user-images.githubusercontent.com/18037362/162675345-dfb4d04a-5d3a-4f84-81e9-dfc091bc00b5.png>`__
* - Mono MJPEG
- 400P
- 120
- 120
- 7.5
- `link <https://user-images.githubusercontent.com/18037362/162675335-2e5a9581-972a-448c-b650-6b6d076a04b8.png>`__

You can also reduce frame latency by using `Zero-Copy <https://github.com/luxonis/depthai-python/tree/tmp_zero_copy>`__
branch of the DepthAI.

.. include:: /includes/footer-short.rst
4 changes: 2 additions & 2 deletions examples/SpatialDetection/spatial_tiny_yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
# Yolo specific parameters
spatialDetectionNetwork.setNumClasses(80)
spatialDetectionNetwork.setCoordinateSize(4)
spatialDetectionNetwork.setAnchors(np.array([10,14, 23,27, 37,58, 81,82, 135,169, 344,319]))
spatialDetectionNetwork.setAnchorMasks({ "side26": np.array([1,2,3]), "side13": np.array([3,4,5]) })
spatialDetectionNetwork.setAnchors([10,14, 23,27, 37,58, 81,82, 135,169, 344,319])
spatialDetectionNetwork.setAnchorMasks({ "side26": [1,2,3], "side13": [3,4,5] })
spatialDetectionNetwork.setIouThreshold(0.5)

# Linking
Expand Down
4 changes: 2 additions & 2 deletions examples/Yolo/tiny_yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
detectionNetwork.setConfidenceThreshold(0.5)
detectionNetwork.setNumClasses(80)
detectionNetwork.setCoordinateSize(4)
detectionNetwork.setAnchors(np.array([10, 14, 23, 27, 37, 58, 81, 82, 135, 169, 344, 319]))
detectionNetwork.setAnchorMasks({"side26": np.array([1, 2, 3]), "side13": np.array([3, 4, 5])})
detectionNetwork.setAnchors([10, 14, 23, 27, 37, 58, 81, 82, 135, 169, 344, 319])
detectionNetwork.setAnchorMasks({"side26": [1, 2, 3], "side13": [3, 4, 5]})
detectionNetwork.setIouThreshold(0.5)
detectionNetwork.setBlobPath(nnPath)
detectionNetwork.setNumInferenceThreads(2)
Expand Down

0 comments on commit 7ad4cdb

Please sign in to comment.