MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
Initially the QueryState is copied from the MasterIndexes and during each query is altered by removing items already observed. Once empty, each Index within the QueryState is then refreshed with the corresponding MasterIndexes ensuring that all images are hit over time. More...
Public Member Functions | |
QueryState (MasterIndexes master, bool bUseUniqueLabelIndexes=true, bool bUseUniqueImageIndexes=true, IMGDB_SORT sort=IMGDB_SORT.BYIDX) | |
The constructor. More... | |
void | UpdateStats (SimpleDatum sd) |
Update the label stats. More... | |
int? | GetNextLabel (DB_LABEL_SELECTION_METHOD lblSel) |
Returns the next label in the Index set selected based on the selection criteria. More... | |
override? int | GetNextLabel (Index.SELECTION_TYPE type, bool bBoosted=false) |
Returns the next label in the Index set selected based on the selection criteria. More... | |
int? | GetNextImage (DB_ITEM_SELECTION_METHOD imgSel, int? nLabel, int nDirectIdx) |
Returns the next image in the Index set based on the selection criteria. More... | |
override? int | GetNextImage (Index.SELECTION_TYPE type, int? nLabel=null, bool bBoosted=false, int nDirectIdx=-1) |
Returns the next image in the Index set based on the selection criteria. More... | |
Dictionary< int, ulong > | GetQueryLabelCounts () |
Returns the query label counts. More... | |
string | GetQueryBoostHitPercentsAsText () |
Returns the number of times each boosted image vs. non boosted images are hit. More... | |
string | GetQueryLabelHitPercentsAsText () |
Returns the number of times each label is hit. More... | |
string | GetQueryLabelEpochsAsText () |
Returns the number of epochs each label has experienced. More... | |
Public Member Functions inherited from MyCaffe.db.image.MasterIndexes | |
MasterIndexes (CryptoRandom random, SourceDescriptor src, int nLoadLimit=0) | |
The constructor. More... | |
MasterIndexes (MasterIndexes idx, IMGDB_SORT sort) | |
The constructor used to copy another MasterIndexes and optionally specify a sorting for the indexes. More... | |
void | Dispose () |
Release all resources used. More... | |
List< DbItem > | FindImageIndexes (DateTime dt) |
Returns all DbItems that point to images iwth a given date. More... | |
void | Reload (List< DbItem > rgItems) |
Reload all images by re-loading the master index list. More... | |
Index | GetIndex (int? nLabel=null, bool bBoosted=false) |
Returns the Index matching the criteria. More... | |
void | SetIndex (Index idx, int? nLabel=null, bool bBoosted=false) |
Set a given index based on the criteria. More... | |
List< int > | GetIndexes (int nStartIdx, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the indexes fitting the criteria. More... | |
List< int > | GetIndexes (DateTime dtStart, int nQueryCount=int.MaxValue, string strFilterVal=null, int? nBoostVal=null, bool bBoostValIsExact=false) |
Returns the indexes fitting the criteria. More... | |
override string | ToString () |
Returns a string representation of the master indexes. More... | |
Additional Inherited Members | |
Protected Attributes inherited from MyCaffe.db.image.MasterIndexes | |
SourceDescriptor | m_src |
Specifies the data source descriptor. More... | |
Index | m_index = null |
Specifies the index into all of the data source images. More... | |
LabelIndex | m_rgLabels = null |
Specifies the list of images listed by label where each label contains an index into all images with that label. More... | |
Index | m_boosted = null |
Specifies the list of all boosted images. More... | |
LabelIndex | m_rgLabelsBoosted = null |
Specifies the list of all boosted images listed by label where each label contains an index into all boosted images with that label. More... | |
Properties inherited from MyCaffe.db.image.MasterIndexes | |
List< DbItem > | RawIndexes [get] |
Returns the raw indexes. More... | |
int | LoadLimit [get] |
Returns the load limit set during initialization. More... | |
int | LabelCount [get] |
Returns the number of labels. More... | |
Initially the QueryState is copied from the MasterIndexes and during each query is altered by removing items already observed. Once empty, each Index within the QueryState is then refreshed with the corresponding MasterIndexes ensuring that all images are hit over time.
QueryStates may also be ordered which is usedful in SEQUENTIAL querries.
Definition at line 18 of file QueryState.cs.
MyCaffe.db.image.QueryState.QueryState | ( | MasterIndexes | master, |
bool | bUseUniqueLabelIndexes = true , |
||
bool | bUseUniqueImageIndexes = true , |
||
IMGDB_SORT | sort = IMGDB_SORT.BYIDX |
||
) |
The constructor.
master | Specifies the MasterIndexes to copy. |
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 | Optionally, specifies the ordering to use on the indexes (default = BYIDX). |
Definition at line 32 of file QueryState.cs.
int? MyCaffe.db.image.QueryState.GetNextImage | ( | DB_ITEM_SELECTION_METHOD | imgSel, |
int? | nLabel, | ||
int | nDirectIdx | ||
) |
Returns the next image in the Index set based on the selection criteria.
imgSel | Specifies the image selection method used. |
nLabel | Optionally, specifies a label (default = null). |
nDirectIdx | Optionally, specifies to query the image at this index (only applies when type = DIRECT). |
Definition at line 100 of file QueryState.cs.
|
virtual |
Returns the next image in the Index set based on the selection criteria.
type | Specifies the selection type (e.g. RANDOM, SEQUENTIAL). |
nLabel | Optionally, specifies a label (default = null). |
bBoosted | Optionally, specifies to query boosted images (default = false). |
nDirectIdx | Optionally, specifies to query the image at this index (only applies when type = DIRECT). |
Reimplemented from MyCaffe.db.image.MasterIndexes.
Definition at line 131 of file QueryState.cs.
int? MyCaffe.db.image.QueryState.GetNextLabel | ( | DB_LABEL_SELECTION_METHOD | lblSel | ) |
Returns the next label in the Index set selected based on the selection criteria.
lblSel | Specifies the label selection method used. |
Definition at line 60 of file QueryState.cs.
|
virtual |
Returns the next label in the Index set selected based on the selection criteria.
type | Specifies the selection type (e.g. RANDOM, SEQUENTIAL). |
bBoosted | Optionally, specifies to use label sets of boosted images (default = false). |
Reimplemented from MyCaffe.db.image.MasterIndexes.
Definition at line 80 of file QueryState.cs.
string MyCaffe.db.image.QueryState.GetQueryBoostHitPercentsAsText | ( | ) |
Returns the number of times each boosted image vs. non boosted images are hit.
Definition at line 184 of file QueryState.cs.
Dictionary< int, ulong > MyCaffe.db.image.QueryState.GetQueryLabelCounts | ( | ) |
Returns the query label counts.
Definition at line 175 of file QueryState.cs.
string MyCaffe.db.image.QueryState.GetQueryLabelEpochsAsText | ( | ) |
Returns the number of epochs each label has experienced.
Definition at line 202 of file QueryState.cs.
string MyCaffe.db.image.QueryState.GetQueryLabelHitPercentsAsText | ( | ) |
Returns the number of times each label is hit.
Definition at line 193 of file QueryState.cs.
void MyCaffe.db.image.QueryState.UpdateStats | ( | SimpleDatum | sd | ) |
Update the label stats.
sd | Specifies the recently queried simple datum. |
Definition at line 49 of file QueryState.cs.