Skip to content

Commit

Permalink
fix 4.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Bvallon-sl committed Oct 8, 2024
1 parent 84d129b commit 30cdb07
Show file tree
Hide file tree
Showing 8 changed files with 443 additions and 19 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2949,6 +2949,18 @@ struct STEREOLABS_API FSlObjectDetectionParameters
UPROPERTY(EditAnywhere, BlueprintReadWrite)
ESlObjectDetectionModel DetectionModel;

/* In a multi camera setup, specify which group this model belongs to. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FString FusionObjectsGroupName;

/* Path to the YOLO-like onnx file for custom object detection ran in the ZED SDK. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FString CustomOnnxFile;

/* Resolution to the YOLO-like onnx file for custom object detection ran in the ZED SDK. This resolution defines the input tensor size for dynamic shape ONNX model only.
The batch and channel dimensions are automatically handled, it assumes it's color images like default YOLO models. */
FIntPoint CustomOnnxDynamicInputShape;

/* Defines a upper depth range for detections. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MaxRange;
Expand Down Expand Up @@ -2982,6 +2994,9 @@ struct STEREOLABS_API FSlObjectDetectionParameters
bEnableTracking(true),
bEnableSegmentation(false),
DetectionModel(ESlObjectDetectionModel::ODM_MultiClassBoxFast),
FusionObjectsGroupName(""),
CustomOnnxFile(""),
CustomOnnxDynamicInputShape(FIntPoint(512, 512)),
MaxRange(-1.0f),
BatchParameters(FSlBatchParameters()),
FilteringMode(ESlObjectFilteringMode::OFM_NMS3D),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,13 @@ namespace sl
ODParameters.enable_segmentation = UnrealData.bEnableSegmentation;
ODParameters.max_range = UnrealData.MaxRange;
ODParameters.detection_model = (SL_OBJECT_DETECTION_MODEL)UnrealData.DetectionModel;
ODParameters.custom_onnx_file = TCHAR_TO_UTF8(*UnrealData.CustomOnnxFile);
ODParameters.fused_objects_group_name = TCHAR_TO_UTF8(*UnrealData.FusionObjectsGroupName);

struct SL_Resolution res;
res.width = UnrealData.CustomOnnxDynamicInputShape.X;
res.height = UnrealData.CustomOnnxDynamicInputShape.Y;
ODParameters.custom_onnx_dynamic_input_shape = res;

SL_BatchParameters batchParameters;
batchParameters.enable = UnrealData.BatchParameters.bEnable;
Expand Down
2 changes: 1 addition & 1 deletion Plugins/Stereolabs/Source/Stereolabs/Stereolabs.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void LoadZEDSDK(ReadOnlyTargetRules Target, string DirPath)
// Check SDK version
string DefinesHeaderFilePath = Path.Combine(DirPath, "include\\sl\\Camera.hpp");
string Major = "4";
string Minor = "1";
string Minor = "2";
//string Patch = "0";

// Find SDK major and minor version and compare
Expand Down
Binary file not shown.
Loading

0 comments on commit 30cdb07

Please sign in to comment.