Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions datavec/datavec-data/datavec-data-image/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@
<classpathDependencyExcludes>
<classpathDependencyExclude>com.google.android:android</classpathDependencyExclude>
</classpathDependencyExcludes>
<includes>
<include>*.java</include>
<include>**/*.java</include>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
</includes>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.io.ClassPathResource;
import org.nd4j.common.tests.BaseND4JTest;

import java.io.File;
import java.util.Arrays;
Expand All @@ -32,7 +33,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

public class LabelGeneratorTest {
public class LabelGeneratorTest extends BaseND4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,25 @@

package org.datavec.image.loader;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.datavec.api.io.filters.BalancedPathFilter;
import org.datavec.api.records.reader.RecordReader;
import org.datavec.api.split.FileSplit;
import org.datavec.api.split.InputSplit;
import org.datavec.image.recordreader.ImageRecordReader;
import org.junit.Ignore;
import org.junit.Test;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.dataset.DataSet;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.SequenceInputStream;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Random;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;

/**
*
*/
public class LoaderTests {
public class LoaderTests extends BaseND4JTest {

private static void ensureDataAvailable(){
//Ensure test resources available by initializing CifarLoader and relying on auto download
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.datavec.image.loader;

import org.junit.Test;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.api.ndarray.INDArray;

import java.awt.image.BufferedImage;
Expand All @@ -25,7 +26,7 @@
import static org.junit.Assert.assertEquals;


public class TestImageLoader {
public class TestImageLoader extends BaseND4JTest {

private static long seed = 10;
private static Random rng = new Random(seed);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
Expand Down Expand Up @@ -55,7 +56,7 @@
* @author saudet
*/
@Slf4j
public class TestNativeImageLoader {
public class TestNativeImageLoader extends BaseND4JTest {
static final long seed = 10;
static final Random rng = new Random(seed);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.loader.FileBatch;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.common.io.ClassPathResource;

Expand All @@ -36,7 +37,7 @@

import static org.junit.Assert.*;

public class FileBatchRecordReaderTest {
public class FileBatchRecordReaderTest extends BaseND4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.resources.Resources;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.api.buffer.DataType;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
Expand All @@ -53,7 +54,7 @@
/**
* Created by Alex on 27/09/2016.
*/
public class TestImageRecordReader {
public class TestImageRecordReader extends BaseND4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.tests.BaseND4JTest;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.indexing.BooleanIndexing;
Expand All @@ -49,7 +50,7 @@

import static org.junit.Assert.*;

public class TestObjectDetectionRecordReader {
public class TestObjectDetectionRecordReader extends BaseND4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.nd4j.common.io.ClassPathResource;
import org.nd4j.common.tests.BaseND4JTest;

import java.io.File;
import java.util.Arrays;
Expand All @@ -29,7 +30,7 @@

import static org.junit.Assert.assertEquals;

public class TestVocLabelProvider {
public class TestVocLabelProvider extends BaseND4JTest {

@Rule
public TemporaryFolder testDir = new TemporaryFolder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import org.datavec.image.data.ImageWritable;
import org.junit.Test;
import org.nd4j.common.tests.BaseND4JTest;

import java.io.IOException;
import java.util.List;
Expand All @@ -29,7 +30,7 @@
/**
* Created by kepricon on 17. 5. 25.
*/
public class JsonYamlTest {
public class JsonYamlTest extends BaseND4JTest {
@Test
public void testJsonYamlImageTransformProcess() throws IOException {
int seed = 12345;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.datavec.image.data.ImageWritable;
import org.junit.Before;
import org.junit.Test;
import org.nd4j.common.tests.BaseND4JTest;

import static org.junit.Assert.assertEquals;

Expand All @@ -28,7 +29,7 @@
*
* @author raver119@gmail.com
*/
public class ResizeImageTransformTest {
public class ResizeImageTransformTest extends BaseND4JTest {
@Before
public void setUp() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.Random;

import org.bytedeco.opencv.opencv_core.*;
import org.nd4j.common.tests.BaseND4JTest;

import static org.bytedeco.opencv.global.opencv_core.*;
import static org.bytedeco.opencv.global.opencv_imgproc.*;
Expand All @@ -42,7 +43,7 @@
*
* @author saudet
*/
public class TestImageTransform {
public class TestImageTransform extends BaseND4JTest {
static final long seed = 10;
static final Random rng = new Random(seed);
static final OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();
Expand Down