philsupertramp/game-math
|
only include Magick++ if needed More...
#include <ImageDataSet.h>
Public Member Functions | |
ImageDataSet (size_t inputCount, size_t outputCount) | |
virtual void | PrepareDirectory (const char *filePath) |
void | Cache () |
Public Member Functions inherited from DataSet | |
DataSet (const char *filePath, size_t inputCount, size_t outputCount) | |
DataSet (size_t inputCount, size_t outputCount) | |
virtual void | PrepareDirectory (const char *filePath) |
Public Attributes | |
size_t | imageHeight = 180 |
desired image height More... | |
size_t | imageWidth = 180 |
desired image width More... | |
double | validationShare = 0.2 |
percentage of validation data More... | |
const char * | trainDirectory = "../../resources/image_classification/training/" |
target directory for training More... | |
std::vector< MatrixDS< bool > > | classes |
representation of all classes More... | |
std::vector< std::string > | classNames |
representation of all class names More... | |
size_t | totalCount = 0 |
total number of data records More... | |
size_t | trainingCount = 0 |
number of training data records More... | |
size_t | validationCount = 0 |
number of validation data records More... | |
Public Attributes inherited from DataSet | |
size_t | InputCount |
number input elements More... | |
size_t | OutputCount |
number output elements More... | |
Set | Training |
set for training More... | |
Set | Validation |
set for validation of training More... | |
Set | Test |
set to test after training More... | |
int | maxEpoch = 1000 |
number of epochs while training More... | |
double | stopThreshold = 0.001 |
threshold for loss to prevent over-fitting More... | |
double | eta = 0.0051 |
learning rate More... | |
int | batchSize = 5 |
number of elements per batch More... | |
bool | verbose = false |
use verbose output during fitting More... | |
only include Magick++ if needed
Image data set representation
|
inline |
default constructor
inputCount | |
outputCount |
|
inline |
loads data set into memory
we split the dataset into
Example: 100 images => 80 training, 20 validation, 0 test
|
inlinevirtual |
prepares a new set of data based on passed filePath
filePath | path name of directory to prepare |
identifies "classes" as files in nested directories
Reimplemented from DataSet.
std::vector<MatrixDS<bool> > ImageDataSet::classes |
representation of all classes
std::vector<std::string> ImageDataSet::classNames |
representation of all class names
size_t ImageDataSet::imageHeight = 180 |
desired image height
size_t ImageDataSet::imageWidth = 180 |
desired image width
size_t ImageDataSet::totalCount = 0 |
total number of data records
const char* ImageDataSet::trainDirectory = "../../resources/image_classification/training/" |
target directory for training
size_t ImageDataSet::trainingCount = 0 |
number of training data records
size_t ImageDataSet::validationCount = 0 |
number of validation data records
double ImageDataSet::validationShare = 0.2 |
percentage of validation data