@Override
    public List<RecognisedObject> recognise(InputStream stream, ContentHandler handler,
                                            Metadata metadata, ParseContext context)
            throws IOException, SAXException, TikaException {

        INDArray image = preProcessImage(imageLoader.asImageMatrix(stream, false).getImage());
        INDArray scores = graph.outputSingle(image);
        List<RecognisedObject> result = new ArrayList<>();
        for (int i = 0; i < scores.length(); i++) {
            if (scores.getDouble(i) > minConfidence) {
                String label = labelMap.get(i);
                String id = i + "";
                result.add(new RecognisedObject(label, labelLang, id, scores.getDouble(i)));
                LOG.debug("Found Object {}", label);
            }
        }
        return result;
    }
Loads the class to

@param stream label index stream
@return Map of integer -&gt; label name
@throws IOException    when the stream breaks unexpectedly
@throws ParseException when the input doesn't contain a valid JSON map
tika-parsers/tika-parsers-ml/tika-dl/src/main/java/org/apache/tika/dl/imagerec/DL4JInceptionV3Net.java