| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,10 +26,10 @@ When you create the device in the code, firmware is uploaded together with the p | |||
| 26 | 26 | print('USB speed:',device.getUsbSpeed()) | |
| 27 | 27 | print('Connected cameras:',device.getConnectedCameras()) | |
| 28 | 28 | ||
| 29 | - # Input queue, to send message from the host to the device (you can recieve the message on the device with XLinkIn) | ||
| 29 | + # Input queue, to send message from the host to the device (you can receive the message on the device with XLinkIn) | ||
| 30 | 30 | input_q = device.getInputQueue("input_name", maxSize=4, blocking=False) | |
| 31 | 31 | ||
| 32 | - # Output queue, to recieve message on the host from the device (you can send the message on the device with XLinkOut) | ||
| 32 | + # Output queue, to receive message on the host from the device (you can send the message on the device with XLinkOut) | ||
| 33 | 33 | output_q = device.getOutputQueue("output_name", maxSize=4, blocking=False) | |
| 34 | 34 | ||
| 35 | 35 | while True: | |
@@ -91,7 +91,7 @@ the host to process every frame, thus providing only the latest data (:code:`blo | |||
| 91 | 91 | However, if there are a lot of dropped/overwritten frames, because the host isn't able to process them fast enough | |
| 92 | 92 | (eg. one-threaded environment which does some heavy computing), the :code:`maxSize` could be set to a higher | |
| 93 | 93 | number, which would increase the queue size and reduce the number of dropped frames. | |
| 94 | - Specifically, at 30 FPS, a new frame is recieved every ~33ms, so if your host is able to process a frame in that time, the :code:`maxSize` | ||
| 94 | + Specifically, at 30 FPS, a new frame is received every ~33ms, so if your host is able to process a frame in that time, the :code:`maxSize` | ||
| 95 | 95 | could be set to :code:`1`, otherwise to :code:`2` for processing times up to 66ms and so on. | |
| 96 | 96 | ||
| 97 | 97 | If, however, there is a need to have some intervals of wait between retrieving messages, one could specify that differently. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | NNData | |
| 2 | 2 | ====== | |
| 3 | 3 | ||
| 4 | - This message carries tensors and its data. You can recieve this message from the :ref:`NeuralNetwork` node or you could create this message | ||
| 4 | + This message carries tensors and its data. You can receive this message from the :ref:`NeuralNetwork` node or you could create this message | ||
| 5 | 5 | on the host, populate the tensor with the data and send the message to the :code:`input` of the :ref:`NeuralNetwork` node. | |
| 6 | 6 | ||
| 7 | 7 | Reference | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,12 @@ | |||
| 1 | 1 | NeuralNetwork | |
| 2 | 2 | ============= | |
| 3 | 3 | ||
| 4 | - Runs a neural inference on input data. Neural network has to be a :code:`.blob` type. Instructions on how to compile your neural network (NN) to :code:`.blob` | ||
| 5 | - can be found `here <https://docs.luxonis.com/en/latest/pages/model_conversion/>`__. | ||
| 4 | + This node runs neural inference on input data. Any OpenVINO neural networks can be run using this node, as long as the VPU `supports all layers <https://docs.luxonis.com/en/latest/pages/model_conversion/#unsupported-layer-type-layer-type>`__. | ||
| 5 | + This allows you to pick from **200+ pre-trained model** from `Open Model Zoo <https://github.com/openvinotoolkit/open_model_zoo>`__ and `DepthAI Model Zoo <https://github.com/luxonis/depthai-model-zoo>`__ | ||
| 6 | + and directly run it on the OAK device. | ||
| 7 | + | ||
| 8 | + Neural network has to be in :code:`.blob` format to be compatible with the VPU. Instructions on how to compile | ||
| 9 | + your neural network (NN) to :code:`.blob` can be found `here <https://docs.luxonis.com/en/latest/pages/model_conversion/>`__. | ||
| 6 | 10 | ||
| 7 | 11 | ||
| 8 | 12 | How to place it | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,11 +53,28 @@ Zero term tracking performs object association, which means that it does not con | |||
| 53 | 53 | Object association would mean that detected objects from an external detector are mapped with tracked objects which has been detected and is being tracked from | |
| 54 | 54 | previous frames. | |
| 55 | 55 | ||
| 56 | - Supported object tracker types: | ||
| 56 | + Short term tracking | ||
| 57 | + ################### | ||
| 57 | 58 | ||
| 59 | + Short-term tracking allows to track objects between frames, thereby reducing the need to run object detection on each frame. This works great with NN | ||
| 60 | + models that can't achieve 30FPS (eg. `YoloV5 <https://github.com/luxonis/depthai-experiments/tree/master/gen2-yolov5>`__); tracker can | ||
| 61 | + provide tracklets when there was no inference, so the whole system can run at 30FPS. | ||
| 62 | + | ||
| 63 | + Supported object tracker types | ||
| 64 | + ############################## | ||
| 65 | + | ||
| 66 | + - :code:`SHORT_TERM_KCF`: Kernelized Correlation Filter tracking. KCF utilizes properties of circulant matrix to enhance the processing speed. Paper `here <https://www.robots.ox.ac.uk/~joao/publications/henriques_tpami2015.pdf>`__. | ||
| 67 | + - :code:`SHORT_TERM_IMAGELESS`: Short-term tracking allows to track objects on frames where object detection was skipped, by extrapolating object trajectory from previous detections. | ||
| 58 | 68 | - :code:`ZERO_TERM_COLOR_HISTOGRAM`: Utilizes position, shape and input image information such as RGB histogram to perform object tracking. | |
| 59 | 69 | - :code:`ZERO_TERM_IMAGELESS`: Only utilizes rectangular shape of detected object and position information for object tracking. It does not use color information of tracking objects. It achieves higher throughput than ZERO_TERM_COLOR_HISTOGRAM. User needs to consider the trade-off between throughput and accuracy when choosing the object tracker type. | |
| 60 | 70 | ||
| 71 | + A similar comparison of object trackers with more information can be found `here <https://github.com/openvinotoolkit/dlstreamer_gst/wiki/Object-tracking#object-tracking-types>`__. | ||
| 72 | + | ||
| 73 | + Maximum number of tracked objects | ||
| 74 | + ################################# | ||
| 75 | + | ||
| 76 | + :code:`SHORT_TERM_KCF` can track up to 60 objects at once, while all other trackers can (theoretically) track up to 1000 objects at once. | ||
| 77 | + | ||
| 61 | 78 | Usage | |
| 62 | 79 | ##### | |
| 63 | 80 | ||
@@ -69,7 +86,7 @@ Usage | |||
| 69 | 86 | objectTracker = pipeline.create(dai.node.ObjectTracker) | |
| 70 | 87 | ||
| 71 | 88 | objectTracker.setDetectionLabelsToTrack([15]) # Track only person | |
| 72 | - # Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS | ||
| 89 | + # Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS, SHORT_TERM_IMAGELESS, SHORT_TERM_KCF | ||
| 73 | 90 | objectTracker.setTrackerType(dai.TrackerType.ZERO_TERM_COLOR_HISTOGRAM) | |
| 74 | 91 | # Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID | |
| 75 | 92 | objectTracker.setTrackerIdAssigmentPolicy(dai.TrackerIdAssigmentPolicy.SMALLEST_ID) | |
@@ -83,7 +100,7 @@ Usage | |||
| 83 | 100 | auto objectTracker = pipeline.create<dai::node::ObjectTracker>(); | |
| 84 | 101 | ||
| 85 | 102 | objectTracker->setDetectionLabelsToTrack({15}); // Track only person | |
| 86 | - // Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS | ||
| 103 | + // Possible tracking types: ZERO_TERM_COLOR_HISTOGRAM, ZERO_TERM_IMAGELESS, SHORT_TERM_IMAGELESS, SHORT_TERM_KCF | ||
| 87 | 104 | objectTracker->setTrackerType(dai::TrackerType::ZERO_TERM_COLOR_HISTOGRAM); | |
| 88 | 105 | // Take the smallest ID when new object is tracked, possible options: SMALLEST_ID, UNIQUE_ID | |
| 89 | 106 | objectTracker->setTrackerIdAssigmentPolicy(dai::TrackerIdAssigmentPolicy::SMALLEST_ID); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ An output is a displayed RGB cropped frame, that can be manipulated using the fo | |||
| 16 | 16 | #. `k` and `l` will decrease/increase the sensitivity iso | |
| 17 | 17 | #. `,` and `.` will decrease/increase the focus range | |
| 18 | 18 | ||
| 19 | - .. rubric:: Similiar samples: | ||
| 19 | + .. rubric:: Similar samples: | ||
| 20 | 20 | ||
| 21 | 21 | - :ref:`Mono Camera Control` | |
| 22 | 22 | - :ref:`Depth Crop Control` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ Please check out :ref:`ColorCamera` node to get a better view. | |||
| 11 | 11 | ||
| 12 | 12 | If you want to get higher resolution RGB frames sample please visit :ref:`RGB video`. | |
| 13 | 13 | ||
| 14 | - .. rubric:: Similiar samples: | ||
| 14 | + .. rubric:: Similar samples: | ||
| 15 | 15 | ||
| 16 | 16 | - :ref:`RGB Video` (higher resolution) | |
| 17 | 17 | - :ref:`Mono Preview` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ RGB video | |||
| 4 | 4 | This example shows how to use high resolution video at low latency. Compared to :ref:`RGB Preview`, this demo outputs NV12 frames whereas | |
| 5 | 5 | preview frames are BGR and are not suited for larger resoulution (eg. 1920x1080). Preview is more suitable for either NN or visualization purposes. | |
| 6 | 6 | ||
| 7 | - .. rubric:: Similiar samples: | ||
| 7 | + .. rubric:: Similar samples: | ||
| 8 | 8 | ||
| 9 | 9 | - :ref:`RGB Preview` (lower resolution) | |
| 10 | 10 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ Mono & MobilenetSSD | |||
| 4 | 4 | This example shows how to run MobileNetv2SSD on the right grayscale camera and how to display the | |
| 5 | 5 | neural network results on a preview of the right camera stream. | |
| 6 | 6 | ||
| 7 | - .. rubric:: Similiar samples: | ||
| 7 | + .. rubric:: Similar samples: | ||
| 8 | 8 | ||
| 9 | 9 | - :ref:`RGB & MobilenetSSD` | |
| 10 | 10 | - :ref:`RGB & MobileNetSSD @ 4K` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments