public Map<String, Double> classifyImageVGG16(IplImage iplImage) throws IOException {
    NativeImageLoader loader = new NativeImageLoader(224, 224, 3);
    BufferedImage buffImg = OpenCV.toBufferedImage(iplImage);
    INDArray image = loader.asMatrix(buffImg);
    // TODO: we should consider the model as not only the model, but also the
    // input transforms
    // for that model.
    DataNormalization scaler = new VGG16ImagePreProcessor();
    scaler.transform(image);
    INDArray[] output = vgg16.output(false, image);
    log.info("Complete with output from vgg16..");
    // TODO: return a more native datastructure!
    // String predictions = TrainedModels.VGG16.decodePredictions(output[0]);
    // log.info("Image Predictions: {}", predictions);
    return decodeVGG16Predictions(output[0]);
  }
public Map<String, Double> classifyImageVGG16(IplImage iplImage) throws IOException {
    NativeImageLoader loader = new NativeImageLoader(224, 224, 3);
    BufferedImage buffImg = OpenCV.toBufferedImage(iplImage);
    INDArray image = loader.asMatrix(buffImg);
   
   
   
    DataNormalization scaler = new VGG16ImagePreProcessor();
    scaler.transform(image);
    INDArray[] output = vgg16.output(false, image);
    log.info("Complete with output from vgg16..");
   
   
   
    return decodeVGG16Predictions(output[0]);
  }
public map<string, double> classifyimagevgg16(iplimage iplimage) throws ioexception { nativeimageloader loader = new nativeimageloader(224, 224, 3); bufferedimage buffimg = opencv.tobufferedimage(iplimage); indarray image = loader.asmatrix(buffimg); datanormalization scaler = new vgg16imagepreprocessor(); scaler.transform(image); indarray[] output = vgg16.output(false, image); log.info("complete with output from vgg16.."); return decodevgg16predictions(output[0]); }