MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.IXImageDatabase2 Interface Reference

The IXImageDatabase2 interface defines the general interface to the in-memory image database (v2). More...

Inheritance diagram for MyCaffe.basecode.IXImageDatabase2:
MyCaffe.basecode.IXImageDatabaseBase MyCaffe.basecode.IXDatabaseBase

Public Member Functions

long InitializeWithDsName (SettingsCaffe s, string strDs, string strEvtCancel=null)
 Initializes the image database. More...
 
long InitializeWithDs (SettingsCaffe s, DatasetDescriptor ds, string strEvtCancel=null)
 Initializes the image database. More...
 
long InitializeWithDsId (SettingsCaffe s, int nDataSetID, string strEvtCancel=null, int nPadW=0, int nPadH=0)
 Initializes the image database. More...
 
long LoadDatasetByID (int nDsId, string strEvtCancel=null)
 Load another, 'secondary' dataset. More...
 
long LoadDatasetByName (string strDs, string strEvtCancel=null)
 Load another, 'secondary' dataset. More...
 
bool ReloadIndexing (int nDsId)
 Reload the indexing for a data set. More...
 
bool ReloadIndexing (string strDs)
 Reload the indexing for a data set. More...
 
bool WaitForDatasetToLoad (int nDsId, bool bTraining, bool bTesting, int nWait=int.MaxValue)
 Wait for the dataset loading to complete. More...
 
bool WaitForDatasetToLoad (string strDs, bool bTraining, bool bTesting, int nWait=int.MaxValue)
 Wait for the dataset loading to complete. More...
 
long CreateQueryState (int nDsId, bool bUseUniqueLabelIndexes=true, bool bUseUniqueImageIndexes=true, IMGDB_SORT sort=IMGDB_SORT.NONE)
 Create a new query state, optionally with a certain ordering. More...
 
long CreateQueryState (string strDs, bool bUseUniqueLabelIndexes=true, bool bUseUniqueImageIndexes=true, IMGDB_SORT sort=IMGDB_SORT.NONE)
 Create a new query state, optionally with a certain ordering. More...
 
bool SetDefaultQueryState (int nDsId, long lQueryState)
 Set the default query state to the query state specified for the dataset specified. More...
 
bool SetDefaultQueryState (string strDs, long lQueryState)
 Set the default query state to the query state specified for the dataset specified. More...
 
bool FreeQueryState (int nDsId, long lHandle)
 Frees a query state from a given dataset. More...
 
bool FreeQueryState (string strDs, long lHandle)
 Frees a query state from a given dataset. More...
 
string GetLabelQueryHitPercentsAsTextFromSourceName (long lQueryState, 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 (long lQueryState, 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...
 
string GetBoostQueryHitPercentsAsTextFromSourceName (long lQueryState, 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...
 
int GetImageCount (long lQueryState, int nSrcId, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false)
 Returns the number of images in a given data source. More...
 
List< SimpleDatumGetImagesFromIndex (long lQueryState, 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< SimpleDatumGetImagesFromTime (long lQueryState, 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...
 
SimpleDatum QueryImage (long lQueryState, 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...
 
void ResetAllBoosts (int nSrcId)
 Reset all in-memory image boosts. More...
 
bool WaitForDatasetToRefresh (int nDsId, bool bTraining, bool bTesting, int nWait=int.MaxValue)
 Wait for the dataset refreshing to complete. More...
 
bool WaitForDatasetToRefresh (string strDs, bool bTraining, bool bTesting, int nWait=int.MaxValue)
 Wait for the dataset refreshing to complete. More...
 
bool IsRefreshRunning (int nDsId, bool bTraining, bool bTesting)
 Returns true if the refresh operation running. More...
 
bool IsRefreshRunning (string strDs, bool bTraining, bool bTesting)
 Returns true if the refresh operation running. More...
 
bool StartRefresh (string strDs, bool bTraining, bool bTesting, double dfReplacementPct)
 Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database. More...
 
bool StopRefresh (string strDs, bool bTraining, bool bTesting)
 Stop a refresh operation running on the dataset. More...
 
bool StartRefresh (int nDsID, bool bTraining, bool bTesting, double dfReplacementPct)
 Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database. More...
 
bool StopRefresh (int nDsID, bool bTraining, bool bTesting)
 Stop a refresh operation running on the dataset. More...
 
bool StartAutomaticRefreshSchedule (string strDs, bool bTraining, bool bTesting, int nPeriodInMs, double dfReplacementPct)
 Start the automatic refresh cycle to occur on specified period increments. More...
 
bool StopAutomaticRefreshSchedule (string strDs, bool bTraining, bool bTesting)
 Stop the automatic refresh schedule running on a dataset. More...
 
bool GetScheduledAutoRefreshInformation (string strDs, out int nPeriodInMs, out double dfReplacementPct, out int nTrainingRefreshCount, out int nTestingRefreshCount)
 Returns whether or not a scheduled refresh is running and if so at what period and replacement percent. More...
 
bool StartAutomaticRefreshSchedule (int nDsID, bool bTraining, bool bTesting, int nPeriodInMs, double dfReplacementPct)
 Start the automatic refresh cycle to occur on specified period increments. More...
 
bool StopAutomaticRefreshSchedule (int nDsID, bool bTraining, bool bTesting)
 Stop the automatic refresh schedule running on a dataset. More...
 
bool GetScheduledAutoRefreshInformation (int nDsID, out int nPeriodInMs, out double dfReplacementPct, out int nTrainingRefreshCount, out int nTestingRefreshCount)
 Returns whether or not a scheduled refresh is running and if so at what period and replacement percent. More...
 
List< SimpleResultGetAllResults (string strSource, bool bRequireExtraData, int nMax=-1)
 Query all results for a given data source. More...
 
- Public Member Functions inherited from MyCaffe.basecode.IXImageDatabaseBase
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...
 
bool ReloadImageSet (int nSrcId)
 Reloads the images of a data source. More...
 
List< LabelDescriptorGetLabels (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...
 
- Public Member Functions inherited from MyCaffe.basecode.IXDatabaseBase
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_METHODGetSelectionMethod ()
 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< SimpleDatumGetItemsFromIndex (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< SimpleDatumGetItemsFromTime (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< SimpleDatumGetItems (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...
 

Detailed Description

The IXImageDatabase2 interface defines the general interface to the in-memory image database (v2).

Definition at line 1091 of file Interfaces.cs.

Member Function Documentation

◆ CreateQueryState() [1/2]

long MyCaffe.basecode.IXImageDatabase2.CreateQueryState ( int  nDsId,
bool  bUseUniqueLabelIndexes = true,
bool  bUseUniqueImageIndexes = true,
IMGDB_SORT  sort = IMGDB_SORT.NONE 
)

Create a new query state, optionally with a certain ordering.

Parameters
nDsIdSpecifies the dataset on which the query states are to be created.
bUseUniqueLabelIndexesOptionally, specifies to use unique label indexes which is slightly slower, but ensures each label is hit per epoch equally (default = true).
bUseUniqueImageIndexesOptionally, specifies to use unique image indexes which is slightly slower, but ensures each image is hit per epoch (default = true).
sortOptionally, specifies an index ordering (default = NONE).
Returns
A handle to the new query state is returned.

◆ CreateQueryState() [2/2]

long MyCaffe.basecode.IXImageDatabase2.CreateQueryState ( string  strDs,
bool  bUseUniqueLabelIndexes = true,
bool  bUseUniqueImageIndexes = true,
IMGDB_SORT  sort = IMGDB_SORT.NONE 
)

Create a new query state, optionally with a certain ordering.

Parameters
strDsSpecifies the dataset on which the query states are to be created.
bUseUniqueLabelIndexesOptionally, specifies to use unique label indexes which is slightly slower, but ensures each label is hit per epoch equally (default = true).
bUseUniqueImageIndexesOptionally, specifies to use unique image indexes which is slightly slower, but ensures each image is hit per epoch (default = true).
sortOptionally, specifies an index ordering (default = NONE).
Returns
A handle to the new query state is returned.

◆ FreeQueryState() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.FreeQueryState ( int  nDsId,
long  lHandle 
)

Frees a query state from a given dataset.

Parameters
nDsIdSpecifies the dataset on which to free the query state.
lHandleSpecifies the handle to the query state to free.
Returns
If found and freed, true is returned, otherwise false.

◆ FreeQueryState() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.FreeQueryState ( string  strDs,
long  lHandle 
)

Frees a query state from a given dataset.

Parameters
strDsSpecifies the dataset name on which to free the query state.
lHandleSpecifies the handle to the query state to free.
Returns
If found and freed, true is returned, otherwise false.

◆ GetAllResults()

List< SimpleResult > MyCaffe.basecode.IXImageDatabase2.GetAllResults ( string  strSource,
bool  bRequireExtraData,
int  nMax = -1 
)

Query all results for a given data source.

Parameters
strSourceSpecifies the data source who's results are to be returned.
bRequireExtraDataSpecifies whether or not the Extra 'target' data is required or not.
nMaxOptionally, specifies the maximum number of items to load.
Returns
Each result is returned in a SimpleResult object.

◆ GetBoostQueryHitPercentsAsTextFromSourceName()

string MyCaffe.basecode.IXImageDatabase2.GetBoostQueryHitPercentsAsTextFromSourceName ( long  lQueryState,
string  strSource 
)

Returns a string with the query hit percent for each boost (e.g. the percentage that each boost value has been queried).

Parameters
lQueryStateSpecifies the handle to the query state.
strSourceSpecifies the data source who's hit percentages are to be retrieved.
Returns
A string representing the query hit percentages is returned.

◆ GetImageCount()

int MyCaffe.basecode.IXImageDatabase2.GetImageCount ( long  lQueryState,
int  nSrcId,
string  strFilterVal = null,
int?  nBoostVal = null,
bool  bBoostValIsExact = false 
)

Returns the number of images in a given data source.

Parameters
lQueryStateSpecifies a handle to the query state to use.
nSrcIdSpecifies the data source ID.
strFilterValOptionally, specifies the filter value that the description must match (default = null, which ignores this parameter).
nBoostValOptionally, specifies the boost value that the boost must match (default = null, which ignores this parameter).
bBoostValIsExactOptionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value.
Returns
The number of images is returned.

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'.

◆ GetImagesFromIndex()

List< SimpleDatum > MyCaffe.basecode.IXImageDatabase2.GetImagesFromIndex ( long  lQueryState,
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.

Parameters
lQueryStateSpecifies a handle to the query state to use.
nSrcIdSpecifies the data source ID.
nStartIdxSpecifies a starting index from which the query is to start within the set of images.
nQueryCountOptionally, specifies a number of images to retrieve within the set (default = int.MaxValue).
strFilterValOptionally, specifies the filter value that the description must match (default = null, which ignores this parameter).
nBoostValOptionally, specifies the boost value that the boost must match (default = null, which ignores this parameter).
bBoostValIsExactOptionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value.
bAttemptDirectLoadOptionaly, specifies to directly load all images not already loaded.
Returns
The list of images is returned.

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'.

◆ GetImagesFromTime()

List< SimpleDatum > MyCaffe.basecode.IXImageDatabase2.GetImagesFromTime ( long  lQueryState,
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.

Parameters
lQueryStateSpecifies a handle to the query state to use.
nSrcIdSpecifies the data source ID.
dtStartSpecifies a starting time from which the query is to start within the set of images.
nQueryCountOptionally, specifies a number of images to retrieve within the set (default = int.MaxValue).
strFilterValOptionally, specifies the filter value that the description must match (default = null, which ignores this parameter).
nBoostValOptionally, specifies the boost value that the boost must match (default = null, which ignores this parameter).
bBoostValIsExactOptionally, specifies whether or the boost value (if specified) is to be used literally (exact = true), or as a minimum boost value.
Returns
The list of images is returned.

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'.

◆ GetLabelQueryEpocsAsTextFromSourceName()

string MyCaffe.basecode.IXImageDatabase2.GetLabelQueryEpocsAsTextFromSourceName ( long  lQueryState,
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).

Parameters
lQueryStateSpecifies the handle to the query state.
strSourceSpecifies the data source who's query epochs are to be retrieved.
Returns
A string representing the query epoch counts is returned.

◆ GetLabelQueryHitPercentsAsTextFromSourceName()

string MyCaffe.basecode.IXImageDatabase2.GetLabelQueryHitPercentsAsTextFromSourceName ( long  lQueryState,
string  strSource 
)

Returns a string with the query hit percent for each label (e.g. the percentage that each label has been queried).

Parameters
lQueryStateSpecifies the handle to the query state.
strSourceSpecifies the data source who's hit percentages are to be retrieved.
Returns
A string representing the query hit percentages is returned.

◆ GetScheduledAutoRefreshInformation() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.GetScheduledAutoRefreshInformation ( int  nDsID,
out int  nPeriodInMs,
out double  dfReplacementPct,
out int  nTrainingRefreshCount,
out int  nTestingRefreshCount 
)

Returns whether or not a scheduled refresh is running and if so at what period and replacement percent.

Parameters
nDsIDSpecifies the dataset name for which the automatic refresh cycle is to run.
nPeriodInMsReturns the period in milliseconds over which the auto refresh cycle is run.
dfReplacementPctReturns the percentage of replacement to use on each cycle.
nTrainingRefreshCountReturns the training refrsh count.
nTestingRefreshCountReturns the testing refresh count.
Returns
If the refresh schedule is running, true is returned, otherwise false.

◆ GetScheduledAutoRefreshInformation() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.GetScheduledAutoRefreshInformation ( string  strDs,
out int  nPeriodInMs,
out double  dfReplacementPct,
out int  nTrainingRefreshCount,
out int  nTestingRefreshCount 
)

Returns whether or not a scheduled refresh is running and if so at what period and replacement percent.

Parameters
strDsSpecifies the dataset name for which the automatic refresh cycle is to run.
nPeriodInMsReturns the period in milliseconds over which the auto refresh cycle is run.
dfReplacementPctReturns the percentage of replacement to use on each cycle.
nTrainingRefreshCountReturns the training refrsh count.
nTestingRefreshCountReturns the testing refresh count.
Returns
If the refresh schedule is running, true is returned, otherwise false.

◆ InitializeWithDs()

long MyCaffe.basecode.IXImageDatabase2.InitializeWithDs ( SettingsCaffe  s,
DatasetDescriptor  ds,
string  strEvtCancel = null 
)

Initializes the image database.

Parameters
sSpecifies the caffe settings.
dsSpecifies the data set to load.
strEvtCancelSpecifies the name of the CancelEvent used to cancel load operations.
Returns
Upon loading the dataset a handle to the default QueryState is returned (which is ordered by Index), or 0 on cancel.

◆ InitializeWithDsId()

long MyCaffe.basecode.IXImageDatabase2.InitializeWithDsId ( SettingsCaffe  s,
int  nDataSetID,
string  strEvtCancel = null,
int  nPadW = 0,
int  nPadH = 0 
)

Initializes the image database.

Parameters
sSpecifies the caffe settings.
nDataSetIDSpecifies the database ID of the data set to load.
strEvtCancelSpecifies the name of the CancelEvent used to cancel load operations.
nPadWSpecifies the padding to add to each image width (default = 0).
nPadHSpecifies the padding to add to each image height (default = 0).
Returns
Upon loading the dataset a handle to the default QueryState is returned (which is ordered by Index), or 0 on cancel.

◆ InitializeWithDsName()

long MyCaffe.basecode.IXImageDatabase2.InitializeWithDsName ( SettingsCaffe  s,
string  strDs,
string  strEvtCancel = null 
)

Initializes the image database.

Parameters
sSpecifies the caffe settings.
strDsSpecifies the data set to load.
strEvtCancelSpecifies the name of the CancelEvent used to cancel load operations.
Returns
Upon loading the dataset a handle to the default QueryState is returned (which is ordered by Index), or 0 on cancel.

◆ IsRefreshRunning() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.IsRefreshRunning ( int  nDsId,
bool  bTraining,
bool  bTesting 
)

Returns true if the refresh operation running.

Parameters
nDsIdSpecifies the dataset ID.
bTrainingSpecifies to check the training data source for refresh.
bTestingSpecifies to check the testing data source for refresh.
Returns
If the refresh is running, true is returned, otherwise false.

◆ IsRefreshRunning() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.IsRefreshRunning ( string  strDs,
bool  bTraining,
bool  bTesting 
)

Returns true if the refresh operation running.

Parameters
strDsSpecifies the dataset name.
bTrainingSpecifies to check the training data source for refresh.
bTestingSpecifies to check the testing data source for refresh.
Returns
If the refresh is running, true is returned, otherwise false.

◆ LoadDatasetByID()

long MyCaffe.basecode.IXImageDatabase2.LoadDatasetByID ( 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.

Parameters
nDsIdSpecifies the ID of the data set.
strEvtCancelSpecifies the name of the CancelEvent used to cancel load operations.
Returns
When loaded, the handle to the default query state is returned, otherwise 0 is returned.

◆ LoadDatasetByName()

long MyCaffe.basecode.IXImageDatabase2.LoadDatasetByName ( 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.

Parameters
strDsSpecifies the name of the data set.
strEvtCancelSpecifies the name of the CancelEvent used to cancel load operations.
Returns
When loaded, the handle to the default query state is returned, otherwise 0 is returned.

◆ QueryImage()

SimpleDatum MyCaffe.basecode.IXImageDatabase2.QueryImage ( long  lQueryState,
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.

Parameters
lQueryStateSpecifies a handle to the query state to use.
nSrcIdSpecifies the databse ID of the data source.
nIdxSpecifies the image index to query. Note, the index is only used in non-random image queries.
labelSelectionOverrideOptionally, specifies the label selection method override. The default = null, which directs the method to use the label selection method specified during Initialization.
imageSelectionOverrideOptionally, specifies the image selection method override. The default = null, which directs the method to use the image selection method specified during Initialization.
nLabelOptionally, specifies a label set to use for the image selection. When specified only images of this label are returned using the image selection method.
bLoadDataCriteriaSpecifies to load the data criteria data (default = false).
bLoadDebugDataSpecifies to load the debug data (default = false).
Returns
The image SimpleDatum is returned.

◆ ReloadIndexing() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.ReloadIndexing ( int  nDsId)

Reload the indexing for a data set.

Parameters
nDsIdSpecifies the dataset ID.
Returns
If the data source(s) have their indexing reloaded, true is returned, otherwise false.

◆ ReloadIndexing() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.ReloadIndexing ( string  strDs)

Reload the indexing for a data set.

Parameters
strDsSpecifies the dataset name.
Returns
If the data source(s) have their indexing reloaded, true is returned, otherwise false.

◆ ResetAllBoosts()

void MyCaffe.basecode.IXImageDatabase2.ResetAllBoosts ( int  nSrcId)

Reset all in-memory image boosts.

This does not impact the boost setting within the physical database.

Parameters
nSrcIdSpecifies the source ID of the data set to reset.

◆ SetDefaultQueryState() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.SetDefaultQueryState ( int  nDsId,
long  lQueryState 
)

Set the default query state to the query state specified for the dataset specified.

Parameters
nDsIdSpecifies the dataset ID.
lQueryStateSpecifies the query state to set.
Returns
Returns true on success, false on failure.

◆ SetDefaultQueryState() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.SetDefaultQueryState ( string  strDs,
long  lQueryState 
)

Set the default query state to the query state specified for the dataset specified.

Parameters
strDsSpecifies the dataset name.
lQueryStateSpecifies the query state to set.
Returns
Returns true on success, false on failure.

◆ StartAutomaticRefreshSchedule() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.StartAutomaticRefreshSchedule ( int  nDsID,
bool  bTraining,
bool  bTesting,
int  nPeriodInMs,
double  dfReplacementPct 
)

Start the automatic refresh cycle to occur on specified period increments.

Parameters
nDsIDSpecifies the dataset ID for which the automatic refresh cycle is to run.
bTrainingSpecifies the training data source to start refreshing.
bTestingSpecifies the testing data source to start refreshing.
nPeriodInMsSpecifies the period in milliseconds over which the auto refresh cycle is to run.
dfReplacementPctSpecifies the percentage of replacement to use on each cycle.
Returns
If successfully started, true is returned, otherwise false.

◆ StartAutomaticRefreshSchedule() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.StartAutomaticRefreshSchedule ( string  strDs,
bool  bTraining,
bool  bTesting,
int  nPeriodInMs,
double  dfReplacementPct 
)

Start the automatic refresh cycle to occur on specified period increments.

Parameters
strDsSpecifies the dataset name for which the automatic refresh cycle is to run.
bTrainingSpecifies the training data source to start refreshing.
bTestingSpecifies the testing data source to start refreshing.
nPeriodInMsSpecifies the period in milliseconds over which the auto refresh cycle is to run.
dfReplacementPctSpecifies the percentage of replacement to use on each cycle.
Returns
If successfully started, true is returned, otherwise false.

◆ StartRefresh() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.StartRefresh ( int  nDsID,
bool  bTraining,
bool  bTesting,
double  dfReplacementPct 
)

Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database.

Note, this method is only valid when initialized with LoadLimit > 0.

Parameters
nDsIDSpecifies the dataset ID.
bTrainingSpecifies the training data source to refresh.
bTestingSpecifies the testing data source to refresh.
dfReplacementPctOptionally, specifies the replacement percentage to use (default = 0.25 for 25%).
Returns
On succes, true is returned, otherwise false is returned.

◆ StartRefresh() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.StartRefresh ( string  strDs,
bool  bTraining,
bool  bTesting,
double  dfReplacementPct 
)

Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database.

Note, this method is only valid when initialized with LoadLimit > 0.

Parameters
strDsSpecifies the dataset name.
bTrainingSpecifies the training data source to refresh.
bTestingSpecifies the testing data source to refresh.
dfReplacementPctOptionally, specifies the replacement percentage to use (default = 0.25 for 25%).
Returns
On succes, true is returned, otherwise false is returned.

◆ StopAutomaticRefreshSchedule() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.StopAutomaticRefreshSchedule ( int  nDsID,
bool  bTraining,
bool  bTesting 
)

Stop the automatic refresh schedule running on a dataset.

Parameters
nDsIDSpecifies the dataset ID for which the automatic refresh cycle is to run.
bTrainingSpecifies the training data source to stop refreshing.
bTestingSpecifies the testing data source to stop refreshing.
Returns
If successfully stopped, true is returned, otherwise false.

◆ StopAutomaticRefreshSchedule() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.StopAutomaticRefreshSchedule ( string  strDs,
bool  bTraining,
bool  bTesting 
)

Stop the automatic refresh schedule running on a dataset.

Parameters
strDsSpecifies the dataset name for which the automatic refresh cycle is to run.
bTrainingSpecifies the training data source to stop refreshing.
bTestingSpecifies the testing data source to stop refreshing.
Returns
If successfully stopped, true is returned, otherwise false.

◆ StopRefresh() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.StopRefresh ( int  nDsID,
bool  bTraining,
bool  bTesting 
)

Stop a refresh operation running on the dataset.

Note, this method is only valid when initialized with LoadLimit > 0.

Parameters
nDsIDSpecifies the dataset ID.
bTrainingSpecifies the training data source to strop refreshing.
bTestingSpecifies the testing data source to stop refreshing.
Returns
On succes, true is returned, otherwise false is returned.

◆ StopRefresh() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.StopRefresh ( string  strDs,
bool  bTraining,
bool  bTesting 
)

Stop a refresh operation running on the dataset.

Note, this method is only valid when initialized with LoadLimit > 0.

Parameters
strDsSpecifies the dataset name.
bTrainingSpecifies the training data source to strop refreshing.
bTestingSpecifies the testing data source to stop refreshing.
Returns
On succes, true is returned, otherwise false is returned.

◆ WaitForDatasetToLoad() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.WaitForDatasetToLoad ( int  nDsId,
bool  bTraining,
bool  bTesting,
int  nWait = int.MaxValue 
)

Wait for the dataset loading to complete.

Parameters
nDsIdSpecifies the dataset ID.
bTrainingSpecifies to wait for the training data source to load.
bTestingSpecifies to wait for the testing data source to load.
nWaitSpecifies the amount of time to wait in ms. (default = int.MaxValue).
Returns
If the data source(s) complete loading, true is returned, otherwise false.

◆ WaitForDatasetToLoad() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.WaitForDatasetToLoad ( string  strDs,
bool  bTraining,
bool  bTesting,
int  nWait = int.MaxValue 
)

Wait for the dataset loading to complete.

Parameters
strDsSpecifies the dataset name.
bTrainingSpecifies to wait for the training data source to load.
bTestingSpecifies to wait for the testing data source to load.
nWaitSpecifies the amount of time to wait in ms. (default = int.MaxValue).
Returns
If the data source(s) complete loading, true is returned, otherwise false.

◆ WaitForDatasetToRefresh() [1/2]

bool MyCaffe.basecode.IXImageDatabase2.WaitForDatasetToRefresh ( int  nDsId,
bool  bTraining,
bool  bTesting,
int  nWait = int.MaxValue 
)

Wait for the dataset refreshing to complete.

Parameters
nDsIdSpecifies the dataset ID.
bTrainingSpecifies to wait for the training data source to refresh.
bTestingSpecifies to wait for the testing data source to refresh.
nWaitSpecifies the amount of time to wait in ms. (default = int.MaxValue).
Returns
If the data source(s) complete refreshing, true is returned, otherwise false.

◆ WaitForDatasetToRefresh() [2/2]

bool MyCaffe.basecode.IXImageDatabase2.WaitForDatasetToRefresh ( string  strDs,
bool  bTraining,
bool  bTesting,
int  nWait = int.MaxValue 
)

Wait for the dataset refreshing to complete.

Parameters
strDsSpecifies the dataset name.
bTrainingSpecifies to wait for the training data source to refresh.
bTestingSpecifies to wait for the testing data source to refresh.
nWaitSpecifies the amount of time to wait in ms. (default = int.MaxValue).
Returns
If the data source(s) complete refreshing, true is returned, otherwise false.

The documentation for this interface was generated from the following file: