From e97e616a80ee81b2afb8ee746f18663a13c208fc Mon Sep 17 00:00:00 2001 From: kartikdutt18 Date: Thu, 4 Jun 2020 10:26:46 +0530 Subject: [PATCH] Style Fixed --- dataloader/dataloader_impl.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dataloader/dataloader_impl.hpp b/dataloader/dataloader_impl.hpp index dd40a6ff..2bd9257b 100644 --- a/dataloader/dataloader_impl.hpp +++ b/dataloader/dataloader_impl.hpp @@ -73,7 +73,7 @@ template< LoadObjectDetectionDataset(datasetMap[dataset].trainingAnnotationPath, datasetMap[dataset].trainingImagesPath, datasetMap[dataset].classes, - validRatio, shuffle,augmentations, augmentationProbability); + validRatio, shuffle, augmentations, augmentationProbability); // Load testing data if any. Most object detection dataset // have private evaluation servers. @@ -84,6 +84,20 @@ template< datasetMap[dataset].imageHeight, datasetMap[dataset].imageDepth); } } + else if (datasetMap[dataset].datasetType == "image-classification") + { + LoadImageDatasetFromDirectory(datasetMap[dataset].trainingImagesPath, + datasetMap[dataset].imageWidth, datasetMap[dataset].imageHeight, + datasetMap[dataset].imageDepth, true, validRatio, shuffle, + augmentation, augmentationProbability); + + if (datasetMap[dataset].testingImagesPath.length() > 0) + { + LoadAllImagesFromDirectory(datasetMap[dataset].testingImagesPath, + testFeatures, testLabels, datasetMap[dataset].imageWidth, + datasetMap[dataset].imageHeight, datasetMap[dataset].imageDepth); + } + } // Preprocess the dataset. datasetMap[dataset].PreProcess(trainFeatures, trainLabels,