Skip to content

SVO recording via API on machine without GPU #183

@greenfieldvision

Description

@greenfieldvision

I have a ZED Mini camera and I'm trying to use the Python API to record an SVO file on an old laptop without GPU. Camera initialization fails with "NO GPU DETECTED" and there are further error printouts:

CUDA error at Camera.cpp:94 code=999(cudaErrorUnknown) "void __cdecl sl::Camera::close(void)"
CUDA error at Camera.cpp:148 code=999(cudaErrorUnknown) "void __cdecl sl::Camera::close(void)"
CUDA error at Camera.cpp:183 code=999(cudaErrorUnknown) "void __cdecl sl::Camera::close(void)"
CUDA error at sl_zed/CameraUtils.hpp:691 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at sl_zed/CameraUtils.hpp:707 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at sl_zed/CameraUtils.hpp:713 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at sl_zed/CameraUtils.hpp:716 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at sl_zed/CameraUtils.hpp:718 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at sl_zed/CameraUtils.hpp:726 code=999(cudaErrorUnknown) "void __cdecl sl::ObjectsDetectorHandler::clear(void)"
CUDA error at Camera.cpp:198 code=999(cudaErrorUnknown) "void __cdecl sl::Camera::close(void)"

I'm following the example from https://www.stereolabs.com/docs/video/recording/#using-the-recording-api , setting the compression mode to sl.SVO_COMPRESSION_MODE.LOSSLESS, which is supposed to be CPU based. Also setting depth mode to sl.DEPTH_MODE.NONE to make absolutely sure ZED doesn't attempt to use the GPU. The error seems to come from object detection, which AFAIU is not even available on ZED Mini. Can the code be updated to remove unnecessary dependencies?

Code snippets:

self.camera = sl.Camera()

init_params = sl.InitParameters()
init_params.depth_mode = sl.DEPTH_MODE.NONE
init_params.camera_resolution = sl.RESOLUTION.HD720
init_params.camera_fps = 15

error_code = self.camera.open(init_params)
if error_code != sl.ERROR_CODE.SUCCESS:
    print("failed to start the camera:", error_code)
recording_params = sl.RecordingParameters(
   video_filename=...,
   compression_mode=sl.SVO_COMPRESSION_MODE.LOSSLESS,
)

error_code = self.camera.enable_recording(recording_params)
if error_code != sl.ERROR_CODE.SUCCESS:
   print("failed to enable recording:", error_code)

The alternative is to use the ZED Explorer tool, which works on this old laptop, but is CPU intensive and cannot be customized to save less frequently, eg at 1 FPS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions