MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The IXDatabaseBase interface defines the general interface to the in-memory database. More...
Public Member Functions | |
void | SetConnection (ConnectInfo ci) |
Set the database connection to use. More... | |
bool | InitializeWithDsName1 (SettingsCaffe s, string strDs, string strEvtCancel=null, PropertySet prop=null) |
Initializes the image database. More... | |
bool | InitializeWithDs1 (SettingsCaffe s, DatasetDescriptor ds, string strEvtCancel=null, PropertySet prop=null) |
Initializes the image database. More... | |
bool | InitializeWithDsId1 (SettingsCaffe s, int nDataSetID, string strEvtCancel=null, int nPadW=0, int nPadH=0, PropertySet prop=null) |
Initializes the image database. More... | |
bool | LoadDatasetByID1 (int nDsId, string strEvtCancel=null) |
Load another, 'secondary' dataset. More... | |
bool | LoadDatasetByName1 (string strDs, string strEvtCancel=null) |
Load another, 'secondary' dataset. More... | |
void | CleanUp (int nDsId=0, bool bForce=false) |
Releases the image database, and if this is the last instance using the in-memory database, frees all memory used. More... | |
DB_VERSION | GetVersion () |
Returns the version of the MyCaffe Image Database being used. More... | |
bool | GetLoadItemDataCriteria () |
Returns whether or not the item data criteria is loaded with each item. | |
bool | GetLoadItemDebugData () |
Returns whether or not the item debug data is loaded with each item. | |
double | GetDatasetLoadedPercentByName (string strDataset, out double dfTraining, out double dfTesting) |
Returns the percentage that a dataset is loaded into memory. More... | |
double | GetDatasetLoadedPercentById (int nDatasetID, out double dfTraining, out double dfTesting) |
Returns the percentage that a dataset is loaded into memory. More... | |
int | GetItemCount (int nSrcId, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the number of items (e.g., images, or temporal items) in a given data source. More... | |
Tuple< DB_LABEL_SELECTION_METHOD, DB_ITEM_SELECTION_METHOD > | GetSelectionMethod () |
Returns the label and image selection method used. More... | |
void | SetSelectionMethod (DB_LABEL_SELECTION_METHOD? lbl, DB_ITEM_SELECTION_METHOD? img) |
Sets the label and image selection methods. More... | |
SourceDescriptor | GetSourceById (int nSrcId) |
Returns the SourceDescriptor for a given data source ID. More... | |
SourceDescriptor | GetSourceByName (string strSrc) |
Returns the SourceDescriptor for a given data source name. More... | |
string | GetSourceName (int nSrcId) |
Returns a data source name given its ID. More... | |
int | GetSourceID (string strSrc) |
Returns a data source ID given its name. More... | |
DatasetDescriptor | GetDatasetById (int nDsId) |
Returns the DatasetDescriptor for a given data set ID. More... | |
DatasetDescriptor | GetDatasetByName (string strDs) |
Returns the DatasetDescriptor for a given data set name. More... | |
string | GetDatasetName (int nDsId) |
Returns a data set name given its ID. More... | |
int | GetDatasetID (string strDs) |
Returns a data set ID given its name. More... | |
bool | ReloadDataset (int nDsId) |
Reload a data set. More... | |
bool | UnloadDatasetByName (string strDataset) |
The UnloadDataset function unloads a given dataset from memory. More... | |
bool | UnloadDatasetById (int nDatasetID) |
The UnloadDataset function unloads a given dataset from memory. More... | |
SimpleDatum | QueryItem (int nSrcId, int nIdx, DB_LABEL_SELECTION_METHOD? labelSelectionOverride=null, DB_ITEM_SELECTION_METHOD? imageSelectionOverride=null, int? nLabel=null, bool bLoadDataCriteria=false, bool bLoadDebugData=false) |
Query an image in a given data source. More... | |
List< SimpleDatum > | GetItemsFromIndex (int nSrcId, int nStartIdx, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false, bool bAttemptDirectLoad=false) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters. More... | |
List< SimpleDatum > | GetItemsFromTime (int nSrcId, DateTime dtStart, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters. More... | |
List< SimpleDatum > | GetItems (int nSrcId, int[] rgIdx, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters. More... | |
SimpleDatum | GetItem (int nItemID, params int[] rgSrcId) |
Get the item (e.g., image or temporal item) with a given Raw Item ID. More... | |
int | FindItemIndex (int nSrcId, DateTime dt, string strDescription) |
Searches for the item (e.g., image or temporal item) index of an image within a data source matching a DateTime/description pattern. More... | |
SimpleDatum | QueryItemMean (int nSrcId) |
Queries the item (e.g., image or temporal item) mean for a data source from the database on disk. More... | |
SimpleDatum | QueryItemMeanFromDb (int nSrcId) |
Queries the item (e.g., image or temporal item) mean for a data source from the database on disk. More... | |
SimpleDatum | GetItemMean (int nSrcId) |
Returns the item (e.g., image or temporal item) mean for a data source. More... | |
SimpleDatum | QueryItemMeanFromDataset (int nDatasetId) |
Returns the item (e.g., image or temporal item) mean for the Training data source of a given data set. More... | |
The IXDatabaseBase interface defines the general interface to the in-memory database.
Definition at line 443 of file Interfaces.cs.
void MyCaffe.basecode.IXDatabaseBase.CleanUp | ( | int | nDsId = 0 , |
bool | bForce = false |
||
) |
Releases the image database, and if this is the last instance using the in-memory database, frees all memory used.
nDsId | Optionally, specifies the dataset previously used. |
bForce | Optionally, force the cleanup even if other users are using the database. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
int MyCaffe.basecode.IXDatabaseBase.FindItemIndex | ( | int | nSrcId, |
DateTime | dt, | ||
string | strDescription | ||
) |
Searches for the item (e.g., image or temporal item) index of an image within a data source matching a DateTime/description pattern.
Optionally, items may have a time-stamp and/or description associated with each item. In such cases searching by the time-stamp + description can be useful in some instances.
nSrcId | Specifies the data source ID of the data source to be searched. |
dt | Specifies the time-stamp to search for. |
strDescription | Specifies the description to search for. |
DatasetDescriptor MyCaffe.basecode.IXDatabaseBase.GetDatasetById | ( | int | nDsId | ) |
Returns the DatasetDescriptor for a given data set ID.
nDsId | Specifies the data set ID. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
DatasetDescriptor MyCaffe.basecode.IXDatabaseBase.GetDatasetByName | ( | string | strDs | ) |
Returns the DatasetDescriptor for a given data set name.
strDs | Specifies the data set name. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
int MyCaffe.basecode.IXDatabaseBase.GetDatasetID | ( | string | strDs | ) |
Returns a data set ID given its name.
strDs | Specifies the data set name. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
double MyCaffe.basecode.IXDatabaseBase.GetDatasetLoadedPercentById | ( | int | nDatasetID, |
out double | dfTraining, | ||
out double | dfTesting | ||
) |
Returns the percentage that a dataset is loaded into memory.
nDatasetID | Specifies the ID of the dataset. |
dfTraining | Specifies the percent of training items that are loaded. |
dfTesting | Specifies the percent of testing items that are loaded. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
double MyCaffe.basecode.IXDatabaseBase.GetDatasetLoadedPercentByName | ( | string | strDataset, |
out double | dfTraining, | ||
out double | dfTesting | ||
) |
Returns the percentage that a dataset is loaded into memory.
strDataset | Specifies the name of the dataset. |
dfTraining | Specifies the percent of training items that are loaded. |
dfTesting | Specifies the percent of testing items that are loaded. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
string MyCaffe.basecode.IXDatabaseBase.GetDatasetName | ( | int | nDsId | ) |
Returns a data set name given its ID.
nDsId | Specifies the data set ID. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
SimpleDatum MyCaffe.basecode.IXDatabaseBase.GetItem | ( | int | nItemID, |
params int[] | rgSrcId | ||
) |
Get the item (e.g., image or temporal item) with a given Raw Item ID.
nItemID | Specifies the Raw Image ID of the image to get. |
rgSrcId | Specifies a list of Source ID's to search for the image. |
Note, temporal items are alwasy returned as a set of temporal items as defined by past and future steps defined in the temporal specific interface.
int MyCaffe.basecode.IXDatabaseBase.GetItemCount | ( | int | nSrcId, |
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the number of items (e.g., images, or temporal items) in a given data source.
nSrcId | Specifies the data source ID. |
strFilterVal | Optionally, specifies the filter value that the description must match (default = null, which ignores this parameter). |
nBoostVal | Optionally, specifies the boost value that the boost must match (default = null, which ignores this parameter). |
bBoostValIsExact | Optionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value. |
When using the 'nBoostValue' negative values are used to test the exact match of the boost value with the absolute value of the 'nBoostValue', ande positive values are used to test for boost values that are greater than or equal to the 'nBoostValue'.
SimpleDatum MyCaffe.basecode.IXDatabaseBase.GetItemMean | ( | int | nSrcId | ) |
Returns the item (e.g., image or temporal item) mean for a data source.
nSrcId | Specifies the ID of the data source. |
Note, the mean for a temporal item is a set of values where one mean value exists for each data stream.
List< SimpleDatum > MyCaffe.basecode.IXDatabaseBase.GetItems | ( | int | nSrcId, |
int[] | rgIdx, | ||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters.
nSrcId | Specifies the data source ID. |
rgIdx | Specifies an array of indexes to query. |
strFilterVal | Optionally, specifies the filter value that the description must match (default = null, which ignores this parameter). |
nBoostVal | Optionally, specifies the boost value that the boost must match (default = null, which ignores this parameter). |
bBoostValIsExact | Optionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value. |
When using the 'nBoostValue' negative values are used to test the exact match of the boost value with the absolute value of the 'nBoostValue', ande positive values are used to test for boost values that are greater than or equal to the 'nBoostValue'.
List< SimpleDatum > MyCaffe.basecode.IXDatabaseBase.GetItemsFromIndex | ( | int | nSrcId, |
int | nStartIdx, | ||
int | nQueryCount = int.MaxValue , |
||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false , |
||
bool | bAttemptDirectLoad = false |
||
) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters.
nSrcId | Specifies the data source ID. |
nStartIdx | Specifies a starting index from which the query is to start within the set of items. |
nQueryCount | Optionally, specifies a number of items to retrieve within the set (default = int.MaxValue). |
strFilterVal | Optionally, specifies the filter value that the description must match (default = null, which ignores this parameter). |
nBoostVal | Optionally, specifies the boost value that the boost must match (default = null, which ignores this parameter). |
bBoostValIsExact | Optionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value. |
bAttemptDirectLoad | Optionaly, specifies to directly load all images not already loaded. |
When using the 'nBoostValue' negative values are used to test the exact match of the boost value with the absolute value of the 'nBoostValue', and positive values are used to test for boost values that are greater than or equal to the 'nBoostValue'.
List< SimpleDatum > MyCaffe.basecode.IXDatabaseBase.GetItemsFromTime | ( | int | nSrcId, |
DateTime | dtStart, | ||
int | nQueryCount = int.MaxValue , |
||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the array of items (e.g., images or temporal items) in the item set, possibly filtered with the filtering parameters.
nSrcId | Specifies the data source ID. |
dtStart | Specifies a starting time from which the query is to start within the set of images. |
nQueryCount | Optionally, specifies a number of items to retrieve within the set (default = int.MaxValue). |
strFilterVal | Optionally, specifies the filter value that the description must match (default = null, which ignores this parameter). |
nBoostVal | Optionally, specifies the boost value that the boost must match (default = null, which ignores this parameter). |
bBoostValIsExact | Optionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value. |
When using the 'nBoostValue' negative values are used to test the exact match of the boost value with the absolute value of the 'nBoostValue', ande positive values are used to test for boost values that are greater than or equal to the 'nBoostValue'.
Tuple< DB_LABEL_SELECTION_METHOD, DB_ITEM_SELECTION_METHOD > MyCaffe.basecode.IXDatabaseBase.GetSelectionMethod | ( | ) |
Returns the label and image selection method used.
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
SourceDescriptor MyCaffe.basecode.IXDatabaseBase.GetSourceById | ( | int | nSrcId | ) |
Returns the SourceDescriptor for a given data source ID.
nSrcId | Specifies the data source ID. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
SourceDescriptor MyCaffe.basecode.IXDatabaseBase.GetSourceByName | ( | string | strSrc | ) |
Returns the SourceDescriptor for a given data source name.
strSrc | Specifies the data source name. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
int MyCaffe.basecode.IXDatabaseBase.GetSourceID | ( | string | strSrc | ) |
Returns a data source ID given its name.
strSrc | Specifies the data source name. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
string MyCaffe.basecode.IXDatabaseBase.GetSourceName | ( | int | nSrcId | ) |
Returns a data source name given its ID.
nSrcId | Specifies the data source ID. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
DB_VERSION MyCaffe.basecode.IXDatabaseBase.GetVersion | ( | ) |
Returns the version of the MyCaffe Image Database being used.
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.InitializeWithDs1 | ( | SettingsCaffe | s, |
DatasetDescriptor | ds, | ||
string | strEvtCancel = null , |
||
PropertySet | prop = null |
||
) |
Initializes the image database.
s | Specifies the caffe settings. |
ds | Specifies the data set to load. |
strEvtCancel | Optionally, specifies the name of the CancelEvent used to cancel load operations (default = null). |
prop | Optionally, specifies the properties for the initialization (default = null). |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.InitializeWithDsId1 | ( | SettingsCaffe | s, |
int | nDataSetID, | ||
string | strEvtCancel = null , |
||
int | nPadW = 0 , |
||
int | nPadH = 0 , |
||
PropertySet | prop = null |
||
) |
Initializes the image database.
s | Specifies the caffe settings. |
nDataSetID | Specifies the database ID of the data set to load. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
nPadW | Optionally, specifies the padding to add to each image width (default = 0). |
nPadH | Optionally, specifies the padding to add to each image height (default = 0). |
prop | Optionally, specifies the properties for the initialization (default = null). |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.InitializeWithDsName1 | ( | SettingsCaffe | s, |
string | strDs, | ||
string | strEvtCancel = null , |
||
PropertySet | prop = null |
||
) |
Initializes the image database.
s | Specifies the caffe settings. |
strDs | Specifies the data set to load. |
strEvtCancel | Optionally, specifies the name of the CancelEvent used to cancel load operations (default = null). |
prop | Optionally, specifies the properties for the initialization (default = null). |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.LoadDatasetByID1 | ( | int | nDsId, |
string | strEvtCancel = null |
||
) |
Load another, 'secondary' dataset.
The primary dataset should be loaded using one of the 'Initialize' methods. This method is provided to allow for loading multiple datasets.
nDsId | Specifies the ID of the data set. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.LoadDatasetByName1 | ( | string | strDs, |
string | strEvtCancel = null |
||
) |
Load another, 'secondary' dataset.
The primary dataset should be loaded using one of the 'Initialize' methods. This method is provided to allow for loading multiple datasets.
strDs | Specifies the name of the data set. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
SimpleDatum MyCaffe.basecode.IXDatabaseBase.QueryItem | ( | int | nSrcId, |
int | nIdx, | ||
DB_LABEL_SELECTION_METHOD? | labelSelectionOverride = null , |
||
DB_ITEM_SELECTION_METHOD? | imageSelectionOverride = null , |
||
int? | nLabel = null , |
||
bool | bLoadDataCriteria = false , |
||
bool | bLoadDebugData = false |
||
) |
Query an image in a given data source.
nSrcId | Specifies the databse ID of the data source. |
nIdx | Specifies the image index to query. Note, the index is only used in non-random image queries. |
labelSelectionOverride | Optionally, specifies the label selection method override. The default = null, which directs the method to use the label selection method specified during Initialization. |
imageSelectionOverride | Optionally, specifies the image selection method override. The default = null, which directs the method to use the image selection method specified during Initialization. |
nLabel | Optionally, specifies a label set to use for the image selection. When specified only images of this label are returned using the image selection method. |
bLoadDataCriteria | Specifies to load the data criteria data (default = false). |
bLoadDebugData | Specifies to load the debug data (default = false). |
SimpleDatum MyCaffe.basecode.IXDatabaseBase.QueryItemMean | ( | int | nSrcId | ) |
Queries the item (e.g., image or temporal item) mean for a data source from the database on disk.
nSrcId | Specifies the ID of the data source. |
Note, the mean for a temporal item is a set of values where one mean value exists for each data stream.
SimpleDatum MyCaffe.basecode.IXDatabaseBase.QueryItemMeanFromDataset | ( | int | nDatasetId | ) |
Returns the item (e.g., image or temporal item) mean for the Training data source of a given data set.
nDatasetId | Specifies the data set to use. |
Note, the mean for a temporal item is a set of values where one mean value exists for each data stream.
SimpleDatum MyCaffe.basecode.IXDatabaseBase.QueryItemMeanFromDb | ( | int | nSrcId | ) |
Queries the item (e.g., image or temporal item) mean for a data source from the database on disk.
If the item mean does not exist in the database, one is created, saved and then returned.
nSrcId | Specifies the ID of the data source. |
Note, the mean for a temporal item is a set of values where one mean value exists for each data stream.
bool MyCaffe.basecode.IXDatabaseBase.ReloadDataset | ( | int | nDsId | ) |
Reload a data set.
nDsId | Specifies the ID of the data set. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
void MyCaffe.basecode.IXDatabaseBase.SetConnection | ( | ConnectInfo | ci | ) |
Set the database connection to use.
ci | Specifies the connection information. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
void MyCaffe.basecode.IXDatabaseBase.SetSelectionMethod | ( | DB_LABEL_SELECTION_METHOD? | lbl, |
DB_ITEM_SELECTION_METHOD? | img | ||
) |
Sets the label and image selection methods.
lbl | Specifies the label selection method or null to ignore. |
img | Specifies the image selection method or null to ignore. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.UnloadDatasetById | ( | int | nDatasetID | ) |
The UnloadDataset function unloads a given dataset from memory.
nDatasetID | Specifies the ID of the dataset to unload. |
Specifiying a dataset ID of -1 directs the UnloadDatasetById to unload ALL datasets loaded.
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.
bool MyCaffe.basecode.IXDatabaseBase.UnloadDatasetByName | ( | string | strDataset | ) |
The UnloadDataset function unloads a given dataset from memory.
strDataset | Specifies the name of the dataset to unload. |
Implemented in MyCaffe.db.temporal.MyCaffeTemporalDatabase.