Can't get a confidence value from

I fixed that section of my code with a previous example on the old forum:

I will make another post in a few days if i can’t figure why I’m going wrong with the next step.

https://answers.opencv.org/question/224079/java-dnn-help/

            float[] data = new float[7];
            
            for (int i = 0; i < detections.rows(); i++) {
                detections.get(i, 0, data);
                double confidence = data[2];
               
                if (confidence > CONFIDENCE_THRESHOLD){
                    //frame.width //frame.height //frame.cols //frame.rows
                    int x1 = (int)(data[3] * frame.cols());
                    int y1 = (int)(data[4] * frame.rows());
                    int x2 = (int)(data[5] * frame.cols());
                    int y2 = (int)(data[6] * frame.rows());
                    bboxes.add(new Rect(x1, y1, x2 - x1, y2 - y1));
                    Imgproc.rectangle(frameFace, new org.opencv.core.Point(x1, y1), new org.opencv.core.Point(x2, y2), new org.opencv.core.Scalar(0, 255, 0), (int) Math.round(frame.rows() / 150), 8, 0);                   
                }