Skip to content

Commit

Permalink
remove debug svo paths (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bvallon-sl authored Nov 30, 2023
1 parent 9b50fb8 commit 39ecf09
Show file tree
Hide file tree
Showing 14 changed files with 318 additions and 99 deletions.
8 changes: 6 additions & 2 deletions ZEDCamera/Assets/ZED/Editor/Scripts/ZEDCameraEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class ZEDCameraEditor : Editor
private SerializedProperty meshPath;

//Object Detection Prop
private SerializedProperty OD_ImageSyncMode;
//private SerializedProperty OD_ImageSyncMode;
private SerializedProperty OD_ObjectTracking;
private SerializedProperty OD_2DMask;
private SerializedProperty OD_DetectionModel;
Expand Down Expand Up @@ -283,7 +283,7 @@ private void OnEnable()
meshPath = serializedObject.FindProperty("meshPath");

///Object Detection Serialized Properties
OD_ImageSyncMode = serializedObject.FindProperty("objectDetectionImageSyncMode");
//OD_ImageSyncMode = serializedObject.FindProperty("objectDetectionImageSyncMode");
OD_ObjectTracking = serializedObject.FindProperty("objectDetectionTracking");

OD_2DMask = serializedObject.FindProperty("objectDetection2DMask");
Expand Down Expand Up @@ -1002,6 +1002,10 @@ public override void OnInspectorGUI()
GUIContent BT_MaxRangeLabel = new GUIContent("Max Detection Range", "Defines a upper depth range for detections.");
BT_MaxRange.floatValue = EditorGUILayout.Slider(BT_MaxRangeLabel, BT_MaxRange.floatValue, 0, 40.0f);

GUIContent BT_Object2DMaskLabel = new GUIContent("Enable Segmentation", "Whether to calculate 2D masks for each object, showing exactly which pixels within the 2D bounding box are the object.\r\n\n" +
"Must be on when Object Detection starts. Requires more performance, so do not enable unless needed.");
BT_2DMask.boolValue = EditorGUILayout.Toggle(BT_Object2DMaskLabel, BT_2DMask.boolValue);

GUIContent BT_AllowReducedPrecisionInferenceLabel = new GUIContent("Allow Reduced Precision Inference", "Allow inference to run at a lower precision to improve runtime and memory usage.");
BT_AllowReducedPrecisionInference.boolValue = EditorGUILayout.Toggle(BT_AllowReducedPrecisionInferenceLabel, BT_AllowReducedPrecisionInference.boolValue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: advancedPanelOpen
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: bodyTrackingModel
Expand Down Expand Up @@ -661,13 +661,17 @@ PrefabInstance:
propertyPath: manualOffset.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6327103935139800441, guid: ca18a88838151284380d84fc86d327e5, type: 3}
propertyPath: manualOffset.z
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: 6327103935139800441, guid: ca18a88838151284380d84fc86d327e5, type: 3}
propertyPath: smoothingValue
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6327103935139800441, guid: ca18a88838151284380d84fc86d327e5, type: 3}
propertyPath: automaticOffset
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6327103935139800441, guid: ca18a88838151284380d84fc86d327e5, type: 3}
propertyPath: enableSmoothing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ MonoBehaviour:
- {r: 0.412, g: 0.4, b: 0.804, a: 1}
- {r: 1, g: 0.725, b: 0, a: 1}
- {r: 0.989, g: 0.388, b: 0.419, a: 1}
showObjectMask: 0
showObjectMask: 1
showONTracked: 1
showSEARCHINGTracked: 0
showOFFTracked: 1
Expand Down Expand Up @@ -611,7 +611,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: bodyTrackingFoldoutOpen
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: estimateInitialPosition
Expand Down Expand Up @@ -643,7 +643,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionFoldoutOpen
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionImageSyncMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,17 @@ PrefabInstance:
propertyPath: svoRealTimeMode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: setFloorAsOrigin
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: svoInputFileName
value:
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: trackingIsStatic
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: advancedPanelOpen
Expand Down Expand Up @@ -286,6 +290,10 @@ PrefabInstance:
propertyPath: objectDetectionFoldoutOpen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionFilteringMode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionImageSyncMode
value: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,177 +166,143 @@ PrefabInstance:
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: FPS
value: 30
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: depthMode
value: 3
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: inputType
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: resolution
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: sensingMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: svoLoopBack
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: streamInputIP
value: 127.0.0.1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: depthOcclusion
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: enableTracking
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: m_maxDepthRange
value: 40
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: svoRealTimeMode
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: svoInputFileName
value:
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: trackingIsStatic
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: advancedPanelOpen
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: enableSpatialMemory
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionModel
value: 5
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: recordingFoldoutOpen
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: camControlFoldoutOpen
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetection2DMask
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: estimateInitialPosition
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectClassPersonFilter
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionTracking
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectClassVehicleFilter
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionFoldoutOpen
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionImageSyncMode
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: bagDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: animalDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: objectDetectionConfidenceThreshold
value: 50
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: personDetectionConfidenceThreshold
value: 20
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: vehicleDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: OD_personDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: electronicsDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
- target: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
propertyPath: fruitVegetableDetectionConfidenceThreshold
value: 60
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
--- !u!114 &56380649 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42,
type: 3}
m_CorrespondingSourceObject: {fileID: 114491592745282986, guid: 76db3eb81fd21ae45bab5204e324ae42, type: 3}
m_PrefabInstance: {fileID: 56380648}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
Expand Down Expand Up @@ -485,9 +451,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
zedManager: {fileID: 56380649}
startObjectDetectionAutomatically: 1
boundingBoxPrefab: {fileID: 1438017172825460, guid: 2d803190bc4738d4daf5932468a5495e,
type: 3}
detectionMode: 0
startAIModuleAutomatically: 0
boundingBoxPrefab: {fileID: 1438017172825460, guid: 2d803190bc4738d4daf5932468a5495e, type: 3}
boxColors:
- {r: 0.23137257, g: 0.909804, b: 0.6901961, a: 1}
- {r: 0.098039225, g: 0.6862745, b: 0.81568635, a: 1}
Expand All @@ -514,9 +480,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 476f190cf5e4a3b42af5473614db052f, type: 3}
m_Name:
m_EditorClassIdentifier:
model: Assets/OpenCVForUnity/StreamingAssets/dnn/yolov4-tiny.weights
config: Assets/OpenCVForUnity/StreamingAssets/dnn/yolov4-tiny.cfg
classes: Assets/OpenCVForUnity/StreamingAssets/dnn/coco.names
model: Assets/StreamingAssets/OpenCVForUnity/dnn/yolov4-tiny.weights
config: Assets/StreamingAssets/OpenCVForUnity/dnn/yolov4-tiny.cfg
classes: Assets/StreamingAssets/OpenCVForUnity/dnn/coco.names
classesFilter: []
confThreshold: 0.25
nmsThreshold: 0.25
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,11 @@ private void OnValidate()
{
lastShowObjectMaskValue = showObjectMask;
if (!zedManager) zedManager = ZEDManager.GetInstance(sl.ZED_CAMERA_ID.CAMERA_ID_01);
if (showObjectMask == true && zedManager != null && zedManager.objectDetection2DMask == false)
bool ShowMaskIsEnabled = detectionMode == DetectionMode.BodyTracking ? zedManager.bodyTracking2DMask : zedManager.objectDetection2DMask;
if (showObjectMask == true && zedManager != null && !ShowMaskIsEnabled)
{
Debug.LogError("ZED2DObjectVisualizer has showObjectMask enabled, but its ZEDManager has objectDetection2DMask disabled. " +
"objectDetection2DMask must be enabled when Object Detection is started or masks will not be visible.");
Debug.LogError("ZED2DObjectVisualizer has showObjectMask enabled, but its ZEDManager has objectDetection2DMask/bodyTracking2DMask disabled, depending on which detection mode you are using. " +
"objectDetection2DMask/bodyTracking2DMask must be enabled when Object Detection / Body Tracking is started or masks will not be visible.");
}
}
}
Expand Down
Loading

0 comments on commit 39ecf09

Please sign in to comment.