MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The DatasetEx class provides the in-memory dataset functionality that is used by the image database to manage data sets.
Both the Testing and Training ImageSet objects are managed by the DatasetEx, which in turn coordinates the loading and usage of each.
More...
Public Member Functions | |
DatasetEx (Guid user, DatasetFactory factory, CryptoRandom random) | |
The DatasetEx constructor. More... | |
void | Reset () |
Reset the image indexes for both the training and testing image sets. More... | |
int | AddUser (Guid user) |
Adds a user of the dataset. More... | |
int | RemoveUser (Guid user) |
Remove a user of the dataset. More... | |
bool | Initialize (DatasetDescriptor ds, WaitHandle[] rgAbort, int nPadW=0, int nPadH=0, Log log=null, DB_LOAD_METHOD loadMethod=DB_LOAD_METHOD.LOAD_ALL, int nImageDbLoadLimit=0, bool bSkipMeanCheck=false) |
Initialize the DatasetEx by loading the training and testing data sources into memory. More... | |
DatasetEx | Clone (bool bReOrganizeByTime=false) |
Copy the DatasetEx and its contents. More... | |
void | Relabel (LabelMappingCollection col) |
Relabels both the testing and training image sets using the label mapping collection. More... | |
void | ReloadLabelSets () |
Reloads bot the training and testing label sets. More... | |
bool | SaveImageMean (int nSrcId, SimpleDatum sd, bool bUpdate) |
Saves the image mean in a SimpleDatum to the database. More... | |
SimpleDatum | QueryImageMean (int nSrcId) |
Query the image mean for a data source. More... | |
void | Unload () |
Unload the images of the training and testing image sets. More... | |
double | GetPercentageLoaded (out double dfTraining, out double dfTesting) |
Returns the total percentage of images loaded for testing, training and combined. More... | |
void | Dispose () |
Releases all resources used. More... | |
ImageSet | Find (int nSourceID) |
Returns the ImageSet corresponding to a data source ID. More... | |
ImageSet | Find (string strSource) |
Returns the ImageSet corresponding to a data source name. More... | |
Protected Member Functions | |
virtual void | Dispose (bool bDisposing) |
Releases all resources used. More... | |
Properties | |
bool | UseTrainingImagesForTesting [getset] |
Get/set whether or not to use the training images when testing. More... | |
DatasetDescriptor | Descriptor [get] |
Returns the dataset descriptor of the dataset managesd by the DatasetEx object. More... | |
int | DatasetID [getset] |
Returns the dataset ID of the dataset managesd by the DatasetEx object. More... | |
int | OriginalDatasetID [get] |
Returns the original DatsetID if this is a cloned re-organized dataset, otherwise 0 is returned. More... | |
string | DatasetName [get] |
Returns the dataset name of the dataset managesd by the DatasetEx object. More... | |
Events | |
EventHandler< CalculateImageMeanArgs > | OnCalculateImageMean |
The OnCalculateImageMean event is passed to each image set and fires each time the Image set need to calcualte its image mean. More... | |
The DatasetEx class provides the in-memory dataset functionality that is used by the image database to manage data sets.
Both the Testing and Training ImageSet objects are managed by the DatasetEx, which in turn coordinates the loading and usage of each.
Definition at line 16 of file DatasetEx.cs.
MyCaffe.db.image.DatasetEx.DatasetEx | ( | Guid | user, |
DatasetFactory | factory, | ||
CryptoRandom | random | ||
) |
The DatasetEx constructor.
user | Specifies the unique ID of the dataset user. |
factory | Specifies the DatasetFactory used to manage the database datasets. |
random | Specifies the random number generator. |
Definition at line 41 of file DatasetEx.cs.
int MyCaffe.db.image.DatasetEx.AddUser | ( | Guid | user | ) |
Adds a user of the dataset.
user | Specifies the unique ID of the dataset user. |
Definition at line 65 of file DatasetEx.cs.
DatasetEx MyCaffe.db.image.DatasetEx.Clone | ( | bool | bReOrganizeByTime = false | ) |
Copy the DatasetEx and its contents.
bReOrganizeByTime | Optionally, specifies to re-organize the training and testing sources so that they are both organized chronologically. |
Definition at line 135 of file DatasetEx.cs.
void MyCaffe.db.image.DatasetEx.Dispose | ( | ) |
Releases all resources used.
Definition at line 473 of file DatasetEx.cs.
|
protectedvirtual |
Releases all resources used.
bDisposing | Set to true when called by Dispose(). |
Definition at line 447 of file DatasetEx.cs.
ImageSet MyCaffe.db.image.DatasetEx.Find | ( | int | nSourceID | ) |
Returns the ImageSet corresponding to a data source ID.
nSourceID | Specifies the ID of the data source to use. |
Definition at line 483 of file DatasetEx.cs.
ImageSet MyCaffe.db.image.DatasetEx.Find | ( | string | strSource | ) |
Returns the ImageSet corresponding to a data source name.
strSource | Specifies the name of the data source to use. |
Definition at line 506 of file DatasetEx.cs.
double MyCaffe.db.image.DatasetEx.GetPercentageLoaded | ( | out double | dfTraining, |
out double | dfTesting | ||
) |
Returns the total percentage of images loaded for testing, training and combined.
dfTraining | Returns the total percentage of training images loaded. |
dfTesting | Returns the total percentage of testing images loaded. |
Definition at line 427 of file DatasetEx.cs.
bool MyCaffe.db.image.DatasetEx.Initialize | ( | DatasetDescriptor | ds, |
WaitHandle[] | rgAbort, | ||
int | nPadW = 0 , |
||
int | nPadH = 0 , |
||
Log | log = null , |
||
DB_LOAD_METHOD | loadMethod = DB_LOAD_METHOD.LOAD_ALL , |
||
int | nImageDbLoadLimit = 0 , |
||
bool | bSkipMeanCheck = false |
||
) |
Initialize the DatasetEx by loading the training and testing data sources into memory.
ds | Specifies the dataset to load. |
rgAbort | Specifies a set of wait handles used to cancel the load. |
nPadW | Optionally, specifies a pad to apply to the width of each item (default = 0). |
nPadH | Optionally, specifies a pad to apply to the height of each item (default = 0). |
log | Optionally, specifies an external Log to output status (default = null). |
loadMethod | Optionally, specifies the load method to use (default = LOAD_ALL). |
nImageDbLoadLimit | Optionally, specifies the load limit (default = 0). |
bSkipMeanCheck | Optionally, specifies to skip the mean check (default = false). |
Definition at line 94 of file DatasetEx.cs.
SimpleDatum MyCaffe.db.image.DatasetEx.QueryImageMean | ( | int | nSrcId | ) |
Query the image mean for a data source.
nSrcId | Specifies the ID of the data source to use. |
Definition at line 400 of file DatasetEx.cs.
void MyCaffe.db.image.DatasetEx.Relabel | ( | LabelMappingCollection | col | ) |
Relabels both the testing and training image sets using the label mapping collection.
col | Specifies the label mapping collection. |
Definition at line 196 of file DatasetEx.cs.
void MyCaffe.db.image.DatasetEx.ReloadLabelSets | ( | ) |
Reloads bot the training and testing label sets.
Definition at line 205 of file DatasetEx.cs.
int MyCaffe.db.image.DatasetEx.RemoveUser | ( | Guid | user | ) |
Remove a user of the dataset.
user | Specifies the unique ID of the dataset user. |
Definition at line 76 of file DatasetEx.cs.
void MyCaffe.db.image.DatasetEx.Reset | ( | ) |
Reset the image indexes for both the training and testing image sets.
Definition at line 54 of file DatasetEx.cs.
bool MyCaffe.db.image.DatasetEx.SaveImageMean | ( | int | nSrcId, |
SimpleDatum | sd, | ||
bool | bUpdate | ||
) |
Saves the image mean in a SimpleDatum to the database.
nSrcId | Specifies the ID of the data source to use. |
sd | Specifies the image mean data. |
bUpdate | Specifies whether or not to update the mean image. |
Definition at line 386 of file DatasetEx.cs.
void MyCaffe.db.image.DatasetEx.Unload | ( | ) |
Unload the images of the training and testing image sets.
Definition at line 412 of file DatasetEx.cs.
|
getset |
Returns the dataset ID of the dataset managesd by the DatasetEx object.
Definition at line 535 of file DatasetEx.cs.
|
get |
Returns the dataset name of the dataset managesd by the DatasetEx object.
Definition at line 552 of file DatasetEx.cs.
|
get |
Returns the dataset descriptor of the dataset managesd by the DatasetEx object.
Definition at line 527 of file DatasetEx.cs.
|
get |
Returns the original DatsetID if this is a cloned re-organized dataset, otherwise 0 is returned.
Definition at line 544 of file DatasetEx.cs.
|
getset |
Get/set whether or not to use the training images when testing.
Definition at line 214 of file DatasetEx.cs.
EventHandler<CalculateImageMeanArgs> MyCaffe.db.image.DatasetEx.OnCalculateImageMean |
The OnCalculateImageMean event is passed to each image set and fires each time the Image set need to calcualte its image mean.
Definition at line 33 of file DatasetEx.cs.