Class DarknetLabels
- java.lang.Object
-
- org.deeplearning4j.zoo.util.BaseLabels
-
- org.deeplearning4j.zoo.util.darknet.DarknetLabels
-
- All Implemented Interfaces:
Labels
public class DarknetLabels extends BaseLabels
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.zoo.util.BaseLabels
labels
-
-
Constructor Summary
Constructors Constructor Description DarknetLabels()
Callsthis(true)
.DarknetLabels(boolean shortnames)
DarknetLabels(boolean shortnames, int numClasses)
DarknetLabels(int numClasses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected URL
getURL()
protected String
resourceMD5()
protected String
resourceName()
-
Methods inherited from class org.deeplearning4j.zoo.util.BaseLabels
decodePredictions, getLabel, getLabels, getLabels, getResourceFile
-
-
-
-
Constructor Detail
-
DarknetLabels
public DarknetLabels() throws IOException
Callsthis(true)
. Defaults to 1000 clasess- Throws:
IOException
-
DarknetLabels
public DarknetLabels(int numClasses) throws IOException
- Parameters:
numClasses
- Number of classes (usually 1000 or 9000, depending on the model)- Throws:
IOException
-
DarknetLabels
public DarknetLabels(boolean shortnames) throws IOException
- Parameters:
shortnames
- if true, uses "imagenet.shortnames.list", otherwise "imagenet.labels.list".- Throws:
IOException
-
DarknetLabels
public DarknetLabels(boolean shortnames, int numClasses) throws IOException
- Parameters:
shortnames
- if true, uses "imagenet.shortnames.list", otherwise "imagenet.labels.list".numClasses
- Number of classes (usually 1000 or 9000, depending on the model)- Throws:
IOException
-
-
Method Detail
-
getURL
protected URL getURL()
- Specified by:
getURL
in classBaseLabels
- Returns:
- URL of the resource to download
-
resourceName
protected String resourceName()
- Specified by:
resourceName
in classBaseLabels
- Returns:
- Name of the resource (used for inferring local storage parent directory)
-
resourceMD5
protected String resourceMD5()
- Specified by:
resourceMD5
in classBaseLabels
- Returns:
- MD5 of the resource at getURL()
-
-