Hi Luxonis Team,
I am seeking assistance with a challenge I am facing in detecting cans as they pass through a conveyor belt. The conveyor processes approximately 3-4 cans per second, and I am using a YOLOv8n model trained on 640x640 images to detect these cans.
The model performs accurately when tested locally on static images. However, when integrated into the Oak camera pipeline, I encounter issues with detection accuracy. The model frequently misses detections and fails to fully capture the cans in the video stream.
I have attached a video demonstrating the problem and included the pipeline definition for reference. I would greatly appreciate any insights or suggestions to improve the performance of the model for this high-speed detection use case.
pipeline = dai.Pipeline()
nn = pipeline.create(dai.node.YoloDetectionNetwork)
nnOut = pipeline.create(dai.node.XLinkOut) nnOut.setStreamName("nn")
camRgb = pipeline.create(dai.node.ColorCamera)
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camRgb.setIspScale(2,3)
camRgb.setInterleaved(False)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.BGR)
camRgb.setPreviewKeepAspectRatio(False)
camRgb.setFps(15)
camRgb.setPreviewSize(640,640)
xoutRgb = pipeline.create(dai.node.XLinkOut)
nnNetworkOut = pipeline.create(dai.node.XLinkOut)
nnNetworkOut.setStreamName("nnNetwork")
xoutRgb.setStreamName("rgb")
# Universal Properties
nn.setConfidenceThreshold(0.30)
nn.setNumClasses(1)
nn.setCoordinateSize(4) *
nn.setAnchors([])* *
nn.setAnchorMasks({})*
nn.setIouThreshold(0.50)
nn.setBlobPath(nnPath)
nn.setNumInferenceThreads(2)
nn.input.setBlocking(False)
nn.input.setQueueSize(1)
camRgb.video.link(xoutRgb.input)
camRgb.preview.link(nn.input)
nn.out.link(nnOut.input)
nn.outNetwork.link(nnNetworkOut.input
Thank you in advance for your help!
Best regards,