-
Notifications
You must be signed in to change notification settings - Fork 374
saving to microSD card #178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Yes. Agreed - allowing direct storage to uSD would be super useful. We are planning to do it but do not have an ETA just yet. |
@CodingArcher TODO for this is some firmware side changes to detect and mount the SD card |
This discussion on our forum: https://discuss.luxonis.com/d/275-store-video-on-oak-d-localy |
@CodingArcher
More details over at: luxonis/depthai-python#445 |
PR description updated: luxonis/depthai-python#445
Can be tested with:
|
The access to SD card is working, which is great, however when I use the import depthai as dai
import time
from pathlib import Path
nnPath = str(
(Path(__file__).parent / Path('../models/person-vehicle-bike-detection-crossroad-1016_openvino_2021.4_6shave.blob')).resolve().absolute())
pipeline = dai.Pipeline()
cam = pipeline.create(dai.node.ColorCamera)
nn = pipeline.create(dai.node.MobileNetDetectionNetwork)
manip = pipeline.create(dai.node.ImageManip) # Used to convert image to NV12 type
jpeg = pipeline.create(dai.node.VideoEncoder)
jpeg.setDefaultProfilePreset(cam.getFps(), dai.VideoEncoderProperties.Profile.MJPEG)
# Properties
cam.setPreviewSize(512, 512)
cam.setInterleaved(False)
cam.setFps(40)
# Define a neural network that will make predictions based on the source frames
nn.setBlobPath(nnPath)
nn.setConfidenceThreshold(0.5)
nn.setNumInferenceThreads(2)
nn.input.setBlocking(False)
manip.initialConfig.setResize(800, 600)
manip.initialConfig.setFrameType(dai.ImgFrame.Type.NV12) # This is required, otherwise the VideoEncoder does not work
serverScript = pipeline.create(dai.node.Script)
serverScript .setProcessor(dai.ProcessorType.LEON_CSS)
serverScript .setScript("""
# NOTE: The server code would be here but is irrelevant for this example, since there is an issue within the pipeline
""")
# Linking
cam.preview.link(nn.input)
nn.out.link(serverScript.inputs["nnDetections"])
nn.passthrough.link(manip.inputImage)
manip.out.link(jpeg.input)
jpeg.bitstream.link(serverScript.inputs['jpeg'])
# Connect to device with pipeline
with dai.Device(pipeline) as device:
while not device.isClosed():
time.sleep(1) |
as the POE versions have amicro SD card slot aviable it would be great to be able to make use of this due to saving large video files it is better to store locally and then download after the recording has been completed
The text was updated successfully, but these errors were encountered: