Class SingleShotDetection.Builder

    • Method Detail

      • setSizes

        public SingleShotDetection.Builder setSizes​(java.util.List<java.util.List<java.lang.Float>> sizes)
        Sets the list of sizes of generated anchor boxes.
        Parameters:
        sizes - size of the input
        Returns:
        Returns this Builder
      • setRatios

        public SingleShotDetection.Builder setRatios​(java.util.List<java.util.List<java.lang.Float>> ratios)
        Sets the list of aspect ratios of generated anchor boxes.
        Parameters:
        ratios - size of the input
        Returns:
        Returns this Builder
      • setNumClasses

        public SingleShotDetection.Builder setNumClasses​(int numClasses)
        Sets the number of classes of objects to be detected.
        Parameters:
        numClasses - number of classes
        Returns:
        Returns this Builder
      • setBaseNetwork

        public SingleShotDetection.Builder setBaseNetwork​(ai.djl.nn.Block network)
        Sets the base network for the SSD framework.
        Parameters:
        network - Base network
        Returns:
        Returns this Builder
      • setNumFeatures

        public SingleShotDetection.Builder setNumFeatures​(int numFeatures)
        Sets the number of down sampling blocks to be applied. Down-sampling blocks are applied to the base network successively, and feature maps are drawn from the each of the blocks. This value is ignored if features is also set.
        Parameters:
        numFeatures - Number of down sampling blocks to be applied
        Returns:
        Returns this Builder
      • optFeatures

        public SingleShotDetection.Builder optFeatures​(java.util.List<ai.djl.nn.Block> features)
        Sets the Conv2d blocks to be appended to the network to get multi-output network.
        Parameters:
        features - List of Conv2d blocks to be appended
        Returns:
        Returns this Builder
      • optGlobalPool

        public SingleShotDetection.Builder optGlobalPool​(boolean globalPool)
        Sets the boolean whether to attach a global average pooling layer as the last output layer.
        Parameters:
        globalPool - Whether to attach a global average pooling layer as the last output layer
        Returns:
        Returns this Builder