public final class SingleShotDetection
extends ai.djl.nn.AbstractBlock
SingleShotDetection is an implementation of Block that implements a Single Shot
Detection (SSD) model for object detection.| Modifier and Type | Class and Description |
|---|---|
static class |
SingleShotDetection.Builder
The Builder to construct a
SingleShotDetection. |
| Modifier and Type | Method and Description |
|---|---|
static SingleShotDetection.Builder |
builder()
Creates a builder to build a
SingleShotDetection. |
ai.djl.ndarray.NDList |
forward(ai.djl.training.ParameterStore parameterStore,
ai.djl.ndarray.NDList inputs,
ai.djl.util.PairList<java.lang.String,java.lang.Object> params) |
static ai.djl.nn.convolutional.Conv2D |
getAnchorPredictionBlock(int numAnchors)
Creates a anchor prediction block used in an SSD.
|
ai.djl.nn.BlockList |
getChildren() |
static ai.djl.nn.convolutional.Conv2D |
getClassPredictionBlock(int numAnchors,
int numClasses)
Creates a class prediction block used in an SSD.
|
java.util.List<ai.djl.nn.Parameter> |
getDirectParameters() |
static ai.djl.nn.SequentialBlock |
getDownSamplingBlock(int numFilters)
Creates a
Block that reduces the size of a convolutional block by half. |
ai.djl.ndarray.types.Shape[] |
getOutputShapes(ai.djl.ndarray.NDManager manager,
ai.djl.ndarray.types.Shape[] inputShapes) |
ai.djl.ndarray.types.Shape |
getParameterShape(java.lang.String name,
ai.djl.ndarray.types.Shape[] inputShapes) |
ai.djl.ndarray.types.Shape[] |
initialize(ai.djl.ndarray.NDManager manager,
ai.djl.ndarray.types.DataType dataType,
ai.djl.ndarray.types.Shape... inputShapes) |
void |
loadParameters(ai.djl.ndarray.NDManager manager,
java.io.DataInputStream is) |
void |
saveParameters(java.io.DataOutputStream os) |
beforeInitialize, cast, clear, describeInput, getParameters, isInitialized, readInputShapes, saveInputShapes, setInitializer, setInitializerpublic ai.djl.ndarray.NDList forward(ai.djl.training.ParameterStore parameterStore,
ai.djl.ndarray.NDList inputs,
ai.djl.util.PairList<java.lang.String,java.lang.Object> params)
public java.util.List<ai.djl.nn.Parameter> getDirectParameters()
public ai.djl.ndarray.types.Shape getParameterShape(java.lang.String name,
ai.djl.ndarray.types.Shape[] inputShapes)
public ai.djl.ndarray.types.Shape[] getOutputShapes(ai.djl.ndarray.NDManager manager,
ai.djl.ndarray.types.Shape[] inputShapes)
public ai.djl.ndarray.types.Shape[] initialize(ai.djl.ndarray.NDManager manager,
ai.djl.ndarray.types.DataType dataType,
ai.djl.ndarray.types.Shape... inputShapes)
public ai.djl.nn.BlockList getChildren()
public void saveParameters(java.io.DataOutputStream os)
throws java.io.IOException
java.io.IOExceptionpublic void loadParameters(ai.djl.ndarray.NDManager manager,
java.io.DataInputStream is)
throws java.io.IOException,
ai.djl.MalformedModelException
java.io.IOExceptionai.djl.MalformedModelExceptionpublic static ai.djl.nn.SequentialBlock getDownSamplingBlock(int numFilters)
Block that reduces the size of a convolutional block by half.numFilters - the number of filtersBlock that reduces the size of a convolutional block by halfpublic static ai.djl.nn.convolutional.Conv2D getClassPredictionBlock(int numAnchors,
int numClasses)
numAnchors - the number of anchorsnumClasses - the number of classespublic static ai.djl.nn.convolutional.Conv2D getAnchorPredictionBlock(int numAnchors)
numAnchors - the number of anchorspublic static SingleShotDetection.Builder builder()
SingleShotDetection.