MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
[V2 Image Database] The MyCaffeImageDatabase2 provides an enhanced in-memory image database used for quick image retrieval. More...
Public Member Functions | |
MyCaffeImageDatabase2 (Log log=null, string strId="default", int nSeed=0) | |
The MyCaffeImageDatabase2 constructor. More... | |
MyCaffeImageDatabase2 (IContainer container) | |
The MyCaffeImageDatabase constructor. More... | |
DB_VERSION | GetVersion () |
Returns the version of the MyCaffe Image Database being used. More... | |
void | SetConnection (ConnectInfo ci) |
Set the database connection to use. More... | |
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... | |
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... | |
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... | |
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... | |
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 | 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... | |
long | CreateQueryState (int nDsId, bool bUseUniqueLabelIndexes=true, bool bUseUniqueImageIndexes=true, IMGDB_SORT sort=IMGDB_SORT.NONE) |
Create a query state for a data set, optionally using a specific sorting method. More... | |
long | CreateQueryState (string strDs, bool bUseUniqueLabelIndexes=true, bool bUseUniqueImageIndexes=true, IMGDB_SORT sort=IMGDB_SORT.NONE) |
Create a query state for a data set, optionally using a specific sorting method. 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 | GetBoostQueryHitPercentsAsTextFromSourceName (long lQueryState, string strSource) |
Returns the percentage of boosted images queried as text. 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 (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 | GetLoadItemDataCriteria () |
Returns whether or not the image data criteria is loaded with each image. More... | |
bool | GetLoadItemDebugData () |
Returns whether or not the image debug data is loaded with each image. More... | |
int | GetImageCount (int nSrcId) |
Returns the number of images in a given data source. More... | |
int | GetItemCount (int nSrcId, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the number of images in a given data source, optionally only counting the boosted images. 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, optionally only counting the boosted images. 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... | |
void | Enable (bool bEnable) |
Sets whether or not the image database is enabled. 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 images in the image 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 images in the image set, possibly filtered with the filtering parameters. More... | |
List< SimpleDatum > | 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. More... | |
List< SimpleDatum > | 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. More... | |
List< SimpleDatum > | GetItems (int nSrcId, int[] rgIdx, string strFilterVal, int? nBoostVal, 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... | |
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... | |
SimpleDatum | GetItem (int nImageID, params int[] rgSrcId) |
Returns the image with a given Raw Image ID. More... | |
int | FindItemIndex (int nSrcId, DateTime dt, string strDescription) |
Searches fro the image index of an image within a data source matching a DateTime/description pattern. More... | |
SimpleDatum | GetItemMean (int nSrcId) |
Returns the image mean for a data source. More... | |
void | SetImageMean (int nSrcId, SimpleDatum d) |
Sets the image mean for a data source. More... | |
SimpleDatum | QueryItemMeanFromDataset (int nDatasetId) |
Returns the image mean for the Training data source of a given data set. More... | |
SimpleDatum | QueryItemMeanFromDb (int nSrcId) |
Queries the image mean for a data source from the database on disk. More... | |
void | SaveImageMean (int nSrcId, SimpleDatum d, bool bUpdate) |
Saves the image mean to a data source on the database on disk. More... | |
SimpleDatum | QueryItemMean (int nSrcId) |
Query the image mean for a data source and mask out (set to 0) all of the image except for the last columns. More... | |
bool | DoesImageMeanExists (int nSrcId) |
Returns whether or not the image mean exists in the disk-based database for a given data source. More... | |
long | LoadDatasetByName (string strDs, string strEvtCancel=null) |
Load another 'secondary' dataset. More... | |
long | LoadDatasetByID (int nDsId, string strEvtCancel=null) |
Load another 'secondary' dataset. 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... | |
bool | ReloadDataset (int nDsId) |
Reload a data set. More... | |
bool | UnloadDatasetByName (string strDataset) |
The UnloadDataset method removes the dataset specified from memory. More... | |
bool | UnloadDatasetById (int nDataSetID) |
The UnloadDataset method removes the dataset specified from memory. 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... | |
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... | |
int | GetDatasetID (string strDs) |
Returns a data set ID given its name. More... | |
string | GetDatasetName (int nDsId) |
Returns a data set name given its ID. More... | |
bool | ReloadImageSet (int nSrcID) |
Reloads the images of a 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... | |
int | GetSourceID (string strSrc) |
Returns a data source ID given its name. More... | |
string | GetSourceName (int nSrcId) |
Returns a data source name given its ID. 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... | |
void | ResetAllBoosts (int nSrcId) |
Reset all in-memory image boosts. More... | |
List< SimpleResult > | GetAllResults (string strSource, bool bRequireExtraData, int nMax=-1) |
Query all results for a given data source. More... | |
Static Public Member Functions | |
static void | CreateDatabase (ConnectInfo ci, string strPath) |
Create the database used by the MyCaffeImageDatabase. More... | |
static Tuple< DB_LABEL_SELECTION_METHOD, DB_ITEM_SELECTION_METHOD > | GetSelectionMethod (SettingsCaffe s) |
Returns the label/image selection methods based on the SettingsCaffe settings. More... | |
static Tuple< DB_LABEL_SELECTION_METHOD, DB_ITEM_SELECTION_METHOD > | GetSelectionMethod (ProjectEx p) |
Returns the label/image selection methods based on the ProjectEx settings. More... | |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Properties | |
Log | OutputLog [getset] |
Get/set the output log. More... | |
bool | UseTrainingImagesForTesting [getset] |
Get/set whether or not to use training images for the test set (default = false). More... | |
double | SuperBoostProbability [getset] |
Get/set the super-boost probability which increases/decreases the probability of selecting a boosted image (default = 0). More... | |
bool | SelectFromBoostOnly [get] |
Returns whether or not to select ONLY from boosted images. More... | |
bool | IsEnabled [get] |
Returns whether or not the image database is enabled. More... | |
bool | IsInitialized [get] |
Returns whether or not the image database is initialized. More... | |
Events | |
EventHandler< CalculateImageMeanArgs > | OnCalculateImageMean |
The OnCalculateImageMean event fires each time the MyCaffeImageDatabase wants to access the image mean for a data set. More... | |
[V2 Image Database] The MyCaffeImageDatabase2 provides an enhanced in-memory image database used for quick image retrieval.
The MyCaffeImageDatbase2 manages a set of data sets, where each data sets comprise a pair of data sources: one source for training and another source for testing. Each data source contains a list of images and a list of label sets that point back into the list of images. This organization allows for quick image selection by image or by label set and then by image from within the label set.
Definition at line 27 of file MyCaffeImageDatabase2.cs.
MyCaffe.db.image.MyCaffeImageDatabase2.MyCaffeImageDatabase2 | ( | Log | log = null , |
string | strId = "default" , |
||
int | nSeed = 0 |
||
) |
The MyCaffeImageDatabase2 constructor.
log | The Log for output. |
strId | Specifies an identifier for this in memory database instance (default = "default"). |
nSeed | Optionally, specifies a seed for the random number generator (default = null). |
Definition at line 64 of file MyCaffeImageDatabase2.cs.
MyCaffe.db.image.MyCaffeImageDatabase2.MyCaffeImageDatabase2 | ( | IContainer | container | ) |
The MyCaffeImageDatabase constructor.
container | Specifies a container. |
Definition at line 80 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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 loaded. |
bForce | Optionally, force the cleanup even if other users are using the database. |
Definition at line 334 of file MyCaffeImageDatabase2.cs.
|
static |
Create the database used by the MyCaffeImageDatabase.
ci | Specifies the connection information for the database (recommended value: db = 'DNN', server = '.') |
strPath | Specifies the file path where the database is to be created. |
Definition at line 468 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.CreateQueryState | ( | int | nDsId, |
bool | bUseUniqueLabelIndexes = true , |
||
bool | bUseUniqueImageIndexes = true , |
||
IMGDB_SORT | sort = IMGDB_SORT.NONE |
||
) |
Create a query state for a data set, optionally using a specific sorting method.
nDsId | Specifies the ID of the data set. |
bUseUniqueLabelIndexes | Optionally, specifies to use unique label indexes which is slightly slower, but ensures each label is hit per epoch equally (default = true). |
bUseUniqueImageIndexes | Optionally, specifies to use unique image indexes which is slightly slower, but ensures each image is hit per epoch (default = true). |
sort | Specifies the sorting method. |
Definition at line 760 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.CreateQueryState | ( | string | strDs, |
bool | bUseUniqueLabelIndexes = true , |
||
bool | bUseUniqueImageIndexes = true , |
||
IMGDB_SORT | sort = IMGDB_SORT.NONE |
||
) |
Create a query state for a data set, optionally using a specific sorting method.
strDs | Specifies the name of the data set. |
bUseUniqueLabelIndexes | Optionally, specifies to use unique label indexes which is slightly slower, but ensures each label is hit per epoch equally (default = true). |
bUseUniqueImageIndexes | Optionally, specifies to use unique image indexes which is slightly slower, but ensures each image is hit per epoch (default = true). |
sort | Specifies the sorting method. |
Definition at line 777 of file MyCaffeImageDatabase2.cs.
|
protected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
Definition at line 14 of file MyCaffeImageDatabase2.Designer.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.DoesImageMeanExists | ( | int | nSrcId | ) |
Returns whether or not the image mean exists in the disk-based database for a given data source.
nSrcId | Specifies the ID of the data source. |
Definition at line 1443 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.Enable | ( | bool | bEnable | ) |
Sets whether or not the image database is enabled.
bEnable |
Definition at line 1116 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.FindItemIndex | ( | int | nSrcId, |
DateTime | dt, | ||
string | strDescription | ||
) |
Searches fro 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. |
Definition at line 1327 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.FreeQueryState | ( | int | nDsId, |
long | lHandle | ||
) |
Frees a query state from a given dataset.
nDsId | Specifies the dataset on which to free the query state. |
lHandle | Specifies the handle to the query state to free. |
Definition at line 822 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.FreeQueryState | ( | string | strDs, |
long | lHandle | ||
) |
Frees a query state from a given dataset.
strDs | Specifies the dataset name on which to free the query state. |
lHandle | Specifies the handle to the query state to free. |
Definition at line 833 of file MyCaffeImageDatabase2.cs.
List< SimpleResult > MyCaffe.db.image.MyCaffeImageDatabase2.GetAllResults | ( | string | strSource, |
bool | bRequireExtraData, | ||
int | nMax = -1 |
||
) |
Query all results for a given data source.
strSource | Specifies the data source who's results are to be returned. |
bRequireExtraData | specifies whether or not the Extra 'target' data is required or not. |
nMax | Optionally, specifies the maximum number of items to load. |
Definition at line 1964 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.GetBoostQueryHitPercentsAsTextFromSourceName | ( | long | lQueryState, |
string | strSource | ||
) |
Returns the percentage of boosted images queried as text.
lQueryState | Specifies the handle to the query state. |
strSource | Specifies the source to query. |
Definition at line 844 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 876 of file MyCaffeImageDatabase2.cs.
DatasetDescriptor MyCaffe.db.image.MyCaffeImageDatabase2.GetDatasetById | ( | int | nDsId | ) |
Returns the DatasetDescriptor for a given data set ID.
nDsId | Specifies the data set ID. |
Definition at line 1714 of file MyCaffeImageDatabase2.cs.
DatasetDescriptor MyCaffe.db.image.MyCaffeImageDatabase2.GetDatasetByName | ( | string | strDs | ) |
Returns the DatasetDescriptor for a given data set name.
strDs | Specifies the data set name. |
Definition at line 1725 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.GetDatasetID | ( | string | strDs | ) |
Returns a data set ID given its name.
strDs | Specifies the data set name. |
Definition at line 1736 of file MyCaffeImageDatabase2.cs.
double MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1692 of file MyCaffeImageDatabase2.cs.
double MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1668 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.GetDatasetName | ( | int | nDsId | ) |
Returns a data set name given its ID.
nDsId | Specifies the data set ID. |
Definition at line 1750 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.GetImageCount | ( | int | nSrcId | ) |
Returns the number of images in a given data source.
nSrcId | Specifies the data source ID. |
Definition at line 935 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.GetImageCount | ( | long | lQueryState, |
int | nSrcId, | ||
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the number of images in a given data source, optionally only counting the boosted images.
lQueryState | Specifies a handle to the query state to use. |
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'.
Definition at line 971 of file MyCaffeImageDatabase2.cs.
List< SimpleDatum > MyCaffe.db.image.MyCaffeImageDatabase2.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.
lQueryState | Specifies a handle to the query state to use. |
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'.
Definition at line 1182 of file MyCaffeImageDatabase2.cs.
List< SimpleDatum > MyCaffe.db.image.MyCaffeImageDatabase2.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.
lQueryState | Specifies a handle to the query state to use. |
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'.
Definition at line 1207 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.GetItem | ( | int | nImageID, |
params int[] | rgSrcId | ||
) |
Returns the image with a given Raw Image ID.
nImageID | Specifies the Raw Image ID. |
rgSrcId | Specifies a set of source ID's to query from. |
Definition at line 1297 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.GetItemCount | ( | int | nSrcId, |
string | strFilterVal = null , |
||
int? | nBoostVal = null , |
||
bool | bBoostValIsExact = false |
||
) |
Returns the number of images in a given data source, optionally only counting the boosted images.
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'.
Definition at line 955 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.GetItemMean | ( | int | nSrcId | ) |
Returns the image mean for a data source.
nSrcId | Specifies the ID of the data source. |
Definition at line 1341 of file MyCaffeImageDatabase2.cs.
List< SimpleDatum > MyCaffe.db.image.MyCaffeImageDatabase2.GetItems | ( | int | nSrcId, |
int[] | rgIdx, | ||
string | strFilterVal, | ||
int? | nBoostVal, | ||
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 - currently, not used in Version 2. |
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'.
Definition at line 1230 of file MyCaffeImageDatabase2.cs.
List< SimpleDatum > MyCaffe.db.image.MyCaffeImageDatabase2.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 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'.
Definition at line 1146 of file MyCaffeImageDatabase2.cs.
List< SimpleDatum > MyCaffe.db.image.MyCaffeImageDatabase2.GetItemsFromTime | ( | 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'.
Definition at line 1163 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.GetLabelCountsAsTextFromSourceId | ( | int | nSrcId | ) |
Returns a string with all label counts for a data source.
nSrcId | Specifies the ID of the data source. |
Definition at line 1917 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.GetLabelCountsAsTextFromSourceName | ( | string | strSource | ) |
Returns a string with all label counts for a data source.
strSource | Specifies the name of the data source. |
Definition at line 1927 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1856 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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).
lQueryState | Specifies the handle to the query state. |
strSource | Specifies the data source who's query epochs are to be retrieved. |
Definition at line 866 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 896 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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).
lQueryState | Specifies the handle to the query state. |
strSource | Specifies the data source who's hit percentages are to be retrieved. |
Definition at line 855 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 886 of file MyCaffeImageDatabase2.cs.
List< LabelDescriptor > MyCaffe.db.image.MyCaffeImageDatabase2.GetLabels | ( | int | nSrcId | ) |
Returns a list of LabelDescriptors associated with the labels within a data source.
nSrcId | Specifies the data source ID. |
Definition at line 1845 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.GetLoadItemDataCriteria | ( | ) |
Returns whether or not the image data criteria is loaded with each image.
Definition at line 917 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.GetLoadItemDebugData | ( | ) |
Returns whether or not the image debug data is loaded with each image.
Definition at line 925 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
nDsID | Specifies the dataset name for which the automatic refresh cycle is to run. |
nPeriodInMs | Returns the period in milliseconds over which the auto refresh cycle is run. |
dfReplacementPct | Returns the percentage of replacement to use on each cycle. |
nTrainingRefreshCount | Returns the training refrsh count. |
nTestingRefreshCount | Returns the testing refresh count. |
Definition at line 734 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
strDs | Specifies the dataset name for which the automatic refresh cycle is to run. |
nPeriodInMs | Returns the period in milliseconds over which the auto refresh cycle is run. |
dfReplacementPct | Returns the percentage of replacement to use on each cycle. |
nTrainingRefreshCount | Returns the training refrsh count. |
nTestingRefreshCount | Returns the testing refresh count. |
Definition at line 674 of file MyCaffeImageDatabase2.cs.
Tuple< DB_LABEL_SELECTION_METHOD, DB_ITEM_SELECTION_METHOD > MyCaffe.db.image.MyCaffeImageDatabase2.GetSelectionMethod | ( | ) |
Returns the label and image selection method used.
Definition at line 1048 of file MyCaffeImageDatabase2.cs.
|
static |
Returns the label/image selection methods based on the ProjectEx settings.
p | Specifies the project. |
Definition at line 1020 of file MyCaffeImageDatabase2.cs.
|
static |
Returns the label/image selection methods based on the SettingsCaffe settings.
s | Specifies the caffe settings. |
Definition at line 988 of file MyCaffeImageDatabase2.cs.
SourceDescriptor MyCaffe.db.image.MyCaffeImageDatabase2.GetSourceById | ( | int | nSrcId | ) |
Returns the SourceDescriptor for a given data source ID.
nSrcId | Specifies the data source ID. |
Definition at line 1785 of file MyCaffeImageDatabase2.cs.
SourceDescriptor MyCaffe.db.image.MyCaffeImageDatabase2.GetSourceByName | ( | string | strSrc | ) |
Returns the SourceDescriptor for a given data source name.
strSrc | Specifies the data source name. |
Definition at line 1799 of file MyCaffeImageDatabase2.cs.
int MyCaffe.db.image.MyCaffeImageDatabase2.GetSourceID | ( | string | strSrc | ) |
Returns a data source ID given its name.
strSrc | Specifies the data source name. |
Definition at line 1813 of file MyCaffeImageDatabase2.cs.
string MyCaffe.db.image.MyCaffeImageDatabase2.GetSourceName | ( | int | nSrcId | ) |
Returns a data source name given its ID.
nSrcId | Specifies the data source ID. |
Definition at line 1827 of file MyCaffeImageDatabase2.cs.
DB_VERSION MyCaffe.db.image.MyCaffeImageDatabase2.GetVersion | ( | ) |
Returns the version of the MyCaffe Image Database being used.
Definition at line 92 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.InitializeWithDs | ( | 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. |
Definition at line 127 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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). |
Definition at line 289 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.InitializeWithDsId | ( | 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). |
Definition at line 152 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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 | Optionally, specifies the name of the CancelEvent used to cancel load operations (default = null). |
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). |
Definition at line 308 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.InitializeWithDsName | ( | 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. |
Definition at line 115 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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). |
Definition at line 272 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.IsRefreshRunning | ( | int | nDsId, |
bool | bTraining, | ||
bool | bTesting | ||
) |
Returns true if the refresh operation running.
nDsId | Specifies the dataset ID. |
bTraining | Specifies to check the training data source for refresh. |
bTesting | Specifies to check the testing data source for refresh. |
Definition at line 525 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.IsRefreshRunning | ( | string | strDs, |
bool | bTraining, | ||
bool | bTesting | ||
) |
Returns true if the refresh operation running.
strDs | Specifies the dataset name. |
bTraining | Specifies to check the training data source for refresh. |
bTesting | Specifies to check the testing data source for refresh. |
Definition at line 541 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.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.
nDsId | Specifies the ID of the data set. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
Definition at line 1493 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1549 of file MyCaffeImageDatabase2.cs.
long MyCaffe.db.image.MyCaffeImageDatabase2.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.
strDs | Specifies the name of the data set. |
strEvtCancel | Specifies the name of the CancelEvent used to cancel load operations. |
Definition at line 1477 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1568 of file MyCaffeImageDatabase2.cs.
Dictionary< int, int > MyCaffe.db.image.MyCaffeImageDatabase2.LoadLabelCounts | ( | int | nSrcId | ) |
Returns a label lookup of counts for a given data source.
nSrcId | Specifies the ID of the data source. |
Definition at line 1907 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.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.
lQueryState | Specifies a handle to the query state to use. |
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). |
Definition at line 1251 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.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). |
Definition at line 1286 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.QueryItemMean | ( | int | nSrcId | ) |
Query the image mean for a data source and mask out (set to 0) all of the image except for the last columns.
nSrcId | Specifies the ID of the data source. |
Definition at line 1430 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.QueryItemMeanFromDataset | ( | int | nDatasetId | ) |
Returns the image mean for the Training data source of a given data set.
nDatasetId | Specifies the data set to use. |
Definition at line 1382 of file MyCaffeImageDatabase2.cs.
SimpleDatum MyCaffe.db.image.MyCaffeImageDatabase2.QueryItemMeanFromDb | ( | 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. |
Definition at line 1400 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.ReloadDataset | ( | int | nDsId | ) |
Reload a data set.
nDsId | Specifies the ID of the data set. |
Definition at line 1582 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.ReloadImageSet | ( | int | nSrcID | ) |
Reloads the images of a data source.
nSrcID | Specifies the ID of the data source. |
Definition at line 1764 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.ReloadIndexing | ( | int | nDsId | ) |
Reload the indexing for a data set.
nDsId | Specifies the dataset ID. |
Definition at line 438 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.ReloadIndexing | ( | string | strDs | ) |
Reload the indexing for a data set.
strDs | Specifies the dataset name. |
Definition at line 453 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.ResetAllBoosts | ( | int | nSrcId | ) |
Reset all in-memory image boosts.
This does not impact the boost setting within the physical database.
nSrcId | Specifies the source ID of the data set to reset. |
Definition at line 1943 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1887 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.SaveImageMean | ( | int | nSrcId, |
SimpleDatum | d, | ||
bool | bUpdate | ||
) |
Saves the image mean to a data source on the database on disk.
nSrcId | Specifies the ID of the data source. |
d | Specifies a SimpleDatum containing the image mean. |
bUpdate | Specifies whether or not to update the mean image. |
Definition at line 1419 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.SetConnection | ( | ConnectInfo | ci | ) |
Set the database connection to use.
ci | Specifies the dataase connection information to use. |
Definition at line 103 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.SetDefaultQueryState | ( | int | nDsId, |
long | lQueryState | ||
) |
Set the default query state to the query state specified for the dataset specified.
nDsId | Specifies the dataset ID. |
lQueryState | Specifies the query state to set. |
Definition at line 792 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.SetDefaultQueryState | ( | string | strDs, |
long | lQueryState | ||
) |
Set the default query state to the query state specified for the dataset specified.
strDs | Specifies the dataset name. |
lQueryState | Specifies the query state to set. |
Definition at line 807 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.SetImageMean | ( | int | nSrcId, |
SimpleDatum | d | ||
) |
Sets the image mean for a data source.
nSrcId | Specifies the ID of the data source. |
d | Specifies a SimpleDatum containing the image mean. |
Definition at line 1367 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1866 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1058 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.StartAutomaticRefreshSchedule | ( | int | nDsID, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nPeriodInMs, | ||
double | dfReplacementPct | ||
) |
Start the automatic refresh cycle to occur on specified period increments.
nDsID | Specifies the dataset ID for which the automatic refresh cycle is to run. |
bTraining | Specifies the training data source to start refreshing. |
bTesting | Specifies the testing data source to start refreshing. |
nPeriodInMs | Specifies the period in milliseconds over which the auto refresh cycle is to run. |
dfReplacementPct | Specifies the percentage of replacement to use on each cycle. |
Definition at line 697 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.StartAutomaticRefreshSchedule | ( | string | strDs, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nPeriodInMs, | ||
double | dfReplacementPct | ||
) |
Start the automatic refresh cycle to occur on specified period increments.
strDs | Specifies the dataset name for which the automatic refresh cycle is to run. |
bTraining | Specifies the training data source to start refreshing. |
bTesting | Specifies the testing data source to start refreshing. |
nPeriodInMs | Specifies the period in milliseconds over which the auto refresh cycle is to run. |
dfReplacementPct | Specifies the percentage of replacement to use on each cycle. |
Definition at line 637 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
nDsID | Specifies the dataset ID. |
bTraining | Specifies the training data source to refresh. |
bTesting | Specifies the testing data source to refresh. |
dfReplacementPct | Optionally, specifies the replacement percentage to use (default = 0.25 for 25%). |
Definition at line 600 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
strDs | Specifies the dataset name. |
bTraining | Specifies the training data source to refresh. |
bTesting | Specifies the testing data source to refresh. |
dfReplacementPct | Optionally, specifies the replacement percentage to use (default = 0.25 for 25%). |
Definition at line 561 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.StopAutomaticRefreshSchedule | ( | int | nDsID, |
bool | bTraining, | ||
bool | bTesting | ||
) |
Stop the automatic refresh schedule running on a dataset.
nDsID | Specifies the dataset ID for which the automatic refresh cycle is to run. |
bTraining | Specifies the training data source to stop refreshing. |
bTesting | Specifies the testing data source to stop refreshing. |
Definition at line 716 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.StopAutomaticRefreshSchedule | ( | string | strDs, |
bool | bTraining, | ||
bool | bTesting | ||
) |
Stop the automatic refresh schedule running on a dataset.
strDs | Specifies the dataset name for which the automatic refresh cycle is to run. |
bTraining | Specifies the training data source to stop refreshing. |
bTesting | Specifies the testing data source to stop refreshing. |
Definition at line 656 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
nDsID | Specifies the dataset ID. |
bTraining | Specifies the training data source to strop refreshing. |
bTesting | Specifies the testing data source to stop refreshing. |
Definition at line 619 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.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.
strDs | Specifies the dataset name. |
bTraining | Specifies the training data source to strop refreshing. |
bTesting | Specifies the testing data source to stop refreshing. |
Definition at line 580 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.UnloadDatasetById | ( | int | nDataSetID | ) |
The UnloadDataset method removes the dataset specified from memory.
nDataSetID | Specifies the dataset ID to remove. |
Specifiying a dataset ID of -1 directs the UnloadDatasetById to unload ALL datasets loaded.
Definition at line 1630 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.UnloadDatasetByName | ( | string | strDataset | ) |
The UnloadDataset method removes the dataset specified from memory.
strDataset | Specifies the dataset to remove. |
Definition at line 1599 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1897 of file MyCaffeImageDatabase2.cs.
void MyCaffe.db.image.MyCaffeImageDatabase2.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. |
Definition at line 1877 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.WaitForDatasetToLoad | ( | int | nDsId, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nWait = int.MaxValue |
||
) |
Wait for the dataset loading to complete.
nDsId | Specifies the dataset ID. |
bTraining | Specifies to wait for the training data source to load. |
bTesting | Specifies to wait for the testing data source to load. |
nWait | Specifies the amount of time to wait in ms. (default = int.MaxValue). |
Definition at line 407 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.WaitForDatasetToLoad | ( | string | strDs, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nWait = int.MaxValue |
||
) |
Wait for the dataset loading to complete.
strDs | Specifies the dataset name. |
bTraining | Specifies to wait for the training data source to load. |
bTesting | Specifies to wait for the testing data source to load. |
nWait | Specifies the amount of time to wait in ms. (default = int.MaxValue). |
Definition at line 424 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.WaitForDatasetToRefresh | ( | int | nDsId, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nWait = int.MaxValue |
||
) |
Wait for the dataset refreshing to complete.
nDsId | Specifies the dataset ID. |
bTraining | Specifies to wait for the training data source to refresh. |
bTesting | Specifies to wait for the testing data source to refresh. |
nWait | Specifies the amount of time to wait in ms. (default = int.MaxValue). |
Definition at line 492 of file MyCaffeImageDatabase2.cs.
bool MyCaffe.db.image.MyCaffeImageDatabase2.WaitForDatasetToRefresh | ( | string | strDs, |
bool | bTraining, | ||
bool | bTesting, | ||
int | nWait = int.MaxValue |
||
) |
Wait for the dataset refreshing to complete.
strDs | Specifies the dataset name. |
bTraining | Specifies to wait for the training data source to refresh. |
bTesting | Specifies to wait for the testing data source to refresh. |
nWait | Specifies the amount of time to wait in ms. (default = int.MaxValue). |
Definition at line 509 of file MyCaffeImageDatabase2.cs.
|
get |
Returns whether or not the image database is enabled.
Definition at line 1107 of file MyCaffeImageDatabase2.cs.
|
get |
Returns whether or not the image database is initialized.
Definition at line 1124 of file MyCaffeImageDatabase2.cs.
|
getset |
Get/set the output log.
Definition at line 908 of file MyCaffeImageDatabase2.cs.
|
get |
Returns whether or not to select ONLY from boosted images.
Definition at line 1088 of file MyCaffeImageDatabase2.cs.
|
getset |
Get/set the super-boost probability which increases/decreases the probability of selecting a boosted image (default = 0).
Definition at line 1079 of file MyCaffeImageDatabase2.cs.
|
getset |
Get/set whether or not to use training images for the test set (default = false).
Definition at line 1070 of file MyCaffeImageDatabase2.cs.
EventHandler<CalculateImageMeanArgs> MyCaffe.db.image.MyCaffeImageDatabase2.OnCalculateImageMean |
The OnCalculateImageMean event fires each time the MyCaffeImageDatabase wants to access the image mean for a data set.
Definition at line 56 of file MyCaffeImageDatabase2.cs.