-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #912 from luxonis/develop
1.9.2 release
- Loading branch information
Showing
108 changed files
with
1,242 additions
and
15,570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,7 @@ resources/*.json | |
# Virtual environment | ||
virtualenv/ | ||
venv/ | ||
.venv/ | ||
|
||
# DepthAI recordings | ||
recordings/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "depthai_sdk/src/depthai_sdk/components/integrations/depthai_pipeline_graph"] | ||
path = depthai_sdk/src/depthai_sdk/components/integrations/depthai_pipeline_graph | ||
url = https://github.com/luxonis/depthai_pipeline_graph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from depthai_sdk import OakCamera | ||
|
||
with OakCamera() as oak: | ||
cama = oak.create_camera('cama,c', resolution='1200p') | ||
camb = oak.create_camera('camb,c', resolution='1200p') | ||
camc = oak.create_camera('camc,c', resolution='1200p') | ||
# stereo = oak.create_stereo(left=left, right=right) | ||
|
||
oak.visualize([cama, camb,camc], fps=True, scale=2/3) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,11 @@ | ||
import cv2 | ||
import numpy as np | ||
|
||
from depthai_sdk import OakCamera, DetectionPacket, Visualizer | ||
|
||
NN_WIDTH, NN_HEIGHT = 513, 513 | ||
|
||
|
||
def process_mask(output_tensor): | ||
class_colors = [[0, 0, 0], [0, 255, 0]] | ||
class_colors = np.asarray(class_colors, dtype=np.uint8) | ||
output = output_tensor.reshape(NN_WIDTH, NN_HEIGHT) | ||
output_colors = np.take(class_colors, output, axis=0) | ||
return output_colors | ||
|
||
|
||
def callback(packet: DetectionPacket, visualizer: Visualizer): | ||
frame = packet.frame | ||
mask = packet.img_detections.mask | ||
|
||
output_colors = process_mask(mask) | ||
output_colors = cv2.resize(output_colors, (frame.shape[1], frame.shape[0])) | ||
|
||
frame = cv2.addWeighted(frame, 1, output_colors, 0.2, 0) | ||
cv2.imshow('DeepLabV3 person segmentation', frame) | ||
from depthai_sdk import OakCamera | ||
|
||
|
||
with OakCamera() as oak: | ||
color = oak.create_camera('color', resolution='1080p') | ||
|
||
nn = oak.create_nn('deeplabv3_person', color) | ||
nn.config_nn(resize_mode='stretch') | ||
nn.config_nn(resize_mode='letterbox') | ||
|
||
oak.callback(nn, callback=callback) | ||
visualizer = oak.visualize([nn, nn.out.passthrough], fps=True) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from depthai_sdk import OakCamera | ||
|
||
with OakCamera() as oak: | ||
color = oak.create_camera('color', encode='mjpeg', fps=10) | ||
nn = oak.create_nn('mobilenet-ssd', color, spatial=True) | ||
oak.visualize([nn.out.encoded]) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import cv2 | ||
|
||
from depthai_sdk import OakCamera | ||
from depthai_sdk.components.stereo_component import WLSLevel | ||
from depthai_sdk.visualize.configs import StereoColor | ||
|
||
with OakCamera() as oak: | ||
stereo = oak.create_stereo('400p', fps=30) | ||
stereo.configure_postprocessing( | ||
colorize=StereoColor.RGB, | ||
stereo = oak.create_stereo('800p', fps=30) | ||
stereo.config_postprocessing( | ||
colorize=StereoColor.GRAY, | ||
colormap=cv2.COLORMAP_BONE, | ||
wls_filter=True, | ||
wls_lambda=8000, | ||
wls_sigma=1.5 | ||
wls_level=WLSLevel.HIGH | ||
) | ||
|
||
oak.visualize(stereo.out.depth) | ||
oak.visualize(stereo.out.disparity) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import cv2 | ||
|
||
from depthai_sdk import OakCamera | ||
from depthai_sdk.visualize.configs import StereoColor | ||
|
||
with OakCamera() as oak: | ||
stereo = oak.create_stereo('400p', fps=30, encode='h264') | ||
oak.visualize(stereo.out.encoded) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
from depthai_sdk import OakCamera, RecordType | ||
|
||
with OakCamera() as oak: | ||
color = oak.create_camera('color', resolution='1080P', fps=20, encode='H265') | ||
left = oak.create_camera('left', resolution='800p', fps=20, encode='H265') | ||
right = oak.create_camera('right', resolution='800p', fps=20, encode='H265') | ||
color = oak.create_camera('color', resolution='1080P', fps=10, encode='H265') | ||
left = oak.create_camera('left', resolution='800p', fps=10, encode='H265') | ||
right = oak.create_camera('right', resolution='800p', fps=10, encode='H265') | ||
|
||
stereo = oak.create_stereo(left=left, right=right) | ||
nn = oak.create_nn('mobilenet-ssd', color, spatial=stereo) | ||
|
||
# Sync & save all (encoded) streams | ||
oak.record([color.out.encoded, left.out.encoded, right.out.encoded], './', RecordType.VIDEO) | ||
oak.visualize([nn]) | ||
oak.record([color.out.encoded, left.out.encoded, right.out.encoded], './record', RecordType.VIDEO) | ||
oak.visualize([color.out.encoded], fps=True) | ||
|
||
oak.start(blocking=True) | ||
oak.start(blocking=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from marshmallow import Schema, fields | ||
|
||
from depthai_sdk.classes.yolo_config import YoloConfig | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.