2using System.Collections.Generic;
7using System.Threading.Tasks;
29 [TypeConverter(typeof(ExpandableObjectConverter))]
33 List<BatchSampler> m_rgBatchSampler =
new List<BatchSampler>();
34 string m_strLabelFile;
47 [Description(
"Get/set the annotation type.")]
50 get {
return m_type; }
51 set { m_type = value; }
57 [Description(
"Get/set the batch sampler.")]
60 get {
return m_rgBatchSampler; }
61 set { m_rgBatchSampler = value; }
67 [Description(
"Get/set the label map file.")]
70 get {
return m_strLabelFile; }
71 set { m_strLabelFile = value; }
80 public override object Load(BinaryReader br,
bool bNewInstance =
true)
101 m_strLabelFile = p.m_strLabelFile;
103 m_rgBatchSampler =
new List<BatchSampler>();
106 m_rgBatchSampler.Add(bs.
Clone());
131 rgChildren.
Add(
new RawProto(
"anno_type", ((
int)m_type).ToString()));
132 rgChildren.
Add(
new RawProto(
"label_map_file", m_strLabelFile));
136 rgChildren.Add(bs.
ToProto(
"batch_sampler"));
139 return new RawProto(strName,
"", rgChildren);
152 if ((strVal = rp.
FindValue(
"anno_type")) !=
null)
155 if ((strVal = rp.
FindValue(
"label_map_file")) !=
null)
156 p.m_strLabelFile = strVal;
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.
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.
RawProtoCollection FindChildren(params string[] rgstrName)
Searches for all children with a given name in this node's children.
The SimpleDatum class holds a data input within host memory.
ANNOTATION_TYPE
Specifies the annotation type when using annotations.
The LayerParameterBase is the base class for all other layer specific parameters.
Specifies the parameters for the InputLayer.
AnnotatedDataParameter()
The constructor.
SimpleDatum.ANNOTATION_TYPE anno_type
Get/set the annotation type.
List< BatchSampler > batch_sampler
Get/set the batch sampler.
override RawProto ToProto(string strName)
Convert the parameter into a RawProto.
override object Load(BinaryReader br, bool bNewInstance=true)
Load the parameter from a binary reader.
override void Copy(LayerParameterBase src)
Copy on parameter to another.
override LayerParameterBase Clone()
Creates a new copy of this instance of the parameter.
string label_map_file
Get/set the label map file.
static AnnotatedDataParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
Specifies a sample of batch of bboxes with provided constraints in SSD.
static BatchSampler FromProto(RawProto rp)
Parse a new BatchSampler from a RawProto.
override RawProto ToProto(string strName)
Converts the BatchSampler to a RawProto.
BatchSampler Clone()
Creates a copy of the BatchSampler.
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-...