0

Hi dl4j stackers is it possible to get a yolo variant other than the 5 default params [x, y, w, h, p] here's what I have from the default dl4j-examples repo on github for a 13 x 13 grid-locked image

...
graphBuilder.addLayer("convolution2d_23",
                new ConvolutionLayer.Builder(1,1)
                        .nIn(1024)
                        .nOut(nBoxes* (5 +nClasses))//don't want the 5 default params always
                        .weightInit(WeightInit.XAVIER)
                        .stride(1,1)
                        .convolutionMode(ConvolutionMode.Same)
                        .weightInit(WeightInit.RELU)
                        .activation(Activation.IDENTITY)
                        .cudnnAlgoMode(cudnnAlgoMode)
                        .build(),
                "activation_22")
                .addLayer("outputs",
                        new Yolo2OutputLayer.Builder()
                                .boundingBoxPriors(priors)
                                .build(),
                        "convolution2d_23")
                .setOutputs("outputs");
graphBuilder.build();
...

I need a re-configuration for the Yolo2OutputLayer or a custom Yolo2OutputLayer class for an output layer capable of outputing any specific volume. currently I need to output a volume 13 x 13 x 80 in which a unit slice 1 x 1x 80 = 1 x 1 x 2[x, y, w, h, p, c, a0, a1,..., a31]

where 2 equals number of bounding boxes per cell

x - bounding box x coordinate - 1
y - bounding box y coordinate - 1
w - bounding box width - 1
h - bounding box height - 1
p - bounding box object confidence - 1

c - bounding box class(3 classes) - 3
a0...a31 - my custom parameters - 32

linker
  • 821
  • 1
  • 8
  • 20
  • thought about using the bounding box class `c` to encode my params `a0, ..., a31` since I can just change the nClasses variable from the code, I actually don't want a softmax multiclass classification, I want the kinda multi label classification as with the default 5 params – linker Nov 09 '19 at 12:27
  • It sounds like we could use multiple outputs to achieve this. Have you tried to do that? – Samuel Audet Nov 11 '19 at 01:19
  • do you mean connecting additional output layers to "convolution2d_23" i.e. `YoloOutputlayer + AdditionalOutputlayers` – linker Nov 12 '19 at 03:40
  • 1
    Yes, that kind of thing, see this network for example: https://github.com/eclipse/deeplearning4j/blob/master/rl4j/rl4j-core/src/main/java/org/deeplearning4j/rl4j/network/ac/ActorCriticFactoryCompGraphStdConv.java – Samuel Audet Nov 12 '19 at 07:57
  • **@Samuel Audet** aiswear if nobody else in the world it can only be you man... the perfect life saver. Jah bless!!! – linker Nov 13 '19 at 12:07

0 Answers0