docs: public static List<DetectedObject> getPredictedObjects(INDArray boundingBoxPriors, INDArray networkOutput, double confThreshold, double nmsThreshold){
          if(networkOutput.rank() != 4){
              throw new IllegalStateException("Invalid network output activations array: should be rank 4. Got array "
                      + "with shape " + Arrays.toString(networkOutput.shape()));
          }
          if(confThreshold < 0.0 || confThreshold > 1.0){
              throw new IllegalStateException("Invalid confidence threshold: must be in range [0,1]. Got: " + confThreshold);
          }
  
          // FIXME: int cast
          //Activations format: [mb, 5b+c, h, w]
          int mb = (int) networkOutput.size(0);
          int h = (int) networkOutput.size(2);
          int w = (int) networkOutput.size(3);
          int b = (int) boundingBoxPriors.size(0);
          int c = (int) (networkOutput.size(1)/b)-5;  //input.size(1) == b * (5 + C) -> C = (input.size(1)/b) - 5
  
          //Reshape from [minibatch, B*(5+C), H, W] to [minibatch, B, 5+C, H, W] to [minibatch, B, 5, H, W]
          INDArray output5 = networkOutput.dup('c').reshape(mb, b, 5+c, h, w);
          INDArray predictedConfidence = output5.get(all(), all(), point(4), all(), all());    //Shape: [mb, B, H, W]
          INDArray softmax = output5.get(all(), all(), interval(5, 5+c), all(), all());
  
          List<DetectedObject> out = new ArrayList<>();
          for( int i=0; i<mb; i++ ){
              for( int x=0; x<w; x++ ){
                  for( int y=0; y<h; y++ ){
                      for( int box=0; box<b; box++ ){
                          double conf = predictedConfidence.getDouble(i, box, y, x);
                          if(conf < confThreshold){
                              continue;
                          }
  
                          double px = output5.getDouble(i, box, 0, y, x); //Originally: in 0 to 1 in grid cell
                          double py = output5.getDouble(i, box, 1, y, x); //Originally: in 0 to 1 in grid cell
                          double pw = output5.getDouble(i, box, 2, y, x); //In grid units (for example, 0 to 13)
                          double ph = output5.getDouble(i, box, 3, y, x); //In grid units (for example, 0 to 13)
  
                          //Convert the "position in grid cell" to "position in image (in grid cell units)"
                          px += x;
                          py += y;
  
  
                          INDArray sm;
                          try (MemoryWorkspace wsO = Nd4j.getMemoryManager().scopeOutOfWorkspaces()) {
                              sm = softmax.get(point(i), point(box), all(), point(y), point(x)).dup();
                          }
  
                          out.add(new DetectedObject(i, px, py, pw, ph, sm, conf));
                      }
                  }
              }
          }
  
          if (nmsThreshold > 0) {
              nms(out, nmsThreshold);
          }
          return out;
      }