Search in sources :

Example 6 with BorderType

use of boofcv.struct.border.BorderType in project BoofCV by lessthanoptimal.

the class TestFactoryWaveletDaub method biorthogonal_I32_inverse.

@Test
void biorthogonal_I32_inverse() {
    for (BorderType type : borderTypes) {
        for (int i = 5; i <= 5; i += 2) {
            WaveletDescription<WlCoef_I32> desc = FactoryWaveletDaub.biorthogonal_I32(i, type);
            checkBiorthogonal_I32(desc);
        }
    }
}
Also used : WlCoef_I32(boofcv.struct.wavelet.WlCoef_I32) BorderType(boofcv.struct.border.BorderType) Test(org.junit.jupiter.api.Test)

Example 7 with BorderType

use of boofcv.struct.border.BorderType in project BoofCV by lessthanoptimal.

the class ImageClassifierVggCifar10 method loadModel.

/**
 * Expects there to be two files in the provided directory:<br>
 * YuvStatistics.txt<br>
 * model.net<br>
 *
 * @param directory Directory containing model files
 * @throws IOException Throw if anything goes wrong while reading data
 */
@Override
public void loadModel(File directory) throws IOException {
    stats = DeepModelIO.load(new File(directory, "YuvStatistics.txt"));
    SequenceAndParameters<Tensor_F32, Function<Tensor_F32>> sequence = new ParseBinaryTorch7().parseIntoBoof(new File(directory, "model.net"));
    network = sequence.createForward(3, inputSize, inputSize);
    tensorOutput = new Tensor_F32(WI(1, network.getOutputShape()));
    BorderType type = BorderType.valueOf(stats.border);
    localNorm = new ImageLocalNormalization<>(GrayF32.class, type);
    kernel = DataManipulationOps.create1D_F32(stats.kernel);
}
Also used : Function(deepboof.Function) GrayF32(boofcv.struct.image.GrayF32) ParseBinaryTorch7(deepboof.io.torch7.ParseBinaryTorch7) Tensor_F32(deepboof.tensors.Tensor_F32) File(java.io.File) BorderType(boofcv.struct.border.BorderType)

Aggregations

BorderType (boofcv.struct.border.BorderType)7 Test (org.junit.jupiter.api.Test)5 WlCoef_F32 (boofcv.struct.wavelet.WlCoef_F32)2 WlCoef_I32 (boofcv.struct.wavelet.WlCoef_I32)2 ImplBilinearPixel_U8 (boofcv.alg.interpolate.impl.ImplBilinearPixel_U8)1 CameraPinhole (boofcv.struct.calib.CameraPinhole)1 CameraPinholeBrown (boofcv.struct.calib.CameraPinholeBrown)1 GrayF32 (boofcv.struct.image.GrayF32)1 GrayU8 (boofcv.struct.image.GrayU8)1 ImageGray (boofcv.struct.image.ImageGray)1 Function (deepboof.Function)1 ParseBinaryTorch7 (deepboof.io.torch7.ParseBinaryTorch7)1 Tensor_F32 (deepboof.tensors.Tensor_F32)1 File (java.io.File)1