Hey everyone! I’m a student working on a final project for my undergrad machine learning course, and I’m trying to use DL4J for CNN image classification on this dataset:
I’ve gotten the network to run well on the CIFAR-10 dataset, but I’m having a little trouble switching over to this new bird species one since there’s no built-in DataSetIterator like there was for the CIFAR-10. How do I have to format the image file directory to work with the ImageRecordReader? The data-set is saved in the following format currently:
downloads\180-bird-species\train(BIRD_NAME)\001.jpg
or
downloads\180-bird-species\test(BIRD_NAME)\001.jpg,
where there are 180 species of birds in each train/test/validation folders.
The first link should tell you how it is supposed to be used generally, and the second link shows you how it is used to load MNIST train and test data that is effectively organized exactly like your bird species data.
The only real difference is that you’ve got 3 channels instead of 1 and that your width and height values are different.
EDIT: It seems that the ImageRecordReader is going into an in-determinant state:
Exception in thread “main” java.lang.IllegalStateException: Indeterminant state: record must not be null, or a file iterator must exist
at org.datavec.image.recordreader.BaseImageRecordReader.hasNext(BaseImageRecordReader.java:279)
at org.deeplearning4j.datasets.datavec.RecordReaderDataSetIterator.hasNext(RecordReaderDataSetIterator.java:446)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.doEvaluationHelper(MultiLayerNetwork.java:3392)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.doEvaluation(MultiLayerNetwork.java:3384)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.evaluate(MultiLayerNetwork.java:3578)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.evaluate(MultiLayerNetwork.java:3488)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.evaluate(MultiLayerNetwork.java:3319)
at org.example.App.(App.java:152)
at org.example.App.main(App.java:170)
Is there anything I can do to fix this? It was able to run for about 1500 iterations as per the UIserver.