![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The DatasetFactory manages the connection to the Database object. More...
Public Member Functions | |
| DatasetFactory () | |
| The DatasetFactory constructor. More... | |
| DatasetFactory (bool bLoadDataCriteria, bool bLoadDebugData) | |
| The DatasetFactory constructor. More... | |
| DatasetFactory (DatasetFactory factory) | |
| The DatasetFactory constructor. More... | |
| DatasetFactory (int nSrcId) | |
| The DatasetFactory constructor. More... | |
| void | Dispose () |
| Releases all resources used. More... | |
| void | SetLoadingParameters (bool bLoadDataCriteria, bool bLoadDebugData) |
| Sets the loading parameters that are used to determine which data to load with each image. More... | |
| bool | ChangeRawImageSourceID (int nID, int nNewSrcID, bool bSave=true) |
| Change the data source ID on a raw image - currently only allowed on virtual raw images. More... | |
| void | SaveChanges () |
| Save the changes on the open data source. More... | |
| void | Open (SourceDescriptor src, int nCacheMax=500, ConnectInfo ci=null) |
| Open a given data source. More... | |
| void | Open (int nSrcId, int nCacheMax=500, Database.FORCE_LOAD nForceLoad=Database.FORCE_LOAD.NONE, Log log=null, ConnectInfo ci=null) |
| Open a given data source. More... | |
| void | Close () |
| Close the current data source used. More... | |
| void | Refresh () |
| Close and re-open the current data source used. More... | |
| void | PutRawImageParameterCache (int nImageID, string strParam, string strVal, double? dfVal, byte[] rgData, bool bOnlyAddNew) |
| Add a new parameter to the parameter cache making sure to save once a maximum count is reached. More... | |
| void | ClearParamCache (bool bSave) |
| Clear the param cache and save when specified. More... | |
| void | PutRawImageCache (int nIdx, SimpleDatum sd, int nBackgroundWritingThreadCount=0, string strDescription=null, bool bActive=true, params ParameterData[] rgParams) |
| Add a SimpleDatum to the RawImage cache. More... | |
| void | ClearImageCache (bool bSave) |
| Clear the RawImage cache and optionally save the images. More... | |
| int | PutRawImage (int nIdx, SimpleDatum sd, string strDescription=null) |
| Save a SimpleDatum to the database. More... | |
| int | SetRawImageParameter (int nRawImageID, string strName, string strValue, double? dfVal=null, byte[] rgData=null, bool bOnlyAddNew=false) |
| Add a new or Set an existing RawImage parameter. More... | |
| int | SetRawImageParameter (int nSrcID, int nRawImageID, string strName, string strValue, double? dfVal=null, byte[] rgData=null) |
| Add a new or Set an existing RawImage parameter. More... | |
| int | SetRawImageParameterAt (DateTime dt, string strName, string strValue, double? dfVal=null, byte[] rgData=null) |
| Set the RawImage parameter for all RawImages with the given time-stamp in the data source. More... | |
| List< RawImageParameter > | QueryRawImageParameters (int nSrcId, string strName) |
| Query a list of all raw image parameters of a give name stored with a given source ID. More... | |
| List< RawImageParameter > | QueryRawImageParameters (int nImageID) |
| Query all image parameters for a given image. More... | |
| RawImageMean | GetRawImageMean () |
| Return the RawImageMean for the open data source. More... | |
| List< RawImage > | GetRawImagesAt (int nImageIdx, int nImageCount, int nSrcId=0, string strDescription=null) |
| Returns a list of RawImages from the database for a data source. More... | |
| List< RawImage > | GetRawImagesAt (List< int > rgImageIdx, ManualResetEvent evtCancel, int nSrcId=0, string strDescription=null) |
| Returns a list of RawImages from the database for a data source. More... | |
| List< RawImage > | GetRawImagesAtID (List< int > rgImageId, ManualResetEvent evtCancel, int nSrcId=0, string strDescription=null) |
| Returns a list of RawImages from the database for a data source. More... | |
| List< RawImage > | GetRawImagesAt (List< DbItem > rgImgItems, ManualResetEvent evtCancel, int nSrcId=0, string strDescription=null) |
| Returns a list of RawImages from the database for a data source. More... | |
| List< SimpleDatum > | GetImagesAt (List< int > rgImageIdx, ManualResetEvent evtCancel, int nSrcId=0, string strDescription=null) |
| Returns a list of SimpleDatum from the database for a data source. More... | |
| List< SimpleDatum > | GetImagesAt (List< DbItem > rgImageItems, ManualResetEvent evtCancel, int nSrcId=0, string strDescription=null) |
| Returns a list of SimpleDatum from the database for a data source. More... | |
| List< SimpleDatum > | GetImagesAtID (List< int > rgImageId, int nSrcId=0, string strDescription=null) |
| Returns a list of SimpleDatum from the database for a data source. More... | |
| List< RawImage > | QueryRawImages (int nSrcId, bool? bActive=null, bool bLoadCriteria=false, bool bLoadDebug=false, Log log=null, CancelEvent evtCancel=null, int nBoostVal=0, bool bExactBoostVal=false) |
| Returns the list of raw images that have a source ID from a selected list. More... | |
| void | LoadRawImageData (RawImage img, bool bLoadCriteria, bool bLoadDebug) |
| Returns the list of raw images that have a source ID from a selected list. More... | |
| int | PutRawImageMean (SimpleDatum sd, bool bUpdate, ConnectInfo ci=null) |
| Save the SimpleDatum as a RawImageMean in the database for the open data source. More... | |
| bool | SaveImageMean (SimpleDatum sd, bool bUpdate, int nSrcId=0) |
| Save the SimpleDatum as a RawImageMean in the database. More... | |
| SimpleDatum | QueryImageMean (int nSrcId=0) |
| Return the SimpleDatum for the image mean from the open data source. More... | |
| bool | CopyImageMean (string strSrcSrc, string strDstSrc) |
| Copy the raw image mean from one source to another. More... | |
| int | GetImageCount () |
| Returns the number of images in the database for the open data source. More... | |
| List< int > | QueryRawImageIDs (int nSrcId=0, int nMax=int.MaxValue, int nLabel=-1, int nBoost=-1, bool bBoostIsExact=false, bool bAnnotatedOnly=false) |
| Returns all raw image IDs for a given data source. More... | |
| int | GetRawImageMeanID (int nSrcId=0) |
| Returns the raw image ID for the image mean associated with a data source. More... | |
| int | GetRawImageID (DateTime dt, int nSrcId=0) |
| Returns the RawImage ID for the image with the given time-stamp. More... | |
| RawImage | GetRawImageFromID (int nImageID) |
| Returns the raw image with a specified image ID. More... | |
| void | DeleteRawImageResults (int nSrcId=0) |
| Delete all RawImageResults for a data source. More... | |
| int | PutRawImageResults (int nSrcId, int nIdx, int nLabel, DateTime dt, List< Result > rgResults, bool bInvert, List< Tuple< DateTime, int > > rgExtra=null) |
| Save the results of a Run as a RawImageResult. More... | |
| int | PutRawImageResults (int nSrcId, int nIdx, int nLabel, DateTime dt, List< Tuple< SimpleDatum, List< Result > > > rgrgResults, List< Tuple< DateTime, int > > rgExtra=null) |
| Save the time-synchronized batch of results of a Run as a RawImageResult. More... | |
| List< Tuple< SimpleDatum, List< Result > > > | GetRawImageResultBatch (int nBatchCount, byte[] rgResults) |
| Extracts the raw image result batch from the result binary data. More... | |
| int | AddRawImageGroup (Image img, int nIdx, DateTime dtStart, DateTime dtEnd, List< double > rgProperties) |
| Adds a new RawImage group to the database. More... | |
| int | FindRawImageGroupID (int nIdx, DateTime dtStart, DateTime dtEnd) |
| Searches fro the RawImageGroup ID. More... | |
| List< string > | GetRawImageDistinctParameterDescriptions (int nSrcId) |
| Returns a list of distinct RawImage parameter descriptions for a data source. More... | |
| byte[] | GetRawImageParameterData (int nRawImageID, string strParam) |
| Return the byte array data of a RawImage parameter. More... | |
| int | GetRawImageParameterCount (string strParam, int nSrcId=0, string strType="TEXT") |
| Returns the RawImage parameter count for a data source. More... | |
| bool | GetRawImageParameterExist (string strName, int nSrcId=0, string strType="TEXT") |
| Returns whether or not a given RawImage parameter exists. More... | |
| bool | UpdateActiveLabel (int nImageID, int nNewActiveLabel, bool bActivate=true, bool bSaveChanges=true) |
| Update the active label on a given raw image. More... | |
| void | UpdateActiveLabelDirect (int nID, int nLabel) |
| Directly update the active label and activate the image with the specified ID. More... | |
| void | UpdateAllActiveLabelsDirect (int nLabel, int? nOriginalLabel=null) |
| Directly update all active labels and activate all of the images for the open Source ID. More... | |
| void | DisableLabel (int nLabel, bool bOriginalLabel=false) |
| Disable a set of labels within the open source. More... | |
| void | DisableAllLabels () |
| Disable all labels within the open source. More... | |
| int | DisableAllNonMatchingImages (int nWidth, int nHeight) |
| Disable all images that do not have a matching widxht size. More... | |
| void | ResetAllActiveLabels () |
| Reset all active labels within the open source. More... | |
| void | UpdateActiveLabelByID (int nID, int nNewActiveLabel) |
| Update the active label on a given raw image by its index. More... | |
| void | UpdateActiveLabelByIndex (int nIdx, int nNewActiveLabel) |
| Update the active label on a given raw image by its index. More... | |
| void | ActivateRawImageByIndex (int nIdx, bool bActive) |
| Activate/deactivate a raw image based on its index. More... | |
| void | UpdateRawImageSourceID (int nImageID, int nSrcID) |
| Change the source ID on an image to another source ID. More... | |
| bool | ActivateRawImage (int nImageID, bool bActive, bool bSave=true) |
| Activate/Deactivate a given image. More... | |
| void | ActivateAllRawImages (bool bActive, bool bAnnotatedOnly, params int[] rgSrcId) |
| Activates all images with the given source ID's. More... | |
| void | ActivateAllRawImages (bool bActive, bool bAnnotatedOnly, int? nTgtLabel, bool bTargetLabelExact, int? nTgtBoost, bool bTargetBoostExact, params int[] rgSrcId) |
| Activate all raw images associated with a set of source ID's. More... | |
| void | FixupRawImageCopy (int nImageID, int nSecondarySrcId) |
| The FixupRawImageCopy function is used to fix errors in the copy source ID of a copied raw image. For original images, this function does nothing. More... | |
| byte[] | GetRawImageDataCriteria (byte[] rgData, int nOriginalSourceID) |
| Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data. More... | |
| byte[] | GetRawImageDataCriteria (int nImgID, int nOriginalSourceID) |
| Queries the Data Criteria data for an image and then converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data. More... | |
| byte[] | GetRawImageDebugData (byte[] rgData, int nOriginalSourceID) |
| Converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data. More... | |
| byte[] | GetRawImageDebugData (int nImgID, int nOriginalSourceID) |
| Queries the Debug data for an image and then converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data. More... | |
| void | UpdateDatasetImageAnnotations (int nSrcId, int nImageId, AnnotationGroupCollection annotations, bool bSetLabelOnly) |
| Update the annotations on a given RawImage. More... | |
| List< LabelBoostDescriptor > | GetLabelBoosts (int nProjectId, int nSrcId=0) |
| Returns a list of all label boosts set on a project. More... | |
| void | SetLabelMapping (LabelMapping map, int nSrcId=0) |
| Saves a label mapping in the database for a data source. More... | |
| void | UpdateLabelMapping (int nNewLabel, List< int > rgOriginalLabels, int nSrcId=0) |
| Update a label mapping in the database for a data source. More... | |
| void | ResetLabels (int nProjectId=0, int nSrcId=0) |
| Resets all labels back to their original labels for a project. More... | |
| void | DeleteLabelBoosts (int nProjectId, int nSrcId=0) |
| Delete all label boosts for a project. More... | |
| void | AddLabelBoost (int nProjectId, int nLabel, double dfBoost, int nSrcId=0) |
| Add a label boost to the database for a given project. More... | |
| string | GetLabelBoostsAsText (int nProjectId, int nSrcId=0, bool bSort=true) |
| Returns the Label boosts as a string. More... | |
| Dictionary< int, int > | LoadLabelCounts (int nSrcId=0) |
| Load the label counts from the database for a data source. More... | |
| void | UpdateLabelCounts (Dictionary< int, int > rgCounts) |
| Updates the label counts in the database for the open data source. More... | |
| void | UpdateLabelCounts (int nSrcId=0, int nProjectId=0) |
| Update the label counts for a given data source and project (optionally) by querying the database for the actual counts. More... | |
| string | GetLabelCountsAsText (int nSrcId) |
| Returns the label counts for a given data source. More... | |
| void | UpdateLabelName (int nLabel, string strName, int nSrcId=0) |
| Update the name of a label. More... | |
| string | GetLabelName (int nLabel, int nSrcId=0) |
| Get the Label name of a label within a data source. More... | |
| int | AddLabel (int nLabel, string strName, int nSrcId=0, ConnectInfo ci=null) |
| Add a label to the database for a data source. More... | |
| void | DeleteLabels (int nSrcId=0) |
| Delete the labels of a data source from the database. More... | |
| void | ActivateLabels (List< int > rgLabels, bool bActive, params int[] rgSrcId) |
| Activate (or deactivate) the labels specified for each of the source ID's specified. More... | |
| void | UpdateLabelBoost (int? nTgtLbl, bool bTgtLblExact, int? nTgtBst, bool bTgtBstExact, int? nNewLbl, int? nNewBst, params int[] rgSrcId) |
| Update the label and boost for a given search target criteria. More... | |
| List< Label > | QueryLabels (int nSrcId=0, ConnectInfo ci=null) |
| Query the list of labels for a given source. More... | |
| int | GetSourceID (string strName) |
| Returns the ID of a data source given its name. More... | |
| string | GetSourceName (int nId) |
| Returns the name of a data source given its ID. More... | |
| int | AddSource (SourceDescriptor src, ConnectInfo ci=null, bool? bSaveImagesToFileOverride=null) |
| Adds a new data source to the database. More... | |
| int | AddSource (string strName, int nChannels, int nWidth, int nHeight, bool bDataIsReal, int nCopyOfSourceID=0, bool bSaveImagesToFile=true, ConnectInfo ci=null) |
| Adds a new data source to the database. More... | |
| void | DeleteSources (params string[] rgstrSrc) |
| Delete the list of data sources, listed by name, from the database. More... | |
| void | DeleteSourceData (int nSrcId=0) |
| Delete the data source data (images, means, results and parameters) from the database. More... | |
| int | GetBoostCount (int nSrcId=0, string strFilterVal=null, int? nBoostVal=null) |
| Return the number of boosted images for a data source. More... | |
| int | ActivateFiltered (int nSrcId=0, string strFilterVal=null, int? nBoostVal=null) |
| Activate the images that meet the filtering criteria in the Data Source. If no filtering criteria is set, all images are activated. More... | |
| bool | ReindexRawImages (Log log, CancelEvent evtCancel, int nSrcId=0, bool bCreateImageMean=false) |
| Reindex the RawImages of a data source. More... | |
| void | UpdateSource (int nChannels, int nWidth, int nHeight, bool bDataIsReal, int nSrcId=0) |
| Updates a data source. More... | |
| void | UpdateSourceCounts () |
| Saves the label cache, updates the label counts from the database and then updates the source counts from the database. More... | |
| void | SetSourceParameter (string strParam, string strValue, int nSrcId=0) |
| Set the value of a data source parameter. More... | |
| string | GetSourceParameter (string strParam, int nSrcId=0) |
| Return the data source parameter as a string. More... | |
| int | GetSourceParameter (string strParam, int nDefault, int nSrcId=0) |
| Return the data source parameter as an int. More... | |
| bool | GetSourceParameter (string strParam, bool bDefault, int nSrcId=0) |
| Return the data source parameter as a bool. More... | |
| double | GetSourceParameter (string strParam, double dfDefault, int nSrcId=0) |
| Return the data source parameter as a double. More... | |
| DateTime | GetFirstTimeStamp (int nSrcId=0, string strDesc=null) |
| Returns the first time-stamp in the data source. More... | |
| DateTime | GetLastTimeStamp (int nSrcId=0, string strDesc=null) |
| Returns the last time-stamp in the data source. More... | |
| DateTime | GetLastTimeStamp (DateTime dtStart, DateTime dtEnd, bool bEndInclusive, int nSrcId=0, string strDesc=null) |
| Returns the last time-stamp in the data source from within a time period. More... | |
| DateTime | GetLastTimeStamp (out int nIndex, int nSrcId=0, string strDesc=null) |
| Returns the last time-stamp and index in the data source. More... | |
| DateTime | GetLastTimeStamp (DateTime dtStart, DateTime dtEnd, bool bEndInclusive, out int nIndex, int nSrcId=0, string strDesc=null) |
| Returns the last time stamp within a given time range. More... | |
| int | GetDatasetID (string strDsName, ConnectInfo ci=null) |
| Returns a datasets ID given its name. More... | |
| string | GetDatasetName (int nId, ConnectInfo ci=null) |
| Returns the name of a dataset given its ID. More... | |
| int | AddDataset (DatasetDescriptor ds, ConnectInfo ci=null, bool? bSaveImagesToFileOverride=null) |
| Adds or updates the training source, testing source, dataset creator and dataset to the database. More... | |
| int | AddDataset (int nDsCreatorID, string strName, int nTestSrcId, int nTrainSrcId, int nDsGroupID=0, int nModelGroupID=0, ConnectInfo ci=null) |
| Add a new (or update an existing if exists) dataset to the database. More... | |
| void | UpdateDatasetDescription (int nDsId, string strDesc) |
| Update the description of a given dataset. More... | |
| void | UpdateDatasetCounts (int nDsId, ConnectInfo ci=null) |
| Updates the dataset counts, and training/testing source counts. More... | |
| void | UpdateDatasetCounts (CancelEvent evtCancel, Log log, int nDatasetCreatorID, List< string > rgstrDs, string strParamNameForDescription) |
| Updates the dataset counts for a set of datasets. More... | |
| string | FindDatasetNameFromSourceName (string strTrainSrc, string strTestSrc) |
| Searches for the data set name based on the training and testing source names. More... | |
| int | FindDatasetFromSourceId (int nSourceId) |
| Searches for the dataset containing the sourceId. More... | |
| void | ResetAllDatasetRelabelWithCreator (int nDsCreatorId) |
| Reset all dataset relabel flags with a given creator. More... | |
| void | UpdateDatasetRelabel (int nDsId, bool bRelabel) |
| Update the dataset relabel flag for a dataset. More... | |
| void | SetDatasetParameters (int nDsId, Dictionary< string, string > rgP) |
| Set a batch of dataset parameters. More... | |
| void | SetDatasetParameter (int nDsId, string strParam, string strValue) |
| Adds a new parameter or Sets the value of an existing dataset parameter. More... | |
| string | GetDatasetParameter (int nDsId, string strParam) |
| Returns the value of a dataset parameter as a string. More... | |
| int | GetDatasetParameter (int nDsId, string strParam, int nDefault) |
| Returns the value of a dataset parameter as an int. More... | |
| bool | GetDatasetParameter (int nDsId, string strParam, bool bDefault) |
| Returns the value of a dataset parameter as a bool. More... | |
| double | GetDatasetParameter (int nDsId, string strParam, double dfDefault) |
| Returns the value of a dataset parameter as a double. More... | |
| int | GetDatasetGroupID (string strName) |
| Returns the ID of a dataset group given its name. More... | |
| List< SimpleResult > | QueryAllResults (int nSrcID, bool bRequireExtraData=false, int nMax=-1) |
| Load all results for a given data source. More... | |
| List< DbItem > | LoadImageIndexes (bool bBoostedOnly, bool bIncludeActive=true, bool bIncludeInactive=false) |
| Returns a list of the image indexes of all boosted images in the Data Source. More... | |
| List< ImageDescriptor > | LoadImages (CancelEvent evtCancel, params int[] rgSrcId) |
| Load the image descriptors for a set of given source ID's. More... | |
| SimpleDatum | LoadDatum (int nImageId, int nChannels, bool bDataIsReal, int nLabel, int nSrcId=0) |
| Loads a new SimpleDataum from a RawImage ID. More... | |
| SimpleDatum | LoadDatum (RawImage img, int nPadW=0, int nPadH=0) |
| Loads a new SimpleDatum from a RawImage. More... | |
| SimpleDatum | LoadDatum (RawImageMean img, int nPadW=0, int nPadH=0) |
| Loads a new image mean from a RawImageMean. More... | |
| SimpleDatum | LoadImage (int nImageId, int nSrcId=0) |
| Returns the image at a given image ID. More... | |
| SimpleDatum | LoadImageMean (int nSrcId, ConnectInfo ci=null) |
| Returns the image mean for a give data source. More... | |
| SimpleDatum | LoadImageAt (int nIdx, bool? bLoadDataCriteria=null, bool? bLoadDebugData=null, int nSrcId=0, int nPadW=0, int nPadH=0) |
| Load an image at a given index. More... | |
| SimpleResult | LoadResult (RawImageResult res, bool bRequireExtraData=false) |
| Load the simple results from a RawImageResult row. More... | |
| void | LoadRawData (SimpleDatum sd, bool bLoadDataCriteria, bool bLoadDebugData) |
| Load the data criteria and/or debug data. More... | |
| List< LabelDescriptor > | LoadLabels (int nSrcId=0, bool bSort=true, bool bWithImagesOnly=false, ConnectInfo ci=null) |
| Load a list of LabelDescriptors for a data source. More... | |
| SourceDescriptor | LoadSource (string strSource) |
| Load the source descriptor from a data source name. More... | |
| SourceDescriptor | LoadSource (int nSrcId, ConnectInfo ci=null) |
| Load the source descriptor from a data source ID. More... | |
| ParameterDescriptorCollection | LoadSourceParameters (int nSrcId, ConnectInfo ci=null) |
| Loads the data source parameters for a given source. More... | |
| GroupDescriptor | LoadDatasetGroup (int nGroupId, ConnectInfo ci=null) |
| Load a dataset group descriptor from a group ID. More... | |
| GroupDescriptor | LoadModelGroup (int nGroupId, ConnectInfo ci=null) |
| Load a model group descriptor from a group ID. More... | |
| DatasetDescriptor | LoadDataset (string strDataset, ConnectInfo ci=null) |
| Load a dataset descriptor from a dataset name. More... | |
| DatasetDescriptor | LoadDataset (int nDatasetID, ConnectInfo ci=null) |
| Load a dataset descriptor from a dataset ID. More... | |
| DatasetDescriptor | LoadDataset (int nDatasetID, string strDataset) |
| Load a dataset descriptor from a dataset ID or name, where the ID is tried first and name second. More... | |
| DatasetDescriptor | LoadDataset (string strTestingSrc, string strTrainingSrc) |
| Load the dataset descriptor that contains the testing and training data source names. More... | |
| List< DatasetDescriptor > | LoadAllDatasetsWithCreators (int nGroupId) |
| Loads all dataset descriptors within a group that have a creator. More... | |
| List< DatasetDescriptor > | LoadAllDatasetsWithCreator (int nCreatorID, bool? bRelabeled=null) |
| Loads all dataset descriptors with a given dataset creator. More... | |
| ParameterDescriptorCollection | LoadDatasetParameters (int nDsId, ConnectInfo ci=null) |
| Loads the dataset parameters for a given dataset. More... | |
| List< ResultDescriptor > | LoadRawImageResults (int nSrcId=0) |
| Loads a list of RawImage results for a data source. More... | |
Protected Member Functions | |
| virtual DatasetDescriptor | loadDataset (Dataset ds, ConnectInfo ci=null) |
| Loads a dataset creator from a Dataset entity. More... | |
Protected Attributes | |
| Database | m_db = new Database() |
| Specifies the Database managed. More... | |
| SourceDescriptor | m_openSource = null |
| Specifies the open source descriptor (if any). More... | |
| int? | m_nOriginalSourceID = null |
| Specifies the original source ID (if any). More... | |
| bool | m_bLoadDataCriteria = false |
| Specifies whether or not to load the data criteria data if any exists. When false, the data criteria data is not loaded from file (default = false). More... | |
| bool | m_bLoadDebugData = false |
| Specifies whether or not to load the debug data if any exists. When false, the debug data is not loaded from file (default = false). More... | |
| ConnectInfo | m_ciOpen = null |
| Specifies the connection information used on open. More... | |
Properties | |
| Database | Database [get] |
| Returns the underlying Database object. More... | |
| int | LastIndex [get] |
| Returns the index of the last image added to the database. More... | |
| bool | LoadDataCriteria [get] |
| Returns whether or not the image data criteria is to be loaded when loading each image. More... | |
| bool | LoadDebugData [get] |
| Returns whether or not the image debug data is to be loaded when loading each image. More... | |
| SourceDescriptor | OpenSource [get] |
| Returns the currently open data source. More... | |
| int? | OriginalSourceID [getset] |
| Get/set the original source ID (if any). This field is used when copying a source and using the virutal image reference, but retaining the original source ID for the internal image lookup. More... | |
The DatasetFactory manages the connection to the Database object.
Definition at line 18 of file DatasetFactory.cs.
| MyCaffe.db.image.DatasetFactory.DatasetFactory | ( | ) |
The DatasetFactory constructor.
Definition at line 52 of file DatasetFactory.cs.
| MyCaffe.db.image.DatasetFactory.DatasetFactory | ( | bool | bLoadDataCriteria, |
| bool | bLoadDebugData | ||
| ) |
The DatasetFactory constructor.
| bLoadDataCriteria | Optionally, specifies to load the data criteria when loading images. |
| bLoadDebugData | Optionally, specifies to load the debug data when loading images. |
Definition at line 62 of file DatasetFactory.cs.
| MyCaffe.db.image.DatasetFactory.DatasetFactory | ( | DatasetFactory | factory | ) |
The DatasetFactory constructor.
| factory | Specifies the DatasetFactory to create this one from. |
Definition at line 73 of file DatasetFactory.cs.
| MyCaffe.db.image.DatasetFactory.DatasetFactory | ( | int | nSrcId | ) |
The DatasetFactory constructor.
| nSrcId | Specifies the data source ID of data source to open within the constructor. |
Definition at line 83 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ActivateAllRawImages | ( | bool | bActive, |
| bool | bAnnotatedOnly, | ||
| int? | nTgtLabel, | ||
| bool | bTargetLabelExact, | ||
| int? | nTgtBoost, | ||
| bool | bTargetBoostExact, | ||
| params int[] | rgSrcId | ||
| ) |
Activate all raw images associated with a set of source ID's.
| bActive | Specifies whether or not to activate the images. |
| bAnnotatedOnly | Specifies to activate annotated images only. |
| nTgtLabel | If not null, specifies the target label. |
| bTargetLabelExact | Specifies that the exact nTgtLabel value should be used, otherwise the nTgtLabel value or greater is used. |
| nTgtBoost | If not null, specifies the target boost. |
| bTargetBoostExact | Specifies that the exact nTgtBoost value should be used, otherwise the nTgtBoost value or greater is used. |
| rgSrcId | Specifies the source ID's. |
Definition at line 1010 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ActivateAllRawImages | ( | bool | bActive, |
| bool | bAnnotatedOnly, | ||
| params int[] | rgSrcId | ||
| ) |
Activates all images with the given source ID's.
| bActive | Specifies whether or not to activate the images. |
| bAnnotatedOnly | Specifies to activate annotated images only. |
| rgSrcId | Specifies the source ID's who's images are to be activated. |
Definition at line 995 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.ActivateFiltered | ( | int | nSrcId = 0, |
| string | strFilterVal = null, |
||
| int? | nBoostVal = null |
||
| ) |
Activate the images that meet the filtering criteria in the Data Source. If no filtering criteria is set, all images are activated.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strFilterVal | Optionally, specifies a parameter filtering value (default = null). |
| nBoostVal | Optionally, specifies a boost filtering value (default = null). |
Definition at line 1399 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ActivateLabels | ( | List< int > | rgLabels, |
| bool | bActive, | ||
| params int[] | rgSrcId | ||
| ) |
Activate (or deactivate) the labels specified for each of the source ID's specified.
| rgLabels | Specifies the labels. |
| bActive | Specifies whether to activate (true) or deactivate (false) the labels. |
| rgSrcId | Specifies the source ID's who's labels are to be activated. |
Definition at line 1271 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.ActivateRawImage | ( | int | nImageID, |
| bool | bActive, | ||
| bool | bSave = true |
||
| ) |
Activate/Deactivate a given image.
| nImageID | Specifies the ID of the image to activate/deactivate. |
| bActive | Specifies whether to activate (true) or deactivate (false) the image. |
| bSave | Specifies whether or not to save the changes (when false, calling SaveChanges() is needed). |
Definition at line 984 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ActivateRawImageByIndex | ( | int | nIdx, |
| bool | bActive | ||
| ) |
Activate/deactivate a raw image based on its index.
| nIdx | Specifies the raw image index. |
| bActive | Specifies the new active state of the image to set. |
Definition at line 962 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddDataset | ( | DatasetDescriptor | ds, |
| ConnectInfo | ci = null, |
||
| bool? | bSaveImagesToFileOverride = null |
||
| ) |
Adds or updates the training source, testing source, dataset creator and dataset to the database.
| ds | |
| ci | Optionally, specifies a specific connection to use (default = null). |
| bSaveImagesToFileOverride | Optionally, specifies the save images to file override, or null to ignore (default = null). |
Definition at line 1663 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddDataset | ( | int | nDsCreatorID, |
| string | strName, | ||
| int | nTestSrcId, | ||
| int | nTrainSrcId, | ||
| int | nDsGroupID = 0, |
||
| int | nModelGroupID = 0, |
||
| ConnectInfo | ci = null |
||
| ) |
Add a new (or update an existing if exists) dataset to the database.
| nDsCreatorID | Specifies the ID of the creator. |
| strName | Specifies the name of the dataset. |
| nTestSrcId | Specifies the ID of the testing data source. |
| nTrainSrcId | Specifies the ID of the training data source. |
| nDsGroupID | Optionally, specifies the ID of the dataset group (default = 0). |
| nModelGroupID | Optionally, specifies the ID of the model group (default = 0). |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1687 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddLabel | ( | int | nLabel, |
| string | strName, | ||
| int | nSrcId = 0, |
||
| ConnectInfo | ci = null |
||
| ) |
Add a label to the database for a data source.
| nLabel | Specifies the label. |
| strName | Optionally, specifies a label name (default = ""). |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1251 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.AddLabelBoost | ( | int | nProjectId, |
| int | nLabel, | ||
| double | dfBoost, | ||
| int | nSrcId = 0 |
||
| ) |
Add a label boost to the database for a given project.
| nProjectId | Specifies the ID of the project for which the label boost is to be added. |
| nLabel | Specifies the label. |
| dfBoost | Specifies the boost. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1163 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddRawImageGroup | ( | Image | img, |
| int | nIdx, | ||
| DateTime | dtStart, | ||
| DateTime | dtEnd, | ||
| List< double > | rgProperties | ||
| ) |
Adds a new RawImage group to the database.
| img | Specifies an image associated with the group. |
| nIdx | Specifies an index associated with the group. |
| dtStart | Specifies the start time stamp for the group. |
| dtEnd | Specifies the end time stamp for the group. |
| rgProperties | Specifies the properties of the group. |
Definition at line 805 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddSource | ( | SourceDescriptor | src, |
| ConnectInfo | ci = null, |
||
| bool? | bSaveImagesToFileOverride = null |
||
| ) |
Adds a new data source to the database.
| src | Specifies source desciptor to add. |
| ci | Optionally, specifies a specific connection to use (default = null). |
| bSaveImagesToFileOverride | Optionally, specifies the save images to file override, or null to ignore (default = null). |
Definition at line 1337 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.AddSource | ( | string | strName, |
| int | nChannels, | ||
| int | nWidth, | ||
| int | nHeight, | ||
| bool | bDataIsReal, | ||
| int | nCopyOfSourceID = 0, |
||
| bool | bSaveImagesToFile = true, |
||
| ConnectInfo | ci = null |
||
| ) |
Adds a new data source to the database.
| strName | Specifies the data source name. |
| nChannels | Specifies the number of channels per item. |
| nWidth | Specifies the width of each item. |
| nHeight | Specifies the height of each item. |
| bDataIsReal | Specifies whether or not the item uses real or byte data. |
| nCopyOfSourceID | Optionally, specifies the ID of the source from which this source was copied (and has virtual raw image references). The default of 0 specifies that this is an original source. |
| bSaveImagesToFile | Optionally, specifies whether or not to save the images to the file system (true) or directly into the database (false). The default is true. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1357 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.ChangeRawImageSourceID | ( | int | nID, |
| int | nNewSrcID, | ||
| bool | bSave = true |
||
| ) |
Change the data source ID on a raw image - currently only allowed on virtual raw images.
| nID | Specifies the raw image ID. |
| nNewSrcID | Specifies the ID of the new source. |
| bSave | Optionally, specifies whether or not to save the changes (default = true). |
Definition at line 145 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ClearImageCache | ( | bool | bSave | ) |
Clear the RawImage cache and optionally save the images.
| bSave | When true the images in the cache are saved to the database in a bulk save, otherwise they are just flushed from the cache. |
Definition at line 280 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ClearParamCache | ( | bool | bSave | ) |
Clear the param cache and save when specified.
| bSave | Specifies to save the parameter values in the cache before clearing. |
Definition at line 249 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.Close | ( | ) |
Close the current data source used.
Definition at line 201 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.CopyImageMean | ( | string | strSrcSrc, |
| string | strDstSrc | ||
| ) |
Copy the raw image mean from one source to another.
| strSrcSrc | Specifies the Data Source with the source image mean to copy. |
| strDstSrc | Specifies the Data Source with the destination image mean where the source is copied to. |
Definition at line 682 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DeleteLabelBoosts | ( | int | nProjectId, |
| int | nSrcId = 0 |
||
| ) |
Delete all label boosts for a project.
| nProjectId | Specifies the ID of a project. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1151 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DeleteLabels | ( | int | nSrcId = 0 | ) |
Delete the labels of a data source from the database.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1260 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DeleteRawImageResults | ( | int | nSrcId = 0 | ) |
Delete all RawImageResults for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 749 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DeleteSourceData | ( | int | nSrcId = 0 | ) |
Delete the data source data (images, means, results and parameters) from the database.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1375 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DeleteSources | ( | params string[] | rgstrSrc | ) |
Delete the list of data sources, listed by name, from the database.
| rgstrSrc | Specifies the list of data sources. |
Definition at line 1366 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DisableAllLabels | ( | ) |
Disable all labels within the open source.
Definition at line 913 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.DisableAllNonMatchingImages | ( | int | nWidth, |
| int | nHeight | ||
| ) |
Disable all images that do not have a matching widxht size.
| nWidth | Specifies the expected image width. |
| nHeight | Specifies the expected image height. |
Definition at line 924 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.DisableLabel | ( | int | nLabel, |
| bool | bOriginalLabel = false |
||
| ) |
Disable a set of labels within the open source.
| nLabel | Specifies the label to disable. |
| bOriginalLabel | Specifies whether the label is the original label (true) or the active label (false). |
Definition at line 905 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.Dispose | ( | ) |
Releases all resources used.
Definition at line 91 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.FindDatasetFromSourceId | ( | int | nSourceId | ) |
Searches for the dataset containing the sourceId.
| nSourceId | Specifies the sourceId to look for. |
Definition at line 1754 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.FindDatasetNameFromSourceName | ( | string | strTrainSrc, |
| string | strTestSrc | ||
| ) |
Searches for the data set name based on the training and testing source names.
| strTrainSrc | Specifies the data source name for training. |
| strTestSrc | Specifies the data source name for testing. |
Definition at line 1744 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.FindRawImageGroupID | ( | int | nIdx, |
| DateTime | dtStart, | ||
| DateTime | dtEnd | ||
| ) |
Searches fro the RawImageGroup ID.
| nIdx | Specifies the index of the raw image group. |
| dtStart | Specifies the start time-stamp of the image group. |
| dtEnd | Specifies the end time-stamp of the image group. |
Definition at line 817 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.FixupRawImageCopy | ( | int | nImageID, |
| int | nSecondarySrcId | ||
| ) |
The FixupRawImageCopy function is used to fix errors in the copy source ID of a copied raw image. For original images, this function does nothing.
When creating a copy of a Data Source that uses both training and testing Data Sources (e.g., re-arranging the time period used for training vs testing), it is important that the OriginalSourceID be set with the Data Source ID that holds the data file.
| nImageID | Specifies the ID of the raw image to fixup. |
| nSecondarySrcId | Specifies the secondary Source ID to use if the data file is not found. |
Definition at line 1026 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetBoostCount | ( | int | nSrcId = 0, |
| string | strFilterVal = null, |
||
| int? | nBoostVal = null |
||
| ) |
Return the number of boosted images for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strFilterVal | Optionally, specifies a parameter filtering value (default = null). |
| nBoostVal | Optionally, specifies a boost filtering value (default = null). |
Definition at line 1387 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetDatasetGroupID | ( | string | strName | ) |
Returns the ID of a dataset group given its name.
| strName | Specifies the name of the group. |
Definition at line 1851 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetDatasetID | ( | string | strDsName, |
| ConnectInfo | ci = null |
||
| ) |
Returns a datasets ID given its name.
| strDsName | Specifies the dataset name. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1640 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetDatasetName | ( | int | nId, |
| ConnectInfo | ci = null |
||
| ) |
Returns the name of a dataset given its ID.
| nId | Specifies the dataset ID. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1651 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetDatasetParameter | ( | int | nDsId, |
| string | strParam | ||
| ) |
Returns the value of a dataset parameter as a string.
| nDsId | Specifies the ID of the dataset. |
| strParam | Specifies the name of the parameter. |
Definition at line 1805 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.GetDatasetParameter | ( | int | nDsId, |
| string | strParam, | ||
| bool | bDefault | ||
| ) |
Returns the value of a dataset parameter as a bool.
| nDsId | Specifies the ID of the dataset. |
| strParam | Specifies the name of the parameter. |
| bDefault | Specifies the default value to return if not found. |
Definition at line 1829 of file DatasetFactory.cs.
| double MyCaffe.db.image.DatasetFactory.GetDatasetParameter | ( | int | nDsId, |
| string | strParam, | ||
| double | dfDefault | ||
| ) |
Returns the value of a dataset parameter as a double.
| nDsId | Specifies the ID of the dataset. |
| strParam | Specifies the name of the parameter. |
| dfDefault | Specifies the default value to return if not found. |
Definition at line 1841 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetDatasetParameter | ( | int | nDsId, |
| string | strParam, | ||
| int | nDefault | ||
| ) |
Returns the value of a dataset parameter as an int.
| nDsId | Specifies the ID of the dataset. |
| strParam | Specifies the name of the parameter. |
| nDefault | Specifies the default value to return if not found. |
Definition at line 1817 of file DatasetFactory.cs.
| DateTime MyCaffe.db.image.DatasetFactory.GetFirstTimeStamp | ( | int | nSrcId = 0, |
| string | strDesc = null |
||
| ) |
Returns the first time-stamp in the data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 1534 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetImageCount | ( | ) |
Returns the number of images in the database for the open data source.
Definition at line 693 of file DatasetFactory.cs.
| List< SimpleDatum > MyCaffe.db.image.DatasetFactory.GetImagesAt | ( | List< DbItem > | rgImageItems, |
| ManualResetEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of SimpleDatum from the database for a data source.
| rgImageItems | Specifies the list of image DbItems. |
| evtCancel | Specifies the cancel event. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 533 of file DatasetFactory.cs.
| List< SimpleDatum > MyCaffe.db.image.DatasetFactory.GetImagesAt | ( | List< int > | rgImageIdx, |
| ManualResetEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of SimpleDatum from the database for a data source.
| rgImageIdx | Specifies the list of image indexes (no maximum). |
| evtCancel | Specifies the cancel event. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 509 of file DatasetFactory.cs.
| List< SimpleDatum > MyCaffe.db.image.DatasetFactory.GetImagesAtID | ( | List< int > | rgImageId, |
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of SimpleDatum from the database for a data source.
| rgImageId | Specifies the list of image IDs (no maximum). |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 556 of file DatasetFactory.cs.
| List< LabelBoostDescriptor > MyCaffe.db.image.DatasetFactory.GetLabelBoosts | ( | int | nProjectId, |
| int | nSrcId = 0 |
||
| ) |
Returns a list of all label boosts set on a project.
| nProjectId | Specifies the ID of a project. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1102 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetLabelBoostsAsText | ( | int | nProjectId, |
| int | nSrcId = 0, |
||
| bool | bSort = true |
||
| ) |
Returns the Label boosts as a string.
| nProjectId | Specifies the ID of a project. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| bSort | Optionally, specifies whether or not to sort the labels by active label (default = true). |
Definition at line 1175 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetLabelCountsAsText | ( | int | nSrcId | ) |
Returns the label counts for a given data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1216 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetLabelName | ( | int | nLabel, |
| int | nSrcId = 0 |
||
| ) |
Get the Label name of a label within a data source.
| nLabel | Specifies the label. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1238 of file DatasetFactory.cs.
| DateTime MyCaffe.db.image.DatasetFactory.GetLastTimeStamp | ( | DateTime | dtStart, |
| DateTime | dtEnd, | ||
| bool | bEndInclusive, | ||
| int | nSrcId = 0, |
||
| string | strDesc = null |
||
| ) |
Returns the last time-stamp in the data source from within a time period.
| dtStart | Specifies the start of the time range. |
| dtEnd | Specifies the end of the time range. |
| bEndInclusive | Specifies whether or not to include the end time in the range. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 1559 of file DatasetFactory.cs.
| DateTime MyCaffe.db.image.DatasetFactory.GetLastTimeStamp | ( | DateTime | dtStart, |
| DateTime | dtEnd, | ||
| bool | bEndInclusive, | ||
| out int | nIndex, | ||
| int | nSrcId = 0, |
||
| string | strDesc = null |
||
| ) |
Returns the last time stamp within a given time range.
| dtStart | Specifies the start of the time range. |
| dtEnd | Specifies the end of the time range. |
| bEndInclusive | Specifies whether or not to include the end time in the range. |
| nIndex | Returns the index of the last item. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 1587 of file DatasetFactory.cs.
| DateTime MyCaffe.db.image.DatasetFactory.GetLastTimeStamp | ( | int | nSrcId = 0, |
| string | strDesc = null |
||
| ) |
Returns the last time-stamp in the data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 1545 of file DatasetFactory.cs.
| DateTime MyCaffe.db.image.DatasetFactory.GetLastTimeStamp | ( | out int | nIndex, |
| int | nSrcId = 0, |
||
| string | strDesc = null |
||
| ) |
Returns the last time-stamp and index in the data source.
| nIndex | Specifies the index of the last item. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDesc | Optionally, specifies a description to filter the values with (default = null, no filter). |
Definition at line 1572 of file DatasetFactory.cs.
| byte[] MyCaffe.db.image.DatasetFactory.GetRawImageDataCriteria | ( | byte[] | rgData, |
| int | nOriginalSourceID | ||
| ) |
Converts the raw image data criteria data which may be stored as a path to the underlying data file, to the actual data.
| rgData | Specifies the raw data, which may contain an image path. |
| nOriginalSourceID | Specifies the original source ID that stores the image. |
Definition at line 1037 of file DatasetFactory.cs.
| byte[] MyCaffe.db.image.DatasetFactory.GetRawImageDataCriteria | ( | int | nImgID, |
| int | nOriginalSourceID | ||
| ) |
Queries the Data Criteria data for an image and then converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data.
| nImgID | Specifies the raw image ID. |
| nOriginalSourceID | Specifies the original source ID that stores the image. |
Definition at line 1048 of file DatasetFactory.cs.
| byte[] MyCaffe.db.image.DatasetFactory.GetRawImageDebugData | ( | byte[] | rgData, |
| int | nOriginalSourceID | ||
| ) |
Converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data.
| rgData | Specifies the raw data, which may contain an image path. |
| nOriginalSourceID | Specifies the original source ID that stores the image. |
Definition at line 1060 of file DatasetFactory.cs.
| byte[] MyCaffe.db.image.DatasetFactory.GetRawImageDebugData | ( | int | nImgID, |
| int | nOriginalSourceID | ||
| ) |
Queries the Debug data for an image and then converts the raw image debug data which may be stored as a path to the underlying data file, to the actual data.
| nImgID | Specifies the raw image ID. |
| nOriginalSourceID | Specifies the original source ID that stores the image. |
Definition at line 1071 of file DatasetFactory.cs.
| List< string > MyCaffe.db.image.DatasetFactory.GetRawImageDistinctParameterDescriptions | ( | int | nSrcId | ) |
Returns a list of distinct RawImage parameter descriptions for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 827 of file DatasetFactory.cs.
| RawImage MyCaffe.db.image.DatasetFactory.GetRawImageFromID | ( | int | nImageID | ) |
Returns the raw image with a specified image ID.
| nImageID | Specifies the image ID of the image to retrieve. |
Definition at line 740 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetRawImageID | ( | DateTime | dt, |
| int | nSrcId = 0 |
||
| ) |
Returns the RawImage ID for the image with the given time-stamp.
| dt | Specifies the image time-stamp. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 730 of file DatasetFactory.cs.
| RawImageMean MyCaffe.db.image.DatasetFactory.GetRawImageMean | ( | ) |
Return the RawImageMean for the open data source.
Definition at line 375 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetRawImageMeanID | ( | int | nSrcId = 0 | ) |
Returns the raw image ID for the image mean associated with a data source.
| nSrcId | Specifies the data source ID. |
Definition at line 718 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetRawImageParameterCount | ( | string | strParam, |
| int | nSrcId = 0, |
||
| string | strType = "TEXT" |
||
| ) |
Returns the RawImage parameter count for a data source.
| strParam | Specifies the parameter name. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strType | Optionally, specifies the parameter type (default = "TEXT"). |
Definition at line 850 of file DatasetFactory.cs.
| byte[] MyCaffe.db.image.DatasetFactory.GetRawImageParameterData | ( | int | nRawImageID, |
| string | strParam | ||
| ) |
Return the byte array data of a RawImage parameter.
| nRawImageID | Specifies the ID of the RawImage. |
| strParam | Specifies the name of the parameter. |
Definition at line 838 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.GetRawImageParameterExist | ( | string | strName, |
| int | nSrcId = 0, |
||
| string | strType = "TEXT" |
||
| ) |
Returns whether or not a given RawImage parameter exists.
| strName | Specifies the parameter name. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strType | Optionally, specifies the parameter type (default = "TEXT"). |
Definition at line 862 of file DatasetFactory.cs.
| List< Tuple< SimpleDatum, List< Result > > > MyCaffe.db.image.DatasetFactory.GetRawImageResultBatch | ( | int | nBatchCount, |
| byte[] | rgResults | ||
| ) |
Extracts the raw image result batch from the result binary data.
| nBatchCount | Specifies the number of results in the batch. |
| rgResults | Specifies the binary batch data. |
Definition at line 791 of file DatasetFactory.cs.
| List< RawImage > MyCaffe.db.image.DatasetFactory.GetRawImagesAt | ( | int | nImageIdx, |
| int | nImageCount, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of RawImages from the database for a data source.
| nImageIdx | Specifies the starting image index. |
| nImageCount | Specifies the number of images to retrieve from the starting index nIdx. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 388 of file DatasetFactory.cs.
| List< RawImage > MyCaffe.db.image.DatasetFactory.GetRawImagesAt | ( | List< DbItem > | rgImgItems, |
| ManualResetEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of RawImages from the database for a data source.
| rgImgItems | Specifies the list of image DbItems. |
| evtCancel | Specifies the cancel event. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 473 of file DatasetFactory.cs.
| List< RawImage > MyCaffe.db.image.DatasetFactory.GetRawImagesAt | ( | List< int > | rgImageIdx, |
| ManualResetEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of RawImages from the database for a data source.
| rgImageIdx | Specifies the list of image indexes (no maximum). |
| evtCancel | Specifies the cancel event. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 401 of file DatasetFactory.cs.
| List< RawImage > MyCaffe.db.image.DatasetFactory.GetRawImagesAtID | ( | List< int > | rgImageId, |
| ManualResetEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| string | strDescription = null |
||
| ) |
Returns a list of RawImages from the database for a data source.
| rgImageId | Specifies the list of image IDs (no maximum). |
| evtCancel | Specifies the cancel event. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| strDescription | Optionally, specifies a description to filter the images retrieved (when specified, only images matching the filter are returned) (default = null). |
Definition at line 437 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetSourceID | ( | string | strName | ) |
Returns the ID of a data source given its name.
| strName | Specifies the data source name. |
Definition at line 1315 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetSourceName | ( | int | nId | ) |
Returns the name of a data source given its ID.
| nId | Specifies the ID of the data source. |
Definition at line 1325 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.GetSourceParameter | ( | string | strParam, |
| bool | bDefault, | ||
| int | nSrcId = 0 |
||
| ) |
Return the data source parameter as a bool.
| strParam | Specifies the parameter name. |
| bDefault | Specifies the default value returned if the parameter is not found. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1511 of file DatasetFactory.cs.
| double MyCaffe.db.image.DatasetFactory.GetSourceParameter | ( | string | strParam, |
| double | dfDefault, | ||
| int | nSrcId = 0 |
||
| ) |
Return the data source parameter as a double.
| strParam | Specifies the parameter name. |
| dfDefault | Specifies the default value returned if the parameter is not found. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1523 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.GetSourceParameter | ( | string | strParam, |
| int | nDefault, | ||
| int | nSrcId = 0 |
||
| ) |
Return the data source parameter as an int.
| strParam | Specifies the parameter name. |
| nDefault | Specifies the default value returned if the parameter is not found. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1499 of file DatasetFactory.cs.
| string MyCaffe.db.image.DatasetFactory.GetSourceParameter | ( | string | strParam, |
| int | nSrcId = 0 |
||
| ) |
Return the data source parameter as a string.
| strParam | Specifies the parameter name. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1487 of file DatasetFactory.cs.
| List< DatasetDescriptor > MyCaffe.db.image.DatasetFactory.LoadAllDatasetsWithCreator | ( | int | nCreatorID, |
| bool? | bRelabeled = null |
||
| ) |
Loads all dataset descriptors with a given dataset creator.
| nCreatorID | Specifies the ID of the dataset creator. |
| bRelabeled | Optionally, specifies whether or not only re-labeled datasets should be returned. |
Definition at line 2475 of file DatasetFactory.cs.
| List< DatasetDescriptor > MyCaffe.db.image.DatasetFactory.LoadAllDatasetsWithCreators | ( | int | nGroupId | ) |
Loads all dataset descriptors within a group that have a creator.
| nGroupId | Specifies the ID of the dataset group. |
Definition at line 2456 of file DatasetFactory.cs.
|
protectedvirtual |
Loads a dataset creator from a Dataset entity.
| ds | Specifies the Dataset entity. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2494 of file DatasetFactory.cs.
| DatasetDescriptor MyCaffe.db.image.DatasetFactory.LoadDataset | ( | int | nDatasetID, |
| ConnectInfo | ci = null |
||
| ) |
Load a dataset descriptor from a dataset ID.
| nDatasetID | Specifies the dataset ID. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2408 of file DatasetFactory.cs.
| DatasetDescriptor MyCaffe.db.image.DatasetFactory.LoadDataset | ( | int | nDatasetID, |
| string | strDataset | ||
| ) |
Load a dataset descriptor from a dataset ID or name, where the ID is tried first and name second.
| nDatasetID | Specifies the dataset ID. |
| strDataset | Specifies the dataset name. |
Definition at line 2423 of file DatasetFactory.cs.
| DatasetDescriptor MyCaffe.db.image.DatasetFactory.LoadDataset | ( | string | strDataset, |
| ConnectInfo | ci = null |
||
| ) |
Load a dataset descriptor from a dataset name.
| strDataset | Specifies the dataset name. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2397 of file DatasetFactory.cs.
| DatasetDescriptor MyCaffe.db.image.DatasetFactory.LoadDataset | ( | string | strTestingSrc, |
| string | strTrainingSrc | ||
| ) |
Load the dataset descriptor that contains the testing and training data source names.
| strTestingSrc | Specifies the testing data source name. |
| strTrainingSrc | Specifies the training data source name. |
Definition at line 2442 of file DatasetFactory.cs.
| GroupDescriptor MyCaffe.db.image.DatasetFactory.LoadDatasetGroup | ( | int | nGroupId, |
| ConnectInfo | ci = null |
||
| ) |
Load a dataset group descriptor from a group ID.
| nGroupId | Specifies the ID of the group. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2365 of file DatasetFactory.cs.
| ParameterDescriptorCollection MyCaffe.db.image.DatasetFactory.LoadDatasetParameters | ( | int | nDsId, |
| ConnectInfo | ci = null |
||
| ) |
Loads the dataset parameters for a given dataset.
| nDsId | Specifies the ID of the dataset. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2514 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadDatum | ( | int | nImageId, |
| int | nChannels, | ||
| bool | bDataIsReal, | ||
| int | nLabel, | ||
| int | nSrcId = 0 |
||
| ) |
Loads a new SimpleDataum from a RawImage ID.
| nImageId | Specifies the RawImage ID. |
| nChannels | Specifies the number of channels. |
| bDataIsReal | Specifies whether or not the data contains real or byte data. |
| nLabel | Specifies the label. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1949 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadDatum | ( | RawImage | img, |
| int | nPadW = 0, |
||
| int | nPadH = 0 |
||
| ) |
Loads a new SimpleDatum from a RawImage.
| img | Specifies the RawImage. |
| nPadW | Optionally, specifies a pad to apply to the width (default = 0). |
| nPadH | Optionally, specifies a pad to apply to the height (default = 0). |
Definition at line 1981 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadDatum | ( | RawImageMean | img, |
| int | nPadW = 0, |
||
| int | nPadH = 0 |
||
| ) |
Loads a new image mean from a RawImageMean.
| img | Specifies the RawImageMean. |
| nPadW | Optionally, specifies a pad to apply to the width (default = 0). |
| nPadH | Optionally, specifies a pad to apply to the height (default = 0). |
Definition at line 2086 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadImage | ( | int | nImageId, |
| int | nSrcId = 0 |
||
| ) |
Returns the image at a given image ID.
| nImageId | Specifies the image ID within the database. |
| nSrcId | Optionally, specifies the expected Source ID. The default is 0, which specifies to use the open Source ID. |
Definition at line 2162 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadImageAt | ( | int | nIdx, |
| bool? | bLoadDataCriteria = null, |
||
| bool? | bLoadDebugData = null, |
||
| int | nSrcId = 0, |
||
| int | nPadW = 0, |
||
| int | nPadH = 0 |
||
| ) |
Load an image at a given index.
| nIdx | Specifies the image index. |
| bLoadDataCriteria | Optionally, specifies to load the data criteria data (default = null, which uses the default of false). |
| bLoadDebugData | Optionally, specifies to load the debug data (default = null, which uses the default of false). |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| nPadW | Optionally, specifies a pad to apply to the width (default = 0). |
| nPadH | Optionally, specifies a pad to apply to the height (default = 0). |
Definition at line 2202 of file DatasetFactory.cs.
| List< DbItem > MyCaffe.db.image.DatasetFactory.LoadImageIndexes | ( | bool | bBoostedOnly, |
| bool | bIncludeActive = true, |
||
| bool | bIncludeInactive = false |
||
| ) |
Returns a list of the image indexes of all boosted images in the Data Source.
| bBoostedOnly | Specifies to only return the indexes of boosted images. |
| bIncludeActive | Optionally, specifies to query active images (default = true). |
| bIncludeInactive | Optionally, specifies to query inactive images (default = false). |
Definition at line 1900 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.LoadImageMean | ( | int | nSrcId, |
| ConnectInfo | ci = null |
||
| ) |
Returns the image mean for a give data source.
| nSrcId | Specifies the source data ID. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2183 of file DatasetFactory.cs.
| List< ImageDescriptor > MyCaffe.db.image.DatasetFactory.LoadImages | ( | CancelEvent | evtCancel, |
| params int[] | rgSrcId | ||
| ) |
Load the image descriptors for a set of given source ID's.
| evtCancel | Optionally specifies to cancel the load, when null this parameter is ignored. |
| rgSrcId | Specifies the source ID's to load. |
Definition at line 1911 of file DatasetFactory.cs.
| Dictionary< int, int > MyCaffe.db.image.DatasetFactory.LoadLabelCounts | ( | int | nSrcId = 0 | ) |
Load the label counts from the database for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1185 of file DatasetFactory.cs.
| List< LabelDescriptor > MyCaffe.db.image.DatasetFactory.LoadLabels | ( | int | nSrcId = 0, |
| bool | bSort = true, |
||
| bool | bWithImagesOnly = false, |
||
| ConnectInfo | ci = null |
||
| ) |
Load a list of LabelDescriptors for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| bSort | Specifies whether or not to sort the labels (default = false). |
| bWithImagesOnly | Specifies whether or not to only load labels with images associated with them (default = false). |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2282 of file DatasetFactory.cs.
| GroupDescriptor MyCaffe.db.image.DatasetFactory.LoadModelGroup | ( | int | nGroupId, |
| ConnectInfo | ci = null |
||
| ) |
Load a model group descriptor from a group ID.
| nGroupId | Specifies the ID of the group. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2381 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.LoadRawData | ( | SimpleDatum | sd, |
| bool | bLoadDataCriteria, | ||
| bool | bLoadDebugData | ||
| ) |
Load the data criteria and/or debug data.
| sd | Specifies the SimpleDatum to load. |
| bLoadDataCriteria | Specifies to load the data criteria data (default = false). |
| bLoadDebugData | Specifies to load the debug data (default = false). |
Definition at line 2265 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.LoadRawImageData | ( | RawImage | img, |
| bool | bLoadCriteria, | ||
| bool | bLoadDebug | ||
| ) |
Returns the list of raw images that have a source ID from a selected list.
| img | Specifies the Raw Image. |
| bLoadCriteria | Optionally, specifies to load the data criteria. |
| bLoadDebug | Optionally, specifies to load the debug data. |
Definition at line 627 of file DatasetFactory.cs.
| List< ResultDescriptor > MyCaffe.db.image.DatasetFactory.LoadRawImageResults | ( | int | nSrcId = 0 | ) |
Loads a list of RawImage results for a data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 2532 of file DatasetFactory.cs.
| SimpleResult MyCaffe.db.image.DatasetFactory.LoadResult | ( | RawImageResult | res, |
| bool | bRequireExtraData = false |
||
| ) |
Load the simple results from a RawImageResult row.
| res | Specifies the RawImageResult to load. |
| bRequireExtraData | Optionally, specifies whether or not the Extra 'target' data is required or not. |
Definition at line 2229 of file DatasetFactory.cs.
| SourceDescriptor MyCaffe.db.image.DatasetFactory.LoadSource | ( | int | nSrcId, |
| ConnectInfo | ci = null |
||
| ) |
Load the source descriptor from a data source ID.
| nSrcId | Specifies the name of the data source. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2315 of file DatasetFactory.cs.
| SourceDescriptor MyCaffe.db.image.DatasetFactory.LoadSource | ( | string | strSource | ) |
Load the source descriptor from a data source name.
| strSource | Specifies the Id of the data source. |
Definition at line 2304 of file DatasetFactory.cs.
| ParameterDescriptorCollection MyCaffe.db.image.DatasetFactory.LoadSourceParameters | ( | int | nSrcId, |
| ConnectInfo | ci = null |
||
| ) |
Loads the data source parameters for a given source.
| nSrcId | Specifies the ID of the data source. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 2346 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.Open | ( | int | nSrcId, |
| int | nCacheMax = 500, |
||
| Database.FORCE_LOAD | nForceLoad = Database.FORCE_LOAD.NONE, |
||
| Log | log = null, |
||
| ConnectInfo | ci = null |
||
| ) |
Open a given data source.
| nSrcId | Specifies the ID of the data source to use. |
| nCacheMax | Optionally, specifies the maximum cache count to use when adding RawImages (default = 500). |
| nForceLoad | Optionally, specifies how to force load the data (default = NONE). |
| log | Optionally, specifies the output log (default = null). |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 178 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.Open | ( | SourceDescriptor | src, |
| int | nCacheMax = 500, |
||
| ConnectInfo | ci = null |
||
| ) |
Open a given data source.
| src | Specifies the data source. |
| nCacheMax | Specifies the maximum cache count to use when adding RawImages (default = 500). |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 164 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.PutRawImage | ( | int | nIdx, |
| SimpleDatum | sd, | ||
| string | strDescription = null |
||
| ) |
Save a SimpleDatum to the database.
| nIdx | Specifies the RawImage index. |
| sd | Specifies the data. |
| strDescription | Optionally, specifies the description (default = null). |
Definition at line 301 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.PutRawImageCache | ( | int | nIdx, |
| SimpleDatum | sd, | ||
| int | nBackgroundWritingThreadCount = 0, |
||
| string | strDescription = null, |
||
| bool | bActive = true, |
||
| params ParameterData[] | rgParams | ||
| ) |
Add a SimpleDatum to the RawImage cache.
| nIdx | Specifies the RawImage index. |
| sd | Specifies the data. |
| nBackgroundWritingThreadCount | Optionally, specifies the background writing thread count, or 0 for to disable background writing (default = 0). |
| strDescription | Optionally, specifies the description (default = null). |
| bActive | Optionally, specifies whether or not the image is added as active (default = true) |
| rgParams | Optionally, specifies a variable number of parameters to add to the RawImage. |
Definition at line 269 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.PutRawImageMean | ( | SimpleDatum | sd, |
| bool | bUpdate, | ||
| ConnectInfo | ci = null |
||
| ) |
Save the SimpleDatum as a RawImageMean in the database for the open data source.
| sd | Specifies the data. |
| bUpdate | Specifies whether or not to update the mean image. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 645 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.PutRawImageParameterCache | ( | int | nImageID, |
| string | strParam, | ||
| string | strVal, | ||
| double? | dfVal, | ||
| byte[] | rgData, | ||
| bool | bOnlyAddNew | ||
| ) |
Add a new parameter to the parameter cache making sure to save once a maximum count is reached.
| nImageID | Specifies the image ID associated with the parameter. |
| strParam | Specifies the parameter name. |
| strVal | Specifies the parameter value. |
| dfVal | Specifies the parameter numeric value. |
| rgData | Specifies the parameter data. |
| bOnlyAddNew | Specifies to only add the parameter if it does not already exist. |
Definition at line 239 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.PutRawImageResults | ( | int | nSrcId, |
| int | nIdx, | ||
| int | nLabel, | ||
| DateTime | dt, | ||
| List< Result > | rgResults, | ||
| bool | bInvert, | ||
| List< Tuple< DateTime, int > > | rgExtra = null |
||
| ) |
Save the results of a Run as a RawImageResult.
| nSrcId | Specifies the ID of the data source. |
| nIdx | Specifies the index of the result. |
| nLabel | Specifies the expected label of the result. |
| dt | Specifies the time-stamp of the result. |
| rgResults | Specifies the results of the run as a list of (int nLabel, double dfReult) values. |
| bInvert | Specifies whether or not the results are inverted. |
| rgExtra | Optionally, specifies the extra target data. |
Definition at line 765 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.PutRawImageResults | ( | int | nSrcId, |
| int | nIdx, | ||
| int | nLabel, | ||
| DateTime | dt, | ||
| List< Tuple< SimpleDatum, List< Result > > > | rgrgResults, | ||
| List< Tuple< DateTime, int > > | rgExtra = null |
||
| ) |
Save the time-synchronized batch of results of a Run as a RawImageResult.
| nSrcId | Specifies the ID of the data source. |
| nIdx | Specifies the index of the result. |
| nLabel | Specifies the expected label of the result. |
| dt | Specifies the time-stamp of the result. |
| rgrgResults | Specifies the time-synchronized batch of results of the run as a list of (int nLabel, double dfReult) values. |
| rgExtra | Optionally, specifies the extra target data. |
Definition at line 780 of file DatasetFactory.cs.
| List< SimpleResult > MyCaffe.db.image.DatasetFactory.QueryAllResults | ( | int | nSrcID, |
| bool | bRequireExtraData = false, |
||
| int | nMax = -1 |
||
| ) |
Load all results for a given data source.
| nSrcID | Specifies the source ID. |
| bRequireExtraData | Optionally, 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 1870 of file DatasetFactory.cs.
| SimpleDatum MyCaffe.db.image.DatasetFactory.QueryImageMean | ( | int | nSrcId = 0 | ) |
Return the SimpleDatum for the image mean from the open data source.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 670 of file DatasetFactory.cs.
| List< Label > MyCaffe.db.image.DatasetFactory.QueryLabels | ( | int | nSrcId = 0, |
| ConnectInfo | ci = null |
||
| ) |
Query the list of labels for a given source.
| nSrcId | Optionally, specifies the source ID, or when 0, uses the open source ID. |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1297 of file DatasetFactory.cs.
| List< int > MyCaffe.db.image.DatasetFactory.QueryRawImageIDs | ( | int | nSrcId = 0, |
| int | nMax = int.MaxValue, |
||
| int | nLabel = -1, |
||
| int | nBoost = -1, |
||
| bool | bBoostIsExact = false, |
||
| bool | bAnnotatedOnly = false |
||
| ) |
Returns all raw image IDs for a given data source.
| nSrcId | Specifies the data source ID. |
| nMax | Optionally, specifies the maximum number of ID's to query (default = int.MaxValue). |
| nLabel | Optionally, specifies a label from which images are to be queried (default = -1, which ignores this parameter). |
| nBoost | Optionally, specifies a boost from which images are to be queried (default = -1, which ignores this parameter). |
| bBoostIsExact | Optionally, specifies whether the boost value is exact (true) or the minimum boost where all values equal are greater are retrieved (false). Default = false. |
| bAnnotatedOnly | Optionally, specifies to query annotated images only (default = false). |
Definition at line 708 of file DatasetFactory.cs.
| List< RawImageParameter > MyCaffe.db.image.DatasetFactory.QueryRawImageParameters | ( | int | nImageID | ) |
Query all image parameters for a given image.
| nImageID | Specifies the image ID who's image parameters are to be queried. |
Definition at line 366 of file DatasetFactory.cs.
| List< RawImageParameter > MyCaffe.db.image.DatasetFactory.QueryRawImageParameters | ( | int | nSrcId, |
| string | strName | ||
| ) |
Query a list of all raw image parameters of a give name stored with a given source ID.
| nSrcId | Specifies the source ID. |
| strName | Specifies the parameter name. |
Definition at line 356 of file DatasetFactory.cs.
| List< RawImage > MyCaffe.db.image.DatasetFactory.QueryRawImages | ( | int | nSrcId, |
| bool? | bActive = null, |
||
| bool | bLoadCriteria = false, |
||
| bool | bLoadDebug = false, |
||
| Log | log = null, |
||
| CancelEvent | evtCancel = null, |
||
| int | nBoostVal = 0, |
||
| bool | bExactBoostVal = false |
||
| ) |
Returns the list of raw images that have a source ID from a selected list.
| nSrcId | Specifies the source ID. |
| bActive | Optionally, specifies to query active (or non active) images (default = null, which queries all images). |
| bLoadCriteria | Optionally, specifies to load the data criteria which can take longer (default = false). |
| bLoadDebug | Optionally, specifies to load the debug data which can take longer (default = false). |
| log | Optionally, specifies the output log (default = null). |
| evtCancel | Optionally, specifies the cancel event to abort loading (default = null). |
| nBoostVal | Optionally, specifies a boost value to query (default = 0, which ignores this filter). |
| bExactBoostVal | Optionally, specifies whether or not the boost value is an exact value or to be treated as a value greater than or equal to (default = false). |
Definition at line 584 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.Refresh | ( | ) |
Close and re-open the current data source used.
Definition at line 211 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.ReindexRawImages | ( | Log | log, |
| CancelEvent | evtCancel, | ||
| int | nSrcId = 0, |
||
| bool | bCreateImageMean = false |
||
| ) |
Reindex the RawImages of a data source.
| log | Specifies the Log to use for status output. |
| evtCancel | Specifies the cancel event used to cancel the operation. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| bCreateImageMean | Optionally, specifies whether or not to create (or recreate) the image mean (default = false). |
Definition at line 1412 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ResetAllActiveLabels | ( | ) |
Reset all active labels within the open source.
Definition at line 932 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ResetAllDatasetRelabelWithCreator | ( | int | nDsCreatorId | ) |
Reset all dataset relabel flags with a given creator.
| nDsCreatorId | Specifies the ID of the dataset creator. |
Definition at line 1763 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.ResetLabels | ( | int | nProjectId = 0, |
| int | nSrcId = 0 |
||
| ) |
Resets all labels back to their original labels for a project.
| nProjectId | Optionally, specifies the ID of a project (default = 0). |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1141 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SaveChanges | ( | ) |
Save the changes on the open data source.
Definition at line 153 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.SaveImageMean | ( | SimpleDatum | sd, |
| bool | bUpdate, | ||
| int | nSrcId = 0 |
||
| ) |
Save the SimpleDatum as a RawImageMean in the database.
| sd | Specifies the data. |
| bUpdate | Specifies whether or not to update the mean image. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 657 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SetDatasetParameter | ( | int | nDsId, |
| string | strParam, | ||
| string | strValue | ||
| ) |
Adds a new parameter or Sets the value of an existing dataset parameter.
| nDsId | Specifies the ID of the dataset. |
| strParam | Specifies the name of the parameter. |
| strValue | Specifies the value of the parameter. |
Definition at line 1794 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SetDatasetParameters | ( | int | nDsId, |
| Dictionary< string, string > | rgP | ||
| ) |
Set a batch of dataset parameters.
| nDsId | Specifies the ID of the dataset. |
| rgP | Specifies a dictionary of name,value pairs. |
Definition at line 1783 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SetLabelMapping | ( | LabelMapping | map, |
| int | nSrcId = 0 |
||
| ) |
Saves a label mapping in the database for a data source.
| map | Specifies the label mapping. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1120 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SetLoadingParameters | ( | bool | bLoadDataCriteria, |
| bool | bLoadDebugData | ||
| ) |
Sets the loading parameters that are used to determine which data to load with each image.
| bLoadDataCriteria | Specifies whether or not to load the data criteria data if any exists. When false, the data criteria data is not loaded from file. (default = true). |
| bLoadDebugData | Specifies whether or not to load the debug data if any exists. When false, the debug data is not loaded from file. (default = true). |
Definition at line 116 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.SetRawImageParameter | ( | int | nRawImageID, |
| string | strName, | ||
| string | strValue, | ||
| double? | dfVal = null, |
||
| byte[] | rgData = null, |
||
| bool | bOnlyAddNew = false |
||
| ) |
Add a new or Set an existing RawImage parameter.
| nRawImageID | Specifies the ID of the RawImage. |
| strName | Specifies the name of the parameter. |
| strValue | Specifies the value of the parameter. |
| dfVal | Specifies the numeric value of the parameter (default = null). |
| rgData | Optionally, specifies raw data to associate with the RawImage (default = null). |
| bOnlyAddNew | Optionally, specifies to only add the parameter if it doesnt exist (default = false). |
Definition at line 316 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.SetRawImageParameter | ( | int | nSrcID, |
| int | nRawImageID, | ||
| string | strName, | ||
| string | strValue, | ||
| double? | dfVal = null, |
||
| byte[] | rgData = null |
||
| ) |
Add a new or Set an existing RawImage parameter.
| nSrcID | Specifies the source ID. |
| nRawImageID | Specifies the ID of the RawImage. |
| strName | Specifies the name of the parameter. |
| strValue | Specifies the value of the parameter. |
| dfVal | Specifies the numeric value of the parameter (default = null). |
| rgData | Optionally, specifies raw data to associate with the RawImage (default = null). |
Definition at line 331 of file DatasetFactory.cs.
| int MyCaffe.db.image.DatasetFactory.SetRawImageParameterAt | ( | DateTime | dt, |
| string | strName, | ||
| string | strValue, | ||
| double? | dfVal = null, |
||
| byte[] | rgData = null |
||
| ) |
Set the RawImage parameter for all RawImages with the given time-stamp in the data source.
| dt | Specifies the time-stamp. |
| strName | Specifies the name of the parameter. |
| strValue | Specifies the value of the parameter as a string. |
| dfVal | Specifies the numeric value of the parameter (default = null). |
| rgData | Optionally, specifies the byte data associated with the parameter (default = null). |
Definition at line 345 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.SetSourceParameter | ( | string | strParam, |
| string | strValue, | ||
| int | nSrcId = 0 |
||
| ) |
Set the value of a data source parameter.
| strParam | Specifies the parameter name. |
| strValue | Specifies the value of the parameter. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1476 of file DatasetFactory.cs.
| bool MyCaffe.db.image.DatasetFactory.UpdateActiveLabel | ( | int | nImageID, |
| int | nNewActiveLabel, | ||
| bool | bActivate = true, |
||
| bool | bSaveChanges = true |
||
| ) |
Update the active label on a given raw image.
| nImageID | Specifies the raw image ID. |
| nNewActiveLabel | Specifies the new active label. |
| bActivate | Optionally, specifies whether or not to activate/deactivate the image. |
| bSaveChanges | Optionally, save the changes if any. |
Definition at line 875 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateActiveLabelByID | ( | int | nID, |
| int | nNewActiveLabel | ||
| ) |
Update the active label on a given raw image by its index.
| nID | Specifies the raw image ID. |
| nNewActiveLabel | Specifies the new active label. |
Definition at line 942 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateActiveLabelByIndex | ( | int | nIdx, |
| int | nNewActiveLabel | ||
| ) |
Update the active label on a given raw image by its index.
| nIdx | Specifies the raw image index. |
| nNewActiveLabel | Specifies the new active label. |
Definition at line 952 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateActiveLabelDirect | ( | int | nID, |
| int | nLabel | ||
| ) |
Directly update the active label and activate the image with the specified ID.
| nID | Specifies the image ID. |
| nLabel | Specifies the new active label. |
Definition at line 885 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateAllActiveLabelsDirect | ( | int | nLabel, |
| int? | nOriginalLabel = null |
||
| ) |
Directly update all active labels and activate all of the images for the open Source ID.
| nLabel | Specifies the new active label. |
| nOriginalLabel | Optionally, specifies an original label to replace. |
Definition at line 895 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateDatasetCounts | ( | CancelEvent | evtCancel, |
| Log | log, | ||
| int | nDatasetCreatorID, | ||
| List< string > | rgstrDs, | ||
| string | strParamNameForDescription | ||
| ) |
Updates the dataset counts for a set of datasets.
| evtCancel | Specifies a cancel event used to abort the process. |
| log | Specifies the Log used for status output. |
| nDatasetCreatorID | Specifies the ID of the dataset creator. |
| rgstrDs | Specifies a list of the dataset names to update. |
| strParamNameForDescription | Specifies the parameter name used for descriptions. |
Definition at line 1733 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateDatasetCounts | ( | int | nDsId, |
| ConnectInfo | ci = null |
||
| ) |
Updates the dataset counts, and training/testing source counts.
| nDsId | |
| ci | Optionally, specifies a specific connection to use (default = null). |
Definition at line 1707 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateDatasetDescription | ( | int | nDsId, |
| string | strDesc | ||
| ) |
Update the description of a given dataset.
| nDsId | Specifies the ID of the dataset to update. |
| strDesc | Specifies the new description. |
Definition at line 1697 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateDatasetImageAnnotations | ( | int | nSrcId, |
| int | nImageId, | ||
| AnnotationGroupCollection | annotations, | ||
| bool | bSetLabelOnly | ||
| ) |
Update the annotations on a given RawImage.
| nSrcId | Specifies the ID of the data source. |
| nImageId | Specifies the ID of the RawImage to update. |
| annotations | Specifies the new annotations to update. |
| bSetLabelOnly | Specifies to only set the label. |
Definition at line 1083 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateDatasetRelabel | ( | int | nDsId, |
| bool | bRelabel | ||
| ) |
Update the dataset relabel flag for a dataset.
| nDsId | Specifies the ID of the dataset. |
| bRelabel | Specifies the re-label flag. |
Definition at line 1773 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateLabelBoost | ( | int? | nTgtLbl, |
| bool | bTgtLblExact, | ||
| int? | nTgtBst, | ||
| bool | bTgtBstExact, | ||
| int? | nNewLbl, | ||
| int? | nNewBst, | ||
| params int[] | rgSrcId | ||
| ) |
Update the label and boost for a given search target criteria.
| nTgtLbl | Specifies the target label to replace, or null to ignore. |
| bTgtLblExact | When a target label is specified, this parameter specifies whether to treat the target label as an exact value (true) for a minimum value (false). |
| nTgtBst | Specifies the target boost to replace, or null to ignore. |
| bTgtBstExact | When a target boost is specified, this parameter specifies whether to treat the target boost as an exact value (true) for a minimum value (false). |
| nNewLbl | Specifies the new label, or null to ignore. |
| nNewBst | Specifies the new boost, or null to ignore. |
| rgSrcId | Specifies the SourceID's on which to alter the label and/or boost. |
Definition at line 1286 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateLabelCounts | ( | Dictionary< int, int > | rgCounts | ) |
Updates the label counts in the database for the open data source.
| rgCounts | Specifies a dictionary containing (int nLabel, int nCount) pairs. |
Definition at line 1196 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateLabelCounts | ( | int | nSrcId = 0, |
| int | nProjectId = 0 |
||
| ) |
Update the label counts for a given data source and project (optionally) by querying the database for the actual counts.
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
| nProjectId | Optionally, specifies the ID of a project to use (default = 0). |
Definition at line 1206 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateLabelMapping | ( | int | nNewLabel, |
| List< int > | rgOriginalLabels, | ||
| int | nSrcId = 0 |
||
| ) |
Update a label mapping in the database for a data source.
| nNewLabel | Specifies the new label. |
| rgOriginalLabels | Specifies the original labels that are to be mapped to the new label. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1131 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateLabelName | ( | int | nLabel, |
| string | strName, | ||
| int | nSrcId = 0 |
||
| ) |
Update the name of a label.
| nLabel | Specifies the label. |
| strName | Specifies the new name. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1227 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateRawImageSourceID | ( | int | nImageID, |
| int | nSrcID | ||
| ) |
Change the source ID on an image to another source ID.
| nImageID | Specifies the ID of the image to update. |
| nSrcID | Specifies the new source ID. |
Definition at line 972 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateSource | ( | int | nChannels, |
| int | nWidth, | ||
| int | nHeight, | ||
| bool | bDataIsReal, | ||
| int | nSrcId = 0 |
||
| ) |
Updates a data source.
| nChannels | Specifies the number of channels per item. |
| nWidth | Specifies the width of each item. |
| nHeight | Specifies the height of each item. |
| bDataIsReal | Specifies whether or not the item uses real or byte data. |
| nSrcId | Optionally, specifies the ID of the data source (default = 0, which then uses the open data source ID). |
Definition at line 1455 of file DatasetFactory.cs.
| void MyCaffe.db.image.DatasetFactory.UpdateSourceCounts | ( | ) |
Saves the label cache, updates the label counts from the database and then updates the source counts from the database.
Definition at line 1463 of file DatasetFactory.cs.
|
protected |
Specifies whether or not to load the data criteria data if any exists. When false, the data criteria data is not loaded from file (default = false).
Definition at line 35 of file DatasetFactory.cs.
|
protected |
Specifies whether or not to load the debug data if any exists. When false, the debug data is not loaded from file (default = false).
Definition at line 39 of file DatasetFactory.cs.
|
protected |
Specifies the connection information used on open.
Definition at line 43 of file DatasetFactory.cs.
Specifies the Database managed.
Definition at line 23 of file DatasetFactory.cs.
|
protected |
Specifies the original source ID (if any).
Definition at line 31 of file DatasetFactory.cs.
|
protected |
Specifies the open source descriptor (if any).
Definition at line 27 of file DatasetFactory.cs.
|
get |
Returns the underlying Database object.
Definition at line 98 of file DatasetFactory.cs.
|
get |
Returns the index of the last image added to the database.
Definition at line 106 of file DatasetFactory.cs.
|
get |
Returns whether or not the image data criteria is to be loaded when loading each image.
Definition at line 125 of file DatasetFactory.cs.
|
get |
Returns whether or not the image debug data is to be loaded when loading each image.
Definition at line 133 of file DatasetFactory.cs.
|
get |
Returns the currently open data source.
Definition at line 219 of file DatasetFactory.cs.
|
getset |
Get/set the original source ID (if any). This field is used when copying a source and using the virutal image reference, but retaining the original source ID for the internal image lookup.
Definition at line 1620 of file DatasetFactory.cs.