2using System.Collections.Generic;
18 [TypeConverter(typeof(ExpandableObjectConverter))]
22 uint m_nBackgroundLabelId = 0;
23 float m_fOverlapThreshold = 0.5f;
24 bool m_bEvaluateDifficultGt =
true;
25 string m_strNameSizeFile;
38 [Description(
"Specifies the number of classes that are actually predicted - required!")]
41 get {
return m_nNumClasses; }
42 set { m_nNumClasses = value; }
51 [Description(
"Specifies the background class, needed for sanity check so that the background class is neither in the ground truth nor the detections.")]
54 get {
return m_nBackgroundLabelId; }
55 set { m_nBackgroundLabelId = value; }
61 [Description(
"Specifies the threshold for deciding true/false positive.")]
64 get {
return m_fOverlapThreshold; }
65 set { m_fOverlapThreshold = value; }
71 [Description(
"If true, also consider the difficult ground truth for evaluation.")]
74 get {
return m_bEvaluateDifficultGt; }
75 set { m_bEvaluateDifficultGt = value; }
86 [Description(
"Specifies the file which contains a list of names and sizes in the same order of the input database. If provided, we scale the prediction and ground truth NormalizedBBox for evaluation.")]
89 get {
return m_strNameSizeFile; }
90 set { m_strNameSizeFile = value; }
96 [Description(
"Specifies the resize parameter used in converting the NormalizedBBox to the original size.")]
99 get {
return m_resizeParam; }
100 set { m_resizeParam = value; }
109 public override object Load(
System.IO.BinaryReader br,
bool bNewInstance =
true)
128 m_nNumClasses = p.m_nNumClasses;
129 m_nBackgroundLabelId = p.m_nBackgroundLabelId;
130 m_fOverlapThreshold = p.m_fOverlapThreshold;
131 m_bEvaluateDifficultGt = p.m_bEvaluateDifficultGt;
132 m_strNameSizeFile = p.m_strNameSizeFile;
134 if (p.m_resizeParam ==
null)
135 m_resizeParam =
null;
160 rgChildren.
Add(
new RawProto(
"num_classes", m_nNumClasses.ToString()));
161 rgChildren.
Add(
new RawProto(
"background_label_id", m_nBackgroundLabelId.ToString()));
162 rgChildren.
Add(
new RawProto(
"overlap_threshold", m_fOverlapThreshold.ToString()));
163 rgChildren.
Add(
new RawProto(
"evaluate_difficult_gt", m_bEvaluateDifficultGt.ToString()));
164 rgChildren.
Add(
new RawProto(
"name_size_file", m_strNameSizeFile));
166 if (m_resizeParam !=
null)
167 rgChildren.
Add(m_resizeParam.
ToProto(
"resize_param"));
169 return new RawProto(strName,
"", rgChildren);
182 if ((strVal = rp.
FindValue(
"num_classes")) !=
null)
185 if ((strVal = rp.
FindValue(
"background_label_id")) !=
null)
188 if ((strVal = rp.
FindValue(
"overlap_threshold")) !=
null)
191 if ((strVal = rp.
FindValue(
"evaluate_difficult_gt")) !=
null)
197 if (rpResize !=
null)
The BaseParameter class is the base class for all other parameter classes.
static float ParseFloat(string strVal)
Parse float values using the US culture if the decimal separator = '.', then using the native culture...
The RawProtoCollection class is a list of RawProto objects.
void Add(RawProto p)
Adds a RawProto to the collection.
The RawProto class is used to parse and output Google prototxt file data.
RawProto FindChild(string strName)
Searches for a given node.
static RawProto Parse(string str)
Parses a prototxt and places it in a new RawProto.
string FindValue(string strName)
Searches for a falue of a node within this nodes children.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the DetectionEvaluateLayer.
uint background_label_id
Specifies the background class.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
bool evaulte_difficult_gt
Specifies whether or not to consider the ground truth for evaluation.
static DetectionEvaluateParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
string name_size_file
Specifies the file which contains a list of names and sizes in the same order of the input database....
override object Load(System.IO.BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
DetectionEvaluateParameter()
The constructor.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
uint num_classes
Specifies the number of classes that are actually predicted - required!
float overlap_threshold
Specifies the threshold for deciding true/false positive.
ResizeParameter resize_param
Specifies the resize parameter used in converting the NormalizedBBox to the original size.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
Specifies the parameters for the ResizeParameter for use with SSD.
ResizeParameter Clone()
Return a copy of this object.
static new ResizeParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
override RawProto ToProto(string strName)
Convert this object to a raw proto.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.param.ssd namespace contains all SSD related parameter objects that correspond to the nat...
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...