splitDetections function

Split detections by tag