MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
LabelDescriptor.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
8{
12 [Serializable]
13 public class LabelDescriptor
14 {
15 int m_nActiveLabel;
16 int m_nLabel;
17 string m_strName;
18 int m_nImageCount;
19
27 public LabelDescriptor(int nLabel, int nActiveLabel, string strName, int nImageCount)
28 {
29 m_nLabel = nLabel;
30 m_nActiveLabel = nActiveLabel;
31 m_strName = strName;
32 m_nImageCount = nImageCount;
33 }
34
40 : this(l.Label, l.ActiveLabel, l.Name, l.ImageCount)
41 {
42 }
43
47 public int Label
48 {
49 get { return m_nLabel; }
50 }
51
55 public int ActiveLabel
56 {
57 get { return m_nActiveLabel; }
58 }
59
63 public string Name
64 {
65 get { return m_strName; }
66 }
67
71 public int ImageCount
72 {
73 get { return m_nImageCount; }
74 set { m_nActiveLabel = value; }
75 }
76
81 public override string ToString()
82 {
83 return m_nActiveLabel.ToString() + " -> " + m_strName;
84 }
85 }
86}
The LabelDescriptor class describes a single label.
int ImageCount
Specifies the number of images under this label.
int ActiveLabel
Specifies the active label (used during training).
LabelDescriptor(int nLabel, int nActiveLabel, string strName, int nImageCount)
The LabelDescriptor constructor.
int Label
Specifies the original label
string Name
Specifies the label name.
override string ToString()
Creates the string representation of the descriptor.
LabelDescriptor(LabelDescriptor l)
The LabelDescriptor constructor.
The descriptors namespace contains all descriptor used to describe various items stored within the da...