2using System.Collections.Generic;
19 [TypeConverter(typeof(ExpandableObjectConverter))]
22 string m_strOutputDirectory;
23 string m_strOutputNamePrefix;
25 string m_strLabelMapFile;
26 string m_strNameSizeFile;
27 uint? m_nNumTestImage =
null;
60 [Description(
"Specifies output directory, if not empty, the results will be saved.")]
63 get {
return m_strOutputDirectory; }
64 set { m_strOutputDirectory = value; }
70 [Description(
"Specifies output name prefix.")]
73 get {
return m_strOutputNamePrefix; }
74 set { m_strOutputNamePrefix = value; }
80 [Description(
"Specifies output name prefix.")]
83 get {
return m_outputFormat; }
84 set { m_outputFormat = value; }
90 [Description(
"Optionally, specifies output label map file.")]
93 get {
return m_strLabelMapFile; }
94 set { m_strLabelMapFile = value; }
106 [Description(
"Optionally, specifies output name size file.")]
109 get {
return m_strNameSizeFile; }
110 set { m_strNameSizeFile = value; }
118 [Description(
"Specifies the number of test images, which can be less than the name_size_file line count.")]
121 get {
return m_nNumTestImage; }
122 set { m_nNumTestImage = value; }
128 [Description(
"Specifies the resize parameter used in saving the data.")]
131 get {
return m_resizeParam; }
132 set { m_resizeParam = value; }
164 m_strOutputDirectory = p.m_strOutputDirectory;
165 m_strOutputNamePrefix = p.m_strOutputNamePrefix;
166 m_outputFormat = p.m_outputFormat;
167 m_strLabelMapFile = p.m_strLabelMapFile;
168 m_strNameSizeFile = p.m_strNameSizeFile;
169 m_nNumTestImage = p.m_nNumTestImage;
171 m_resizeParam =
null;
195 RawProto rpBase = base.ToProto(
"option");
198 rgChildren.
Add(rpBase);
199 rgChildren.
Add(
new RawProto(
"output_directory", m_strOutputDirectory));
200 rgChildren.
Add(
new RawProto(
"output_name_prefix", m_strOutputNamePrefix));
201 rgChildren.
Add(
new RawProto(
"output_format", m_outputFormat.ToString()));
202 rgChildren.
Add(
new RawProto(
"label_map_file", m_strLabelMapFile));
203 rgChildren.
Add(
new RawProto(
"name_size_file", m_strNameSizeFile));
205 if (m_nNumTestImage.HasValue)
206 rgChildren.
Add(
new RawProto(
"num_test_image", m_nNumTestImage.Value.ToString()));
211 return new RawProto(strName,
"", rgChildren);
225 if (rpOption !=
null)
228 if ((strVal = rp.
FindValue(
"output_directory")) !=
null)
231 if ((strVal = rp.
FindValue(
"output_name_prefix")) !=
null)
234 if ((strVal = rp.
FindValue(
"output_format")) !=
null)
241 throw new Exception(
"Unknown output_format '" + strVal +
"'!");
244 if ((strVal = rp.
FindValue(
"label_map_file")) !=
null)
247 if ((strVal = rp.
FindValue(
"name_size_file")) !=
null)
250 if ((strVal = rp.
FindValue(
"num_test_image")) !=
null)
254 if (rpResize !=
null)
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 OptionalParameter is the base class for parameters that are optional such as the MaskParameter,...
static OptionalParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
OptionalParameter(bool bActive=false)
The constructor.
bool Active
When active, the parameter is used, otherwise it is ignored.
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.
Specifies the parameters for the SaveOutputLayer.
OUTPUT_FORMAT output_format
Specifies the output format.
SaveOutputParameter Load(BinaryReader br, bool bNewInstance=true)
Load the and return a new ResizeParameter.
string output_directory
Specifies the output directory - if not empty, the results will be saved.
string name_size_file
Optionally, specifies the output name size file.
ResizeParameter resize_param
Specifies the resize parameter used in saving the data.
static new SaveOutputParameter FromProto(RawProto rp)
Parses the parameter from a RawProto.
string label_map_file
Optionally, specifies the output label map file.
OUTPUT_FORMAT
Defines the output format.
string output_name_prefix
Specifies the output name prefix.
SaveOutputParameter Clone()
Return a copy of this object.
override void Copy(OptionalParameter src)
Copy the source object.
SaveOutputParameter(bool bActive)
The constructor.
override RawProto ToProto(string strName)
Convert this object to a raw proto.
uint? num_test_image
Specifies the number of test images.
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-...