Skip to content

Commit 5caf106

Browse files
Merge pull request #912 from luxonis/develop
1.9.2 release
2 parents ec55504 + 4981eea commit 5caf106

File tree

108 files changed

+1242
-15570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+1242
-15570
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ resources/*.json
5959
# Virtual environment
6060
virtualenv/
6161
venv/
62+
.venv/
6263

6364
# DepthAI recordings
6465
recordings/

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "depthai_sdk/src/depthai_sdk/components/integrations/depthai_pipeline_graph"]
2+
path = depthai_sdk/src/depthai_sdk/components/integrations/depthai_pipeline_graph
3+
url = https://github.com/luxonis/depthai_pipeline_graph

depthai_sdk/docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Luxonis'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '1.0.0'
25+
release = '1.9.2'
2626

2727

2828
# -- General configuration ---------------------------------------------------

depthai_sdk/docs/source/features/recording.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ stream and mono streams. You can open the rosbag with the `RealSense Viewer <htt
7171
-----------------
7272

7373
An alternative to Rosbags are `mcap files <https://github.com/foxglove/mcap>`__ which can be viewed with `Foxglove studio <https://foxglove.dev/>`__.
74-
You can find `MCAP recording example here <https://github.com/luxonis/depthai/blob/main/depthai_sdk/examples/recording/mcap-record.py>`__.
74+
You can find `MCAP recording example here <https://github.com/luxonis/depthai/blob/main/depthai_sdk/examples/recording/mcap_record.py>`__.
7575
Currently supported streams:
7676

7777
- MJPEG encoded color/left/right/disparity. Lossless MJPEG/H264/H265 aren't supported by Foxglove Studio.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from depthai_sdk import OakCamera
2+
3+
with OakCamera() as oak:
4+
cama = oak.create_camera('cama,c', resolution='1200p')
5+
camb = oak.create_camera('camb,c', resolution='1200p')
6+
camc = oak.create_camera('camc,c', resolution='1200p')
7+
# stereo = oak.create_stereo(left=left, right=right)
8+
9+
oak.visualize([cama, camb,camc], fps=True, scale=2/3)
10+
oak.start(blocking=True)

depthai_sdk/examples/CameraComponent/rgb_mono_preview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
left = oak.create_camera('left')
66
right = oak.create_camera('right')
77
oak.visualize([color, left, right], fps=True)
8-
oak.start(blocking=True)
8+
oak.start(blocking=True)
Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,11 @@
1-
import cv2
2-
import numpy as np
3-
4-
from depthai_sdk import OakCamera, DetectionPacket, Visualizer
5-
6-
NN_WIDTH, NN_HEIGHT = 513, 513
7-
8-
9-
def process_mask(output_tensor):
10-
class_colors = [[0, 0, 0], [0, 255, 0]]
11-
class_colors = np.asarray(class_colors, dtype=np.uint8)
12-
output = output_tensor.reshape(NN_WIDTH, NN_HEIGHT)
13-
output_colors = np.take(class_colors, output, axis=0)
14-
return output_colors
15-
16-
17-
def callback(packet: DetectionPacket, visualizer: Visualizer):
18-
frame = packet.frame
19-
mask = packet.img_detections.mask
20-
21-
output_colors = process_mask(mask)
22-
output_colors = cv2.resize(output_colors, (frame.shape[1], frame.shape[0]))
23-
24-
frame = cv2.addWeighted(frame, 1, output_colors, 0.2, 0)
25-
cv2.imshow('DeepLabV3 person segmentation', frame)
1+
from depthai_sdk import OakCamera
262

273

284
with OakCamera() as oak:
295
color = oak.create_camera('color', resolution='1080p')
306

317
nn = oak.create_nn('deeplabv3_person', color)
32-
nn.config_nn(resize_mode='stretch')
8+
nn.config_nn(resize_mode='letterbox')
339

34-
oak.callback(nn, callback=callback)
10+
visualizer = oak.visualize([nn, nn.out.passthrough], fps=True)
3511
oak.start(blocking=True)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from depthai_sdk import OakCamera
2+
3+
with OakCamera() as oak:
4+
color = oak.create_camera('color', encode='mjpeg', fps=10)
5+
nn = oak.create_nn('mobilenet-ssd', color, spatial=True)
6+
oak.visualize([nn.out.encoded])
7+
oak.start(blocking=True)

depthai_sdk/examples/NNComponent/roboflow_integration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
model_config = {
99
'source': 'roboflow', # Specify that we are downloading the model from Roboflow
1010
'model':'american-sign-language-letters/6',
11-
'key':'d2OP8nbhA9rZcWd6G8p1' # Fake API key, replace with your own!
11+
'key':'181b0f6e43d59ee5ea421cd77f6d9ea2a4b059f8' # Fake API key, replace with your own!
1212
}
1313
nn = oak.create_nn(model_config, color)
1414
oak.visualize(nn, fps=True)
15-
oak.start(blocking=True)
15+
oak.start(blocking=True)

depthai_sdk/examples/NNComponent/yolo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
with OakCamera() as oak:
44
color = oak.create_camera('color')
55
nn = oak.create_nn('yolo-v3-tf', color)
6-
oak.visualize([nn, color], scale=2 / 3, fps=True) # 1080P -> 720P
6+
oak.visualize([nn, color], scale=2 / 3, fps=True) # 1080P -> 720P
77
# oak.show_graph()
8-
oak.start(blocking=True)
8+
oak.start(blocking=True)

0 commit comments

Comments
 (0)