![]() |
MyCaffe
1.11.8.27
Deep learning software for Windows C# programmers.
|
The IXImageDatabaseBase interface defines the general interface to the in-memory image 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) |
Initializes the image database. More... | |
bool | InitializeWithDs1 (SettingsCaffe s, DatasetDescriptor ds, string strEvtCancel=null) |
Initializes the image database. More... | |
bool | InitializeWithDsId1 (SettingsCaffe s, int nDataSetID, string strEvtCancel=null, int nPadW=0, int nPadH=0) |
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... | |
IMGDB_VERSION | GetVersion () |
Returns the version of the MyCaffe Image Database being used. More... | |
bool | GetLoadImageDataCriteria () |
Returns whether or not the image data criteria is loaded with each image. | |
bool | GetLoadImageDebugData () |
Returns whether or not the image debug data is loaded with each image. | |
Tuple< IMGDB_LABEL_SELECTION_METHOD, IMGDB_IMAGE_SELECTION_METHOD > | GetSelectionMethod () |
Returns the label and image selection method used. More... | |
void | SetSelectionMethod (IMGDB_LABEL_SELECTION_METHOD? lbl, IMGDB_IMAGE_SELECTION_METHOD? img) |
Sets the label and image selection methods. More... | |
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... | |
string | GetBoostQueryHitPercentsAsTextFromSourceName (string strSource) |
Returns a string with the query hit percent for each boost (e.g. the percentage that each boost value has been queried). More... | |
string | GetLabelQueryHitPercentsAsTextFromSourceName (string strSource) |
Returns a string with the query hit percent for each label (e.g. the percentage that each label has been queried). More... | |
string | GetLabelQueryEpocsAsTextFromSourceName (string strSource) |
Returns a string with the query epoch counts for each label (e.g. the number of times all images with the label have been queried). More... | |
int | GetImageCount (int nSrcId, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the number of images in a given data source. 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 | ReloadImageSet (int nSrcId) |
Reloads the images of a data source. 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 | QueryImage (int nSrcId, int nIdx, IMGDB_LABEL_SELECTION_METHOD? labelSelectionOverride=null, IMGDB_IMAGE_SELECTION_METHOD? imageSelectionOverride=null, int? nLabel=null, bool bLoadDataCriteria=false, bool bLoadDebugData=false) |
Query an image in a given data source. More... | |
List< SimpleDatum > | GetImagesFromIndex (int nSrcId, int nStartIdx, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false, bool bAttemptDirectLoad=false) |
Returns the array of images in the image set, possibly filtered with the filtering parameters. More... | |
List< SimpleDatum > | GetImagesFromTime (int nSrcId, DateTime dtStart, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the array of images in the image set, possibly filtered with the filtering parameters. More... | |
List< SimpleDatum > | GetImages (int nSrcId, int[] rgIdx, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the array of images in the image set, possibly filtered with the filtering parameters. More... | |
SimpleDatum | GetImage (int nImageID, params int[] rgSrcId) |
Get the image with a given Raw Image ID. More... | |
int | FindImageIndex (int nSrcId, DateTime dt, string strDescription) |
Searches for the image index of an image within a data source matching a DateTime/description pattern. More... | |
SimpleDatum | QueryImageMean (int nSrcId) |
Queries the image mean for a data source from the database on disk. More... | |
SimpleDatum | QueryImageMeanFromDb (int nSrcId) |
Queries the image mean for a data source from the database on disk. More... | |
SimpleDatum | GetImageMean (int nSrcId) |
Returns the image mean for a data source. More... | |
SimpleDatum | QueryImageMeanFromDataset (int nDatasetId) |
Returns the image mean for the Training data source of a given data set. More... | |
List< LabelDescriptor > | GetLabels (int nSrcId) |
Returns a list of LabelDescriptors associated with the labels within a data source. More... | |
string | GetLabelName (int nSrcId, int nLabel) |
Returns the text name of a given label within a data source. More... | |
void | SetLabelMapping (int nSrcId, LabelMapping map) |
Sets the label mapping to the database for a given data source. More... | |
void | UpdateLabelMapping (int nSrcId, int nNewLabel, List< int > rgOriginalLabels) |
Updates the label mapping in the database for a given data source. More... | |
void | ResetLabels (int nProjectId, int nSrcId) |
Resets all labels within a data source, used by a project, to their original labels. More... | |
void | UpdateLabelCounts (int nProjectId, int nSrcId) |
Updates the number of images of each label within a data source. More... | |
Dictionary< int, int > | LoadLabelCounts (int nSrcId) |
Returns a label lookup of counts for a given data source. More... | |
string | GetLabelCountsAsTextFromSourceId (int nSrcId) |
Returns a string with all label counts for a data source. More... | |
string | GetLabelCountsAsTextFromSourceName (string strSource) |
Returns a string with all label counts for a data source. More... | |
The IXImageDatabaseBase interface defines the general interface to the in-memory image database.
Definition at line 414 of file Interfaces.cs.
void MyCaffe.basecode.IXImageDatabaseBase.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. |
int MyCaffe.basecode.IXImageDatabaseBase.FindImageIndex | ( | int | nSrcId, |
DateTime | dt, | ||
string | strDescription | ||
) |
Searches for the image index of an image within a data source matching a DateTime/description pattern.
Optionally, images may have a time-stamp and/or description associated with each image. 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. |
string MyCaffe.basecode.IXImageDatabaseBase.GetBoostQueryHitPercentsAsTextFromSourceName | ( | string | strSource | ) |
Returns a string with the query hit percent for each boost (e.g. the percentage that each boost value has been queried).
strSource | Specifies the data source who's hit percentages are to be retrieved. |
DatasetDescriptor MyCaffe.basecode.IXImageDatabaseBase.GetDatasetById | ( | int | nDsId | ) |
Returns the DatasetDescriptor for a given data set ID.
nDsId | Specifies the data set ID. |
DatasetDescriptor MyCaffe.basecode.IXImageDatabaseBase.GetDatasetByName | ( | string | strDs | ) |
Returns the DatasetDescriptor for a given data set name.
strDs | Specifies the data set name. |
int MyCaffe.basecode.IXImageDatabaseBase.GetDatasetID | ( | string | strDs | ) |
Returns a data set ID given its name.
strDs | Specifies the data set name. |
double MyCaffe.basecode.IXImageDatabaseBase.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 images that are loaded. |
dfTesting | Specifies the percent of testing images that are loaded. |
double MyCaffe.basecode.IXImageDatabaseBase.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 images that are loaded. |
dfTesting | Specifies the percent of testing images that are loaded. |
string MyCaffe.basecode.IXImageDatabaseBase.GetDatasetName | ( | int | nDsId | ) |
Returns a data set name given its ID.
nDsId | Specifies the data set ID. |
SimpleDatum MyCaffe.basecode.IXImageDatabaseBase.GetImage | ( | int | nImageID, |
params int[] | rgSrcId | ||
) |
Get the image with a given Raw Image ID.
nImageID | Specifies the Raw Image ID of the image to get. |
rgSrcId | Specifies a list of Source ID's to search for the image. |
int MyCaffe.basecode.IXImageDatabaseBase.GetImageCount | ( | int | nSrcId, |
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the number of images 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.IXImageDatabaseBase.GetImageMean | ( | int | nSrcId | ) |
Returns the image mean for a data source.
nSrcId | Specifies the ID of the data source. |
List< SimpleDatum > MyCaffe.basecode.IXImageDatabaseBase.GetImages | ( | int | nSrcId, |
int[] | rgIdx, | ||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the array of images in the image 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.IXImageDatabaseBase.GetImagesFromIndex | ( | int | nSrcId, |
int | nStartIdx, | ||
int | nQueryCount = int.MaxValue , |
||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false , |
||
bool | bAttemptDirectLoad = false |
||
) |
Returns the array of images in the image 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 images. |
nQueryCount | Optionally, specifies a number of images 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', ande positive values are used to test for boost values that are greater than or equal to the 'nBoostValue'.
List< SimpleDatum > MyCaffe.basecode.IXImageDatabaseBase.GetImagesFromTime | ( | int | nSrcId, |
DateTime | dtStart, | ||
int | nQueryCount = int.MaxValue , |
||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the array of images in the image 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 images 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'.
string MyCaffe.basecode.IXImageDatabaseBase.GetLabelCountsAsTextFromSourceId | ( | int | nSrcId | ) |
Returns a string with all label counts for a data source.
nSrcId | Specifies the ID of the data source. |
string MyCaffe.basecode.IXImageDatabaseBase.GetLabelCountsAsTextFromSourceName | ( | string | strSource | ) |
Returns a string with all label counts for a data source.
strSource | Specifies the name of the data source. |
string MyCaffe.basecode.IXImageDatabaseBase.GetLabelName | ( | int | nSrcId, |
int | nLabel | ||
) |
Returns the text name of a given label within a data source.
nSrcId | Specifies the data source ID. |
nLabel | Specifies the label. |
string MyCaffe.basecode.IXImageDatabaseBase.GetLabelQueryEpocsAsTextFromSourceName | ( | string | strSource | ) |
Returns a string with the query epoch counts for each label (e.g. the number of times all images with the label have been queried).
strSource | Specifies the data source who's query epochs are to be retrieved. |
string MyCaffe.basecode.IXImageDatabaseBase.GetLabelQueryHitPercentsAsTextFromSourceName | ( | string | strSource | ) |
Returns a string with the query hit percent for each label (e.g. the percentage that each label has been queried).
strSource | Specifies the data source who's hit percentages are to be retrieved. |
List< LabelDescriptor > MyCaffe.basecode.IXImageDatabaseBase.GetLabels | ( | int | nSrcId | ) |
Returns a list of LabelDescriptors associated with the labels within a data source.
nSrcId | Specifies the data source ID. |
Tuple< IMGDB_LABEL_SELECTION_METHOD, IMGDB_IMAGE_SELECTION_METHOD > MyCaffe.basecode.IXImageDatabaseBase.GetSelectionMethod | ( | ) |
Returns the label and image selection method used.
SourceDescriptor MyCaffe.basecode.IXImageDatabaseBase.GetSourceById | ( | int | nSrcId | ) |
Returns the SourceDescriptor for a given data source ID.
nSrcId | Specifies the data source ID. |
SourceDescriptor MyCaffe.basecode.IXImageDatabaseBase.GetSourceByName | ( | string | strSrc | ) |
Returns the SourceDescriptor for a given data source name.
strSrc | Specifies the data source name. |
int MyCaffe.basecode.IXImageDatabaseBase.GetSourceID | ( | string | strSrc | ) |
Returns a data source ID given its name.
strSrc | Specifies the data source name. |
string MyCaffe.basecode.IXImageDatabaseBase.GetSourceName | ( | int | nSrcId | ) |
Returns a data source name given its ID.
nSrcId | Specifies the data source ID. |
IMGDB_VERSION MyCaffe.basecode.IXImageDatabaseBase.GetVersion | ( | ) |
Returns the version of the MyCaffe Image Database being used.
bool MyCaffe.basecode.IXImageDatabaseBase.InitializeWithDs1 | ( | SettingsCaffe | s, |
DatasetDescriptor | ds, | ||
string | strEvtCancel = null |
||
) |
Initializes the image database.
s | Specifies the caffe settings. |
ds | Specifies the data set to load. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
bool MyCaffe.basecode.IXImageDatabaseBase.InitializeWithDsId1 | ( | SettingsCaffe | s, |
int | nDataSetID, | ||
string | strEvtCancel = null , |
||
int | nPadW = 0 , |
||
int | nPadH = 0 |
||
) |
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 | Specifies the padding to add to each image width (default = 0). |
nPadH | Specifies the padding to add to each image height (default = 0). |
bool MyCaffe.basecode.IXImageDatabaseBase.InitializeWithDsName1 | ( | SettingsCaffe | s, |
string | strDs, | ||
string | strEvtCancel = null |
||
) |
Initializes the image database.
s | Specifies the caffe settings. |
strDs | Specifies the data set to load. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
bool MyCaffe.basecode.IXImageDatabaseBase.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. |
bool MyCaffe.basecode.IXImageDatabaseBase.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. |
Dictionary< int, int > MyCaffe.basecode.IXImageDatabaseBase.LoadLabelCounts | ( | int | nSrcId | ) |
Returns a label lookup of counts for a given data source.
nSrcId | Specifies the ID of the data source. |
SimpleDatum MyCaffe.basecode.IXImageDatabaseBase.QueryImage | ( | int | nSrcId, |
int | nIdx, | ||
IMGDB_LABEL_SELECTION_METHOD? | labelSelectionOverride = null , |
||
IMGDB_IMAGE_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.IXImageDatabaseBase.QueryImageMean | ( | int | nSrcId | ) |
Queries the image mean for a data source from the database on disk.
nSrcId | Specifies the ID of the data source. |
SimpleDatum MyCaffe.basecode.IXImageDatabaseBase.QueryImageMeanFromDataset | ( | int | nDatasetId | ) |
Returns the image mean for the Training data source of a given data set.
nDatasetId | Specifies the data set to use. |
SimpleDatum MyCaffe.basecode.IXImageDatabaseBase.QueryImageMeanFromDb | ( | int | nSrcId | ) |
Queries the image mean for a data source from the database on disk.
If the image mean does not exist in the database, one is created, saved and then returned.
nSrcId | Specifies the ID of the data source. |
bool MyCaffe.basecode.IXImageDatabaseBase.ReloadDataset | ( | int | nDsId | ) |
Reload a data set.
nDsId | Specifies the ID of the data set. |
bool MyCaffe.basecode.IXImageDatabaseBase.ReloadImageSet | ( | int | nSrcId | ) |
Reloads the images of a data source.
nSrcId | Specifies the ID of the data source. |
void MyCaffe.basecode.IXImageDatabaseBase.ResetLabels | ( | int | nProjectId, |
int | nSrcId | ||
) |
Resets all labels within a data source, used by a project, to their original labels.
nProjectId | Specifies the ID of the project. |
nSrcId | Specifies the ID of the data source. |
void MyCaffe.basecode.IXImageDatabaseBase.SetConnection | ( | ConnectInfo | ci | ) |
Set the database connection to use.
ci | Specifies the connection information. |
void MyCaffe.basecode.IXImageDatabaseBase.SetLabelMapping | ( | int | nSrcId, |
LabelMapping | map | ||
) |
Sets the label mapping to the database for a given data source.
nSrcId | Specifies the ID of the data source. |
map | Specifies the label mapping to set. |
void MyCaffe.basecode.IXImageDatabaseBase.SetSelectionMethod | ( | IMGDB_LABEL_SELECTION_METHOD? | lbl, |
IMGDB_IMAGE_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. |
bool MyCaffe.basecode.IXImageDatabaseBase.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.
bool MyCaffe.basecode.IXImageDatabaseBase.UnloadDatasetByName | ( | string | strDataset | ) |
The UnloadDataset function unloads a given dataset from memory.
strDataset | Specifies the name of the dataset to unload. |
void MyCaffe.basecode.IXImageDatabaseBase.UpdateLabelCounts | ( | int | nProjectId, |
int | nSrcId | ||
) |
Updates the number of images of each label within a data source.
nProjectId | Specifies a project ID. |
nSrcId | Specifies the ID of the data source. |
void MyCaffe.basecode.IXImageDatabaseBase.UpdateLabelMapping | ( | int | nSrcId, |
int | nNewLabel, | ||
List< int > | rgOriginalLabels | ||
) |
Updates the label mapping in the database for a given data source.
nSrcId | Specifies the ID of the data source. |
nNewLabel | Specifies a new label. |
rgOriginalLabels | Specifies the original lables that are mapped to the new label. |