Ttyler
- Oct 30, 2024
- Joined Jul 29, 2022
- 0 best answers
I'm trying to do the same thing, and have displayed the depth frame and depth bounding boxes as shown in the example provided. The bounding boxes do not seem to match the bounding boxes from the stretched camera preview. What suggestions would you have for fixing this? I'm thinking I could split the YoloSpatialDetectionNetwork into a YoloDetectionNetwork and a SpatialLocationCalculator, and warp the bounding box that is output from the YoloDetectionNetwork according to how the feed was stretched, and then feed that into the SpatialLocationCalculator. Does this make sense, and/or are there other possible solutions?
- Edited
So, our Oak D PoE camera got mounted upside down... we're trying to perform spatial detection using a YoloSpatialDetection node with a model trained on right side up images. I was able to simply rotate the color camera feed by 180 degrees using an ImageManip node and link that with YoloSpatialDetection, but am having trouble with flipping the mono cameras / depth information. I've tried these solutions:
1) Rotating the mono cameras by 180 degrees using an ImageManip node but am getting
[error] Output image is bigger (2764800B) than maximum frame size specified in properties (1048576B) - skipping frame
. Changing the maximum frame size withsetMaxOutputFrameSize()
to 2764800 then yields odd results.
2) Changing the image orientation of both mono cameras usingmonoLeft.setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
. This does flip the depth map, but the quality of the depth map greatly decreases.
monoRight.setImageOrientation(dai.CameraImageOrientation.ROTATE_180_DEG)
3) Rotating the depth map by 180 degrees using an ImageManip node to then send into the YoloSpatialDetector. This results in[error] Output image is bigger (3276800B) than maximum frame size specified in properties (1048576B) - skipping frame
. I thought possibly the issue might be the frame type, so I tried includingmanipDepth.initialConfig.setFrameType(dai.ImgFrame.Type.RAW16)
, but was met with[system] [critical] Fatal error. Please report to developers. Log: 'ImageManipHelper' '54'
Let me know where to look for resources or what I can do to get this working, thanks!