Class ImageNetLabels

  • All Implemented Interfaces:
    Labels

    public class ImageNetLabels
    extends BaseLabels
    • Method Detail

      • getLabel

        public String getLabel​(int n)
        Returns the description of tne nth class in the 1000 classes of ImageNet.
        Specified by:
        getLabel in interface Labels
        Overrides:
        getLabel in class BaseLabels
        Parameters:
        n -
        Returns:
      • getURL

        protected URL getURL()
        Specified by:
        getURL in class BaseLabels
        Returns:
        URL of the resource to download
      • resourceName

        protected String resourceName()
        Specified by:
        resourceName in class BaseLabels
        Returns:
        Name of the resource (used for inferring local storage parent directory)
      • resourceMD5

        protected String resourceMD5()
        Specified by:
        resourceMD5 in class BaseLabels
        Returns:
        MD5 of the resource at getURL()
      • decodePredictions

        public String decodePredictions​(INDArray predictions)
        Given predictions from the trained model this method will return a string listing the top five matches and the respective probabilities
        Parameters:
        predictions -
        Returns: