diff --git a/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/NativeImageLoader.java b/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/NativeImageLoader.java
index cf3e4abbe..6f2424445 100644
--- a/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/NativeImageLoader.java
+++ b/datavec/datavec-data/datavec-data-image/src/main/java/org/datavec/image/loader/NativeImageLoader.java
@@ -57,14 +57,15 @@ public class NativeImageLoader extends BaseImageLoader {
"png", "tif", "tiff", "exr", "webp", "BMP", "GIF", "JPG", "JPEG", "JP2", "PBM", "PGM", "PPM", "PNM",
"PNG", "TIF", "TIFF", "EXR", "WEBP"};
- protected OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();
+ protected OpenCVFrameConverter.ToMat converter;
boolean direct = !Loader.getPlatform().startsWith("android");
/**
* Loads images with no scaling or conversion.
*/
- public NativeImageLoader() {}
+ public NativeImageLoader() {
+ }
/**
* Instantiate an image with the given
@@ -76,6 +77,7 @@ public class NativeImageLoader extends BaseImageLoader {
public NativeImageLoader(long height, long width) {
this.height = height;
this.width = width;
+ converter = new OpenCVFrameConverter.ToMat();
}
@@ -90,6 +92,7 @@ public class NativeImageLoader extends BaseImageLoader {
this.height = height;
this.width = width;
this.channels = channels;
+ converter = new OpenCVFrameConverter.ToMat();
}
/**
@@ -103,6 +106,7 @@ public class NativeImageLoader extends BaseImageLoader {
public NativeImageLoader(long height, long width, long channels, boolean centerCropIfNeeded) {
this(height, width, channels);
this.centerCropIfNeeded = centerCropIfNeeded;
+ converter = new OpenCVFrameConverter.ToMat();
}
/**
@@ -116,6 +120,7 @@ public class NativeImageLoader extends BaseImageLoader {
public NativeImageLoader(long height, long width, long channels, ImageTransform imageTransform) {
this(height, width, channels);
this.imageTransform = imageTransform;
+ converter = new OpenCVFrameConverter.ToMat();
}
/**
@@ -129,6 +134,7 @@ public class NativeImageLoader extends BaseImageLoader {
public NativeImageLoader(long height, long width, long channels, MultiPageMode mode) {
this(height, width, channels);
this.multiPageMode = mode;
+ converter = new OpenCVFrameConverter.ToMat();
}
protected NativeImageLoader(NativeImageLoader other) {
@@ -138,6 +144,7 @@ public class NativeImageLoader extends BaseImageLoader {
this.centerCropIfNeeded = other.centerCropIfNeeded;
this.imageTransform = other.imageTransform;
this.multiPageMode = other.multiPageMode;
+ converter = new OpenCVFrameConverter.ToMat();
}
@Override
diff --git a/datavec/datavec-data/datavec-data-image/src/test/java/org/datavec/image/loader/TestNativeImageLoader.java b/datavec/datavec-data/datavec-data-image/src/test/java/org/datavec/image/loader/TestNativeImageLoader.java
index 286aa3608..7df67bfe2 100644
--- a/datavec/datavec-data/datavec-data-image/src/test/java/org/datavec/image/loader/TestNativeImageLoader.java
+++ b/datavec/datavec-data/datavec-data-image/src/test/java/org/datavec/image/loader/TestNativeImageLoader.java
@@ -35,6 +35,8 @@ import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
import org.nd4j.common.resources.Resources;
import org.nd4j.common.tests.tags.NativeTag;
import org.nd4j.common.tests.tags.TagNames;
@@ -65,6 +67,8 @@ import static org.junit.jupiter.api.Assertions.fail;
@Slf4j
@NativeTag
@Tag(TagNames.FILE_IO)
+@Tag(TagNames.LARGE_RESOURCES)
+@Tag(TagNames.LONG_TEST)
public class TestNativeImageLoader {
static final long seed = 10;
static final Random rng = new Random(seed);
diff --git a/deeplearning4j/deeplearning4j-core/pom.xml b/deeplearning4j/deeplearning4j-core/pom.xml
index 08caec6f1..9d3e001d3 100644
--- a/deeplearning4j/deeplearning4j-core/pom.xml
+++ b/deeplearning4j/deeplearning4j-core/pom.xml
@@ -33,6 +33,11 @@
deeplearning4j-core
+
+ 1g
+ 1g
+
+
diff --git a/deeplearning4j/deeplearning4j-core/src/test/java/org/deeplearning4j/datasets/iterator/DataSetIteratorTest.java b/deeplearning4j/deeplearning4j-core/src/test/java/org/deeplearning4j/datasets/iterator/DataSetIteratorTest.java
index 126abac3d..25246f848 100644
--- a/deeplearning4j/deeplearning4j-core/src/test/java/org/deeplearning4j/datasets/iterator/DataSetIteratorTest.java
+++ b/deeplearning4j/deeplearning4j-core/src/test/java/org/deeplearning4j/datasets/iterator/DataSetIteratorTest.java
@@ -43,6 +43,8 @@ import org.deeplearning4j.optimize.listeners.ScoreIterationListener;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.parallel.Execution;
+import org.junit.jupiter.api.parallel.ExecutionMode;
import org.nd4j.common.tests.tags.NativeTag;
import org.nd4j.common.tests.tags.TagNames;
import org.nd4j.linalg.activations.Activation;
@@ -62,6 +64,8 @@ import org.junit.jupiter.api.extension.ExtendWith;
@DisplayName("Data Set Iterator Test")
@Tag(TagNames.FILE_IO)
@NativeTag
+@Tag(TagNames.LARGE_RESOURCES)
+@Tag(TagNames.LONG_TEST)
class DataSetIteratorTest extends BaseDL4JTest {
@Override