![]() |
MyCaffe
1.12.2.41
Deep learning software for Windows C# programmers.
|
The BBox class processes the NormalizedBBox data used with SSD. More...
Public Member Functions | |
| BBoxUtility (CudaDnn< T > cuda, Log log) | |
| The constructor. More... | |
| void | Dispose () |
| Clean up all resources. More... | |
| float | ComputeAP (List< Tuple< float, int > > rgTp, int nNumPos, List< Tuple< float, int > > rgFp, ApVersion apVersion, out List< float > rgPrec, out List< float > rgRec) |
| Compute the average precision given true positive and false positive vectors. More... | |
| List< int > | CumSum (List< Tuple< float, int > > rgPairs) |
| Calculate the cumulative sum of a set of pairs. More... | |
| void | ApplyNMSFast (List< NormalizedBBox > rgBBoxes, List< float > rgScores, float fScoreThreshold, float fNmsThreshold, float fEta, int nTopK, out List< int > rgIndices) |
| Do a fast non maximum supression given bboxes and scores. More... | |
| List< int > | ApplyNMS (List< NormalizedBBox > rgBBoxes, List< float > rgScores, float fThreshold, int nTopK) |
| Do non maximum supression given bboxes and scores. More... | |
| List< int > | ApplyNMS (List< NormalizedBBox > rgBBoxes, List< float > rgScores, float fThreshold, int nTopK, bool bReuseOverlaps, out Dictionary< int, Dictionary< int, float > > rgOverlaps) |
| Do non maximum supression given bboxes and scores. More... | |
| Dictionary< int, Dictionary< int, List< NormalizedBBox > > > | GetDetectionResults (float[] rgData, int nNumDet, int nBackgroundLabelId) |
| Get detection results from rgData. More... | |
| List< NormalizedBBox > | GetPrior (float[] rgPriorData, int nNumPriors, out List< List< float > > rgPriorVariances) |
| Get the prior boundary boxes from the rgPriorData. More... | |
| List< List< float > > | ComputeConfLoss (float[] rgConfData, int nNum, int nNumPredsPerClass, int nNumClasses, int nBackgroundLabelId, MultiBoxLossParameter.ConfLossType loss_type) |
| Compute the confidence loss for each prior from rgConfData. More... | |
| List< List< float > > | ComputeConfLoss (float[] rgConfData, int nNum, int nNumPredsPerClass, int nNumClasses, int nBackgroundLabelId, MultiBoxLossParameter.ConfLossType loss_type, List< DictionaryMap< List< int > > > rgAllMatchIndices, DictionaryMap< List< NormalizedBBox > > rgAllGtBoxes) |
| Compute the confidence loss for each prior from rgConfData. More... | |
| List< List< float > > | ComputeConfLoss (float[] rgConfData, int nNum, int nNumPredsPerClass, int nNumClasses, int nBackgroundLabelId, MultiBoxLossParameter.ConfLossType loss_type, List< Dictionary< int, List< int > > > rgAllMatchIndices, Dictionary< int, List< NormalizedBBox > > rgAllGtBoxes) |
| Compute the confidence loss for each prior from rgConfData. More... | |
| List< Dictionary< int, List< float > > > | GetConfidenceScores (float[] rgConfData, int nNum, int nNumPredsPerClass, int nNumClasses) |
| Calculate the confidence predictions from rgConfData. More... | |
| List< LabelBBox > | GetLocPredictions (float[] rgLocData, int nNum, int nNumPredsPerClass, int nNumLocClasses, bool bShareLocation) |
| Create a set of local predictions from the rgLocData. More... | |
| DictionaryMap< List< NormalizedBBox > > | GetGroundTruth (float[] rgGtData, int nNumGt, int nBackgroundLabelId, bool bUseDifficultGt) |
| Create a set of ground truth bounding boxes from the rgGtData. More... | |
| Dictionary< int, LabelBBox > | GetGroundTruthEx (float[] rgGtData, int nNumGt, int nBackgroundLabelId, bool bUseDifficultGt) |
| Create a set of ground truth bounding boxes from the rgGtData. More... | |
| void | Match (List< NormalizedBBox > rgGtBboxes, List< NormalizedBBox > rgPredBboxes, int nLabel, MultiBoxLossParameter.MatchType match_type, float fOverlapThreshold, bool bIgnoreCrossBoundaryBbox, out List< int > rgMatchIndices, out List< float > rgMatchOverlaps) |
| Find matches between a list of two bounding boxes. More... | |
| bool | IsCrossBoundary (NormalizedBBox bbox) |
| Returns whether or not the bbox is overlaps outside the range [0,1] More... | |
| List< LabelBBox > | DecodeAll (List< LabelBBox > rgAllLocPreds, List< NormalizedBBox > rgPriorBboxes, List< List< float > > rgrgfPrioVariances, int nNum, bool bShareLocation, int nNumLocClasses, int nBackgroundLabelId, PriorBoxParameter.CodeType codeType, bool bVarianceEncodedInTarget, bool bClip) |
| Decode all bboxes in a batch. More... | |
| List< NormalizedBBox > | Decode (List< NormalizedBBox > rgPriorBbox, List< List< float > > rgrgfPriorVariance, PriorBoxParameter.CodeType code_type, bool bEncodeVarianceInTarget, bool bClip, List< NormalizedBBox > rgBbox) |
| Decode a set of bounding box. More... | |
| NormalizedBBox | Decode (NormalizedBBox prior_bbox, List< float > rgfPriorVariance, PriorBoxParameter.CodeType code_type, bool bEncodeVarianceInTarget, bool bClip, NormalizedBBox bbox) |
| Decode a bounding box. More... | |
| NormalizedBBox | Encode (NormalizedBBox prior_bbox, List< float > rgfPriorVariance, PriorBoxParameter.CodeType code_type, bool bEncodeVarianceInTarget, NormalizedBBox bbox) |
| Encode a bounding box. More... | |
| bool | MeetEmitConstraint (NormalizedBBox src_bbox, NormalizedBBox bbox, EmitConstraint emit_constraint) |
| Check if a bbox meets the emit constraint w.r.t the src_bbox. More... | |
| float | Coverage (NormalizedBBox bbox1, NormalizedBBox bbox2) |
| Compute the coverage of bbox1 by bbox2. More... | |
| NormalizedBBox | Locate (NormalizedBBox srcBbox, NormalizedBBox bbox) |
| Locate bbox in the coordinate system of the source Bbox. More... | |
| float | JaccardOverlap (NormalizedBBox bbox1, NormalizedBBox bbox2, bool bNormalized=true) |
| Calculates the Jaccard overlap between two bounding boxes. More... | |
| NormalizedBBox | Output (NormalizedBBox bbox, SizeF szImg, ResizeParameter p) |
| Output the predicted bbox on the actual image. More... | |
| bool | Project (NormalizedBBox src, NormalizedBBox bbox, out NormalizedBBox proj_bbox) |
| Project one bbox onto another. More... | |
| void | Extrapolate (ResizeParameter param, int nHeight, int nWidth, NormalizedBBox crop_bbox, NormalizedBBox bbox) |
| Extrapolate the transformed bbox if height_scale and width_scale are explicitly provied, and the FIT_SMALL_SIZE resize mode is specified. More... | |
| NormalizedBBox | Intersect (NormalizedBBox bbox1, NormalizedBBox bbox2) |
| Create the intersection of two bounding boxes. More... | |
| NormalizedBBox | Clip (NormalizedBBox bbox, float fHeight=1.0f, float fWidth=1.0f) |
| Clip the BBox to a set range. More... | |
| NormalizedBBox | Scale (NormalizedBBox bbox, int nHeight, int nWidth) |
| Scale the BBox to a set range. More... | |
| float | Size (NormalizedBBox bbox, bool bNormalized=true) |
| Calculate the size of a BBox. More... | |
| void | FindMatches (List< LabelBBox > rgAllLocPreds, DictionaryMap< List< NormalizedBBox > > rgAllGtBboxes, List< NormalizedBBox > rgPriorBboxes, List< List< float > > rgrgPriorVariances, MultiBoxLossParameter p, out List< DictionaryMap< List< float > > > rgAllMatchOverlaps, out List< DictionaryMap< List< int > > > rgAllMatchIndices) |
| Find matches between prediction bboxes and ground truth bboxes. More... | |
| int | CountNumMatches (List< DictionaryMap< List< int > > > rgAllMatchIndices, int nNum) |
| Counts the number of matches in the list of maps. More... | |
| bool | IsEligibleMining (MultiBoxLossParameter.MiningType miningType, int nMatchIdx, float fMatchOverlap, float fNegOverlap) |
| Returns whether or not mining is eligible given the mining type and match index. More... | |
| int | MineHardExamples (Blob< T > blobConf, List< LabelBBox > rgAllLocPreds, DictionaryMap< List< NormalizedBBox > > rgAllGtBBoxes, List< NormalizedBBox > rgPriorBboxes, List< List< float > > rgrgPriorVariances, List< DictionaryMap< List< float > > > rgAllMatchOverlaps, MultiBoxLossParameter p, List< DictionaryMap< List< int > > > rgAllMatchIndices, List< List< int > > rgAllNegIndices, out int nNumNegs) |
| Mine the hard examples from the batch. More... | |
| void | EncodeLocPrediction (List< LabelBBox > rgAllLocPreds, DictionaryMap< List< NormalizedBBox > > rgAllGtBboxes, List< DictionaryMap< List< int > > > rgAllMatchIndices, List< NormalizedBBox > rgPriorBboxes, List< List< float > > rgrgPriorVariances, MultiBoxLossParameter p, Blob< T > blobLocPred, Blob< T > blobLocGt) |
| Encode the localization prediction and ground truth for each matched prior. More... | |
| void | EncodeConfPrediction (float[] rgfConfData, int nNum, int nNumPriors, MultiBoxLossParameter p, List< DictionaryMap< List< int > > > rgAllMatchIndices, List< List< int > > rgAllNegIndices, DictionaryMap< List< NormalizedBBox > > rgAllGtBBoxes, Blob< T > blobConfPred, Blob< T > blobConfGt) |
| Encode the confidence predictions and ground truth for each matched prior. More... | |
| List< List< float > > | ComputeLocLoss (Blob< T > blobLocPred, Blob< T > blobLocGt, List< DictionaryMap< List< int > > > rgAllMatchIndices, int nNum, int nNumPriors, MultiBoxLossParameter.LocLossType lossType) |
| Compute the localization loss per matched prior. More... | |
The BBox class processes the NormalizedBBox data used with SSD.
Definition at line 21 of file BBoxUtility.cs.
| MyCaffe.common.BBoxUtility< T >.BBoxUtility | ( | CudaDnn< T > | cuda, |
| Log | log | ||
| ) |
The constructor.
| cuda | Specifies the connection to Cuda and cuDNN. |
| log | Specifies the output log. |
Definition at line 33 of file BBoxUtility.cs.
| List< int > MyCaffe.common.BBoxUtility< T >.ApplyNMS | ( | List< NormalizedBBox > | rgBBoxes, |
| List< float > | rgScores, | ||
| float | fThreshold, | ||
| int | nTopK | ||
| ) |
Do non maximum supression given bboxes and scores.
| rgBBoxes | Specifies a set of bounding boxes. |
| rgScores | Specifies a seto of corresponding confidences. |
| fThreshold | Specifies the threshold used in non maximum suppression. |
| nTopK | Specifies the top k picked indices or -1 for all. |
Definition at line 312 of file BBoxUtility.cs.
| List< int > MyCaffe.common.BBoxUtility< T >.ApplyNMS | ( | List< NormalizedBBox > | rgBBoxes, |
| List< float > | rgScores, | ||
| float | fThreshold, | ||
| int | nTopK, | ||
| bool | bReuseOverlaps, | ||
| out Dictionary< int, Dictionary< int, float > > | rgOverlaps | ||
| ) |
Do non maximum supression given bboxes and scores.
| rgBBoxes | Specifies a set of bounding boxes. |
| rgScores | Specifies a seto of corresponding confidences. |
| fThreshold | Specifies the threshold used in non maximum suppression. |
| nTopK | Specifies the top k picked indices or -1 for all. |
| bReuseOverlaps | Specifies whether or not to use and update overlaps (true) or alwasy compute the overlap (false). |
| rgOverlaps | Returns the overlaps between pairs of bboxes if bReuseOverlaps is true. |
Definition at line 328 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.ApplyNMSFast | ( | List< NormalizedBBox > | rgBBoxes, |
| List< float > | rgScores, | ||
| float | fScoreThreshold, | ||
| float | fNmsThreshold, | ||
| float | fEta, | ||
| int | nTopK, | ||
| out List< int > | rgIndices | ||
| ) |
Do a fast non maximum supression given bboxes and scores.
| rgBBoxes | Specifies a set of bounding boxes. |
| rgScores | Specifies a seto of corresponding confidences. |
| fScoreThreshold | Specifies the score threshold used in non maximum suppression. |
| fNmsThreshold | Specifies the nms threshold used in non maximum suppression. |
| fEta | Specifies the eta value. |
| nTopK | Specifies the top k picked indices or -1 for all. |
| rgIndices | Returns the kept indices of bboxes after nms. |
Definition at line 263 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Clip | ( | NormalizedBBox | bbox, |
| float | fHeight = 1.0f, |
||
| float | fWidth = 1.0f |
||
| ) |
Clip the BBox to a set range.
| bbox | Specifies the input bounding box. |
| fHeight | Specifies the clipping height. |
| fWidth | Specifies the clipping width. |
Definition at line 1723 of file BBoxUtility.cs.
| float MyCaffe.common.BBoxUtility< T >.ComputeAP | ( | List< Tuple< float, int > > | rgTp, |
| int | nNumPos, | ||
| List< Tuple< float, int > > | rgFp, | ||
| ApVersion | apVersion, | ||
| out List< float > | rgPrec, | ||
| out List< float > | rgRec | ||
| ) |
Compute the average precision given true positive and false positive vectors.
| rgTp | Specifies a list of scores and true positive. |
| nNumPos | Specifies the number of true positives. |
| rgFp | Specifies a list of scores and false positive. |
| apVersion | Specifies the different ways of computing the Average Precisions. |
Versions: 11point: The 11-point interpolated average precision, used in VOC2007. MaxIntegral: maximally interpolated AP. Used in VOC2012/ILSVRC. Integral: the natrual integral of the precision-recall curve.
| rgPrec | Returns the computed precisions. |
| rgRec | Returns the computed recalls. |
Definition at line 69 of file BBoxUtility.cs.
| List< List< float > > MyCaffe.common.BBoxUtility< T >.ComputeConfLoss | ( | float[] | rgConfData, |
| int | nNum, | ||
| int | nNumPredsPerClass, | ||
| int | nNumClasses, | ||
| int | nBackgroundLabelId, | ||
| MultiBoxLossParameter.ConfLossType | loss_type | ||
| ) |
Compute the confidence loss for each prior from rgConfData.
| rgConfData | Specifies the nNum x nNumPredsPerClass * nNumClasses blob of confidence data. |
| nNum | Specifies the number of images. |
| nNumPredsPerClass | Specifies the number of predictions per class. |
| nNumClasses | Specifies the number of classes. |
| nBackgroundLabelId | Specifies the background label. |
| loss_type | Specifies the loss type used to compute the confidence. |
Definition at line 551 of file BBoxUtility.cs.
| List< List< float > > MyCaffe.common.BBoxUtility< T >.ComputeConfLoss | ( | float[] | rgConfData, |
| int | nNum, | ||
| int | nNumPredsPerClass, | ||
| int | nNumClasses, | ||
| int | nBackgroundLabelId, | ||
| MultiBoxLossParameter.ConfLossType | loss_type, | ||
| List< Dictionary< int, List< int > > > | rgAllMatchIndices, | ||
| Dictionary< int, List< NormalizedBBox > > | rgAllGtBoxes | ||
| ) |
Compute the confidence loss for each prior from rgConfData.
| rgConfData | Specifies the nNum x nNumPredsPerClass * nNumClasses blob of confidence data. |
| nNum | Specifies the number of images. |
| nNumPredsPerClass | Specifies the number of predictions per class. |
| nNumClasses | Specifies the number of classes. |
| nBackgroundLabelId | Specifies the background label. |
| loss_type | Specifies the loss type used to compute the confidence. |
| rgAllMatchIndices | Specifies all match indices storing a mapping between predictions and ground truth. |
| rgAllGtBoxes | Specifies all ground truth bboxes from the batch. |
Definition at line 657 of file BBoxUtility.cs.
| List< List< float > > MyCaffe.common.BBoxUtility< T >.ComputeConfLoss | ( | float[] | rgConfData, |
| int | nNum, | ||
| int | nNumPredsPerClass, | ||
| int | nNumClasses, | ||
| int | nBackgroundLabelId, | ||
| MultiBoxLossParameter.ConfLossType | loss_type, | ||
| List< DictionaryMap< List< int > > > | rgAllMatchIndices, | ||
| DictionaryMap< List< NormalizedBBox > > | rgAllGtBoxes | ||
| ) |
Compute the confidence loss for each prior from rgConfData.
| rgConfData | Specifies the nNum x nNumPredsPerClass * nNumClasses blob of confidence data. |
| nNum | Specifies the number of images. |
| nNumPredsPerClass | Specifies the number of predictions per class. |
| nNumClasses | Specifies the number of classes. |
| nBackgroundLabelId | Specifies the background label. |
| loss_type | Specifies the loss type used to compute the confidence. |
| rgAllMatchIndices | Specifies all match indices storing a mapping between predictions and ground truth. |
| rgAllGtBoxes | Specifies all ground truth bboxes from the batch. |
Definition at line 634 of file BBoxUtility.cs.
| List< List< float > > MyCaffe.common.BBoxUtility< T >.ComputeLocLoss | ( | Blob< T > | blobLocPred, |
| Blob< T > | blobLocGt, | ||
| List< DictionaryMap< List< int > > > | rgAllMatchIndices, | ||
| int | nNum, | ||
| int | nNumPriors, | ||
| MultiBoxLossParameter.LocLossType | lossType | ||
| ) |
Compute the localization loss per matched prior.
| blobLocPred | Specifies the location prediction results. |
| blobLocGt | Specifies the encoded location ground truth. |
| rgAllMatchIndices | Specifies the mapping between predictions and the ground truth. |
| nNum | Specifies the number of images in the batch. |
| nNumPriors | Specifies the total number of priors. |
| lossType | Specifies the type of localization loss, Smooth_L1 or L2. |
Definition at line 2429 of file BBoxUtility.cs.
| int MyCaffe.common.BBoxUtility< T >.CountNumMatches | ( | List< DictionaryMap< List< int > > > | rgAllMatchIndices, |
| int | nNum | ||
| ) |
Counts the number of matches in the list of maps.
| rgAllMatchIndices | Specifies the list of match indices. |
| nNum | Specifies the number of items. |
Definition at line 1902 of file BBoxUtility.cs.
| float MyCaffe.common.BBoxUtility< T >.Coverage | ( | NormalizedBBox | bbox1, |
| NormalizedBBox | bbox2 | ||
| ) |
Compute the coverage of bbox1 by bbox2.
| bbox1 | Specifies the first BBox. |
| bbox2 | Specifies the second BBox. |
Definition at line 1489 of file BBoxUtility.cs.
| List< int > MyCaffe.common.BBoxUtility< T >.CumSum | ( | List< Tuple< float, int > > | rgPairs | ) |
Calculate the cumulative sum of a set of pairs.
| rgPairs |
Definition at line 187 of file BBoxUtility.cs.
| List< NormalizedBBox > MyCaffe.common.BBoxUtility< T >.Decode | ( | List< NormalizedBBox > | rgPriorBbox, |
| List< List< float > > | rgrgfPriorVariance, | ||
| PriorBoxParameter.CodeType | code_type, | ||
| bool | bEncodeVarianceInTarget, | ||
| bool | bClip, | ||
| List< NormalizedBBox > | rgBbox | ||
| ) |
Decode a set of bounding box.
| rgPriorBbox | Specifies an list of prior bounding boxs. |
| rgrgfPriorVariance | Specifies the list of prior variance (must have 4 elements each of which are > 0). |
| code_type | Specifies the code type. |
| bEncodeVarianceInTarget | Specifies whether or not to encode the variance in the target. |
| bClip | Specifies to enable/disable the clipping. |
| rgBbox | Specifies a list of bounding boxs. |
Definition at line 1185 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Decode | ( | NormalizedBBox | prior_bbox, |
| List< float > | rgfPriorVariance, | ||
| PriorBoxParameter.CodeType | code_type, | ||
| bool | bEncodeVarianceInTarget, | ||
| bool | bClip, | ||
| NormalizedBBox | bbox | ||
| ) |
Decode a bounding box.
| prior_bbox | Specifies the prior bounding box. |
| rgfPriorVariance | Specifies the prior variance (must have 4 elements each of which are > 0). |
| code_type | Specifies the code type. |
| bEncodeVarianceInTarget | Specifies whether or not to encode the variance in the target. |
| bClip | Specifies whether or not to enable clip or not. |
| bbox | Specifies the bounding box. |
Definition at line 1215 of file BBoxUtility.cs.
| List< LabelBBox > MyCaffe.common.BBoxUtility< T >.DecodeAll | ( | List< LabelBBox > | rgAllLocPreds, |
| List< NormalizedBBox > | rgPriorBboxes, | ||
| List< List< float > > | rgrgfPrioVariances, | ||
| int | nNum, | ||
| bool | bShareLocation, | ||
| int | nNumLocClasses, | ||
| int | nBackgroundLabelId, | ||
| PriorBoxParameter.CodeType | codeType, | ||
| bool | bVarianceEncodedInTarget, | ||
| bool | bClip | ||
| ) |
Decode all bboxes in a batch.
| rgAllLocPreds | Specifies the batch of local predictions. |
| rgPriorBboxes | Specifies the set of prior bboxes. |
| rgrgfPrioVariances | Specifies the prior variances. |
| nNum | Specifies the number of items in the batch. |
| bShareLocation | Specifies whether or not to share locations. |
| nNumLocClasses | Specifies the number of local classes. |
| nBackgroundLabelId | Specifies the background label. |
| codeType | Specifies the coding type. |
| bVarianceEncodedInTarget | Specifies whether or not the variance is encoded in the target or not. |
| bClip | Specifies whether or not to clip. |
Definition at line 1142 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.Dispose | ( | ) |
Clean up all resources.
Definition at line 43 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Encode | ( | NormalizedBBox | prior_bbox, |
| List< float > | rgfPriorVariance, | ||
| PriorBoxParameter.CodeType | code_type, | ||
| bool | bEncodeVarianceInTarget, | ||
| NormalizedBBox | bbox | ||
| ) |
Encode a bounding box.
| prior_bbox | Specifies the prior bounding box. |
| rgfPriorVariance | Specifies the prior variance (must have 4 elements each of which are > 0). |
| code_type | Specifies the code type. |
| bEncodeVarianceInTarget | Specifies whether or not to encode the variance in the target. |
| bbox | Specifies the bounding box. |
Definition at line 1337 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.EncodeConfPrediction | ( | float[] | rgfConfData, |
| int | nNum, | ||
| int | nNumPriors, | ||
| MultiBoxLossParameter | p, | ||
| List< DictionaryMap< List< int > > > | rgAllMatchIndices, | ||
| List< List< int > > | rgAllNegIndices, | ||
| DictionaryMap< List< NormalizedBBox > > | rgAllGtBBoxes, | ||
| Blob< T > | blobConfPred, | ||
| Blob< T > | blobConfGt | ||
| ) |
Encode the confidence predictions and ground truth for each matched prior.
| rgfConfData | Specifies the num x num_priors * num_classes blob. |
| nNum | Specifies the number of images. |
| nNumPriors | Specifies the number of priors (predictions) per image. |
| p | Specifies the parameters for the MultiBoxLossLayer. |
| rgAllMatchIndices | Specifies the mapping between predictions and the ground truth. |
| rgAllNegIndices | Specifies the indices for negative samples. |
| rgAllGtBBoxes | Specifies the ground truth bboxes for the batch. |
| blobConfPred | Specifies the confidence prediction results. |
| blobConfGt | Specifies the confidence ground truth. |
Definition at line 2297 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.EncodeLocPrediction | ( | List< LabelBBox > | rgAllLocPreds, |
| DictionaryMap< List< NormalizedBBox > > | rgAllGtBboxes, | ||
| List< DictionaryMap< List< int > > > | rgAllMatchIndices, | ||
| List< NormalizedBBox > | rgPriorBboxes, | ||
| List< List< float > > | rgrgPriorVariances, | ||
| MultiBoxLossParameter | p, | ||
| Blob< T > | blobLocPred, | ||
| Blob< T > | blobLocGt | ||
| ) |
Encode the localization prediction and ground truth for each matched prior.
| rgAllLocPreds | Specifies the location prediction, where each item contains the location prediction for an image. |
| rgAllGtBboxes | Specifies the ground truth bboxes for the batch. |
| rgAllMatchIndices | Specifies the mapping between predictions and the ground truth. |
| rgPriorBboxes | Specifies the prior bboxes in the format of NormalizedBBox. |
| rgrgPriorVariances | Specifies the variances needed by the prior bboxes. |
| p | Specifies the parameters for the MultiBoxLossLayer. |
| blobLocPred | Specifies the location prediction results. |
| blobLocGt | Specifies the encoded location ground truth. |
Definition at line 2195 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.Extrapolate | ( | ResizeParameter | param, |
| int | nHeight, | ||
| int | nWidth, | ||
| NormalizedBBox | crop_bbox, | ||
| NormalizedBBox | bbox | ||
| ) |
Extrapolate the transformed bbox if height_scale and width_scale are explicitly provied, and the FIT_SMALL_SIZE resize mode is specified.
| param | Specifies the resize parameter. |
| nHeight | Specifies the height. |
| nWidth | Specifies the width. |
| crop_bbox | Specifies the crop Bbox. |
| bbox | Specifies the Bbox to be updated. |
Definition at line 1668 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.FindMatches | ( | List< LabelBBox > | rgAllLocPreds, |
| DictionaryMap< List< NormalizedBBox > > | rgAllGtBboxes, | ||
| List< NormalizedBBox > | rgPriorBboxes, | ||
| List< List< float > > | rgrgPriorVariances, | ||
| MultiBoxLossParameter | p, | ||
| out List< DictionaryMap< List< float > > > | rgAllMatchOverlaps, | ||
| out List< DictionaryMap< List< int > > > | rgAllMatchIndices | ||
| ) |
Find matches between prediction bboxes and ground truth bboxes.
| rgAllLocPreds | Specifies the location prediction, where each item contains location prediction for an image. |
| rgAllGtBboxes | Specifies the ground truth bboxes for the batch. |
| rgPriorBboxes | Specifies all prior bboxes in the format of NormalizedBBox. |
| rgrgPriorVariances | Specifies all the variances needed by prior bboxes. |
| p | Specifies the parameter for the MultiBoxLossLayer. |
| rgAllMatchOverlaps | Returns the jaccard overlaps between predictions and ground truth. |
| rgAllMatchIndices | Returns the mapping between predictions and ground truth. |
Definition at line 1786 of file BBoxUtility.cs.
| List< Dictionary< int, List< float > > > MyCaffe.common.BBoxUtility< T >.GetConfidenceScores | ( | float[] | rgConfData, |
| int | nNum, | ||
| int | nNumPredsPerClass, | ||
| int | nNumClasses | ||
| ) |
Calculate the confidence predictions from rgConfData.
| rgConfData | Specifies the nNum x nNumPredsPerClass * nNumClasses blob of confidence data. |
| nNum | Specifies the number of images. |
| nNumPredsPerClass | Specifies the number of predictions per class. |
| nNumClasses | Specifies the number of classes. |
Definition at line 760 of file BBoxUtility.cs.
| Dictionary< int, Dictionary< int, List< NormalizedBBox > > > MyCaffe.common.BBoxUtility< T >.GetDetectionResults | ( | float[] | rgData, |
| int | nNumDet, | ||
| int | nBackgroundLabelId | ||
| ) |
Get detection results from rgData.
| rgData | Specifies a 1 x 1 x nNumDet x 7 blob data. |
| nNumDet | Specifies the number of detections. |
| nBackgroundLabelId | Specifies the label for the background class which is used to do a sanity check so that no detection contains it. |
Definition at line 435 of file BBoxUtility.cs.
| DictionaryMap< List< NormalizedBBox > > MyCaffe.common.BBoxUtility< T >.GetGroundTruth | ( | float[] | rgGtData, |
| int | nNumGt, | ||
| int | nBackgroundLabelId, | ||
| bool | bUseDifficultGt | ||
| ) |
Create a set of ground truth bounding boxes from the rgGtData.
| rgGtData | Specifies the 1 x 1 x nNumGt x 7 blob with ground truth initialization data. |
| nNumGt | Specifies the number of ground truths. |
| nBackgroundLabelId | Specifies the background label. |
| bUseDifficultGt | Specifies whether or not to use the difficult ground truth. |
Definition at line 844 of file BBoxUtility.cs.
| Dictionary< int, LabelBBox > MyCaffe.common.BBoxUtility< T >.GetGroundTruthEx | ( | float[] | rgGtData, |
| int | nNumGt, | ||
| int | nBackgroundLabelId, | ||
| bool | bUseDifficultGt | ||
| ) |
Create a set of ground truth bounding boxes from the rgGtData.
| rgGtData | Specifies the 1 x 1 x nNumGt x 7 blob with ground truth initialization data. |
| nNumGt | Specifies the number of ground truths. |
| nBackgroundLabelId | Specifies the background label. |
| bUseDifficultGt | Specifies whether or not to use the difficult ground truth. |
Definition at line 888 of file BBoxUtility.cs.
| List< LabelBBox > MyCaffe.common.BBoxUtility< T >.GetLocPredictions | ( | float[] | rgLocData, |
| int | nNum, | ||
| int | nNumPredsPerClass, | ||
| int | nNumLocClasses, | ||
| bool | bShareLocation | ||
| ) |
Create a set of local predictions from the rgLocData.
| rgLocData | Specifies the nNum x nNumPredsPerClass * nNumLocClasses * 4 blbo with prediction initialization data. |
| nNum | Specifies the number of images. |
| nNumPredsPerClass | Specifies the number of predictions per class. |
| nNumLocClasses | Specifies the number of local classes It is 1 if bShareLocation is true; and it is equal to the number of classes needed to predict otherwise. |
| bShareLocation | Specifies whether or not to share the location. If true, all classes share the same location prediction. |
Definition at line 802 of file BBoxUtility.cs.
| List< NormalizedBBox > MyCaffe.common.BBoxUtility< T >.GetPrior | ( | float[] | rgPriorData, |
| int | nNumPriors, | ||
| out List< List< float > > | rgPriorVariances | ||
| ) |
Get the prior boundary boxes from the rgPriorData.
| rgPriorData | Specifies the prior data as a 1 x 2 x nNumPriors x 4 x 1 blob. |
| nNumPriors | Specifies the number of priors. |
| rgPriorVariances | Specifies the prior variances need by prior bboxes. |
Definition at line 477 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Intersect | ( | NormalizedBBox | bbox1, |
| NormalizedBBox | bbox2 | ||
| ) |
Create the intersection of two bounding boxes.
| bbox1 | Specifies the first bounding box. |
| bbox2 | Specifies the second bounding box. |
Definition at line 1703 of file BBoxUtility.cs.
| bool MyCaffe.common.BBoxUtility< T >.IsCrossBoundary | ( | NormalizedBBox | bbox | ) |
Returns whether or not the bbox is overlaps outside the range [0,1]
| bbox | Specifies the bounding box to test. |
Definition at line 1111 of file BBoxUtility.cs.
| bool MyCaffe.common.BBoxUtility< T >.IsEligibleMining | ( | MultiBoxLossParameter.MiningType | miningType, |
| int | nMatchIdx, | ||
| float | fMatchOverlap, | ||
| float | fNegOverlap | ||
| ) |
Returns whether or not mining is eligible given the mining type and match index.
| miningType | Specifies the mining type. |
| nMatchIdx | Specifies the matching index. |
| fMatchOverlap | Specifies the matching overlap. |
| fNegOverlap | Specifies the negative overlap. |
Definition at line 1933 of file BBoxUtility.cs.
| float MyCaffe.common.BBoxUtility< T >.JaccardOverlap | ( | NormalizedBBox | bbox1, |
| NormalizedBBox | bbox2, | ||
| bool | bNormalized = true |
||
| ) |
Calculates the Jaccard overlap between two bounding boxes.
| bbox1 | Specifies the first bounding box. |
| bbox2 | Specifies the second bounding box. |
| bNormalized | Specifies whether or not the bboxes are normalized or not. |
Definition at line 1527 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Locate | ( | NormalizedBBox | srcBbox, |
| NormalizedBBox | bbox | ||
| ) |
Locate bbox in the coordinate system of the source Bbox.
| srcBbox | Specifies the source Bbox. |
| bbox | Specifies the bbox to locate. |
Definition at line 1509 of file BBoxUtility.cs.
| void MyCaffe.common.BBoxUtility< T >.Match | ( | List< NormalizedBBox > | rgGtBboxes, |
| List< NormalizedBBox > | rgPredBboxes, | ||
| int | nLabel, | ||
| MultiBoxLossParameter.MatchType | match_type, | ||
| float | fOverlapThreshold, | ||
| bool | bIgnoreCrossBoundaryBbox, | ||
| out List< int > | rgMatchIndices, | ||
| out List< float > | rgMatchOverlaps | ||
| ) |
Find matches between a list of two bounding boxes.
| rgGtBboxes | Specifies a list of ground truth bounding boxes. |
| rgPredBboxes | Specifies a list of predicted bounding boxes. |
| nLabel | Specifies the label. |
| match_type | Specifies the matching type. |
| fOverlapThreshold | Specifies the overlap. |
| bIgnoreCrossBoundaryBbox | Specifies whether or not to ignore corss boundary bounding boxes. |
| rgMatchIndices | Specifies the list where the indexes of matches are placed. |
| rgMatchOverlaps | Specifies the list where the overlaps of matches are placed. |
Definition at line 935 of file BBoxUtility.cs.
| bool MyCaffe.common.BBoxUtility< T >.MeetEmitConstraint | ( | NormalizedBBox | src_bbox, |
| NormalizedBBox | bbox, | ||
| EmitConstraint | emit_constraint | ||
| ) |
Check if a bbox meets the emit constraint w.r.t the src_bbox.
| src_bbox | Specifies the source Bbox. |
| bbox | Specifies the Bbox to check. |
| emit_constraint | Specifies the emit constraint. |
Definition at line 1455 of file BBoxUtility.cs.
| int MyCaffe.common.BBoxUtility< T >.MineHardExamples | ( | Blob< T > | blobConf, |
| List< LabelBBox > | rgAllLocPreds, | ||
| DictionaryMap< List< NormalizedBBox > > | rgAllGtBBoxes, | ||
| List< NormalizedBBox > | rgPriorBboxes, | ||
| List< List< float > > | rgrgPriorVariances, | ||
| List< DictionaryMap< List< float > > > | rgAllMatchOverlaps, | ||
| MultiBoxLossParameter | p, | ||
| List< DictionaryMap< List< int > > > | rgAllMatchIndices, | ||
| List< List< int > > | rgAllNegIndices, | ||
| out int | nNumNegs | ||
| ) |
Mine the hard examples from the batch.
| blobConf | Specifies the confidence prediction. |
| rgAllLocPreds | Specifies the location prediction, where each item contains the location prediction for an image. |
| rgAllGtBBoxes | Specifies the ground truth bboxes for the batch. |
| rgPriorBboxes | Specifies the prior bboxes in the format of NormalizedBBox. |
| rgrgPriorVariances | Specifies the variances needed by the prior bboxes. |
| rgAllMatchOverlaps | Specifies the jaccard overlap between predictions and the ground truth. |
| p | Specifies the parameters for the MultiBoxLossLayer. |
| rgAllMatchIndices | Specifies the mapping between predictions and the ground truth. |
| rgAllNegIndices | Specifies the indices for negative samples. |
| nNumNegs | Specifies the numberof negative indices. |
Definition at line 1966 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Output | ( | NormalizedBBox | bbox, |
| SizeF | szImg, | ||
| ResizeParameter | p | ||
| ) |
Output the predicted bbox on the actual image.
| bbox | Specifies the bbox. |
| szImg | Specifies the image size. |
| p | Specifies the resize parameter. |
Definition at line 1557 of file BBoxUtility.cs.
| bool MyCaffe.common.BBoxUtility< T >.Project | ( | NormalizedBBox | src, |
| NormalizedBBox | bbox, | ||
| out NormalizedBBox | proj_bbox | ||
| ) |
Project one bbox onto another.
| src | Specifies the source bbox. |
| bbox | Specifies the second bbox. |
| proj_bbox | Returns the projected bbox here. |
Definition at line 1635 of file BBoxUtility.cs.
| NormalizedBBox MyCaffe.common.BBoxUtility< T >.Scale | ( | NormalizedBBox | bbox, |
| int | nHeight, | ||
| int | nWidth | ||
| ) |
Scale the BBox to a set range.
| bbox | Specifies the input bounding box. |
| nHeight | Specifies the scaling height. |
| nWidth | Specifies the scaling width. |
Definition at line 1741 of file BBoxUtility.cs.
| float MyCaffe.common.BBoxUtility< T >.Size | ( | NormalizedBBox | bbox, |
| bool | bNormalized = true |
||
| ) |
Calculate the size of a BBox.
| bbox | Specifies the input bounding box. |
| bNormalized | Specifies whether or not the bounding box falls within the range [0,1]. |
Definition at line 1759 of file BBoxUtility.cs.