dsdl.geometry.label
Label
Bases: BaseGeometry
, FontMixin
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
category_name
property
Returns:
Type | Description |
---|---|
The name of the current label object. |
class_domain
property
Returns:
Type | Description |
---|---|
dsdl.geometry.ClassDomain
|
The class domain object which the current label object belongs to. |
domain_name
property
Returns:
Type | Description |
---|---|
The name of the class domain which the current label object belongs to. |
name
property
Returns:
Type | Description |
---|---|
The name of the current label object. |
openmmlabformat
property
Returns:
Type | Description |
---|---|
The name of the current label object. |
parent_names
property
Returns:
Type | Description |
---|---|
The names of the current label's supercategories. |
parents
property
Returns:
Type | Description |
---|---|
The collection of the current label's super category objects. |
registry_name
property
Returns:
Type | Description |
---|---|
The registry name of the current label object which is unique in the |
supercategories
property
Returns:
Type | Description |
---|---|
The collection of the current label's super category objects. |
supercategories_names
property
Returns:
Type | Description |
---|---|
The names of the current label's supercategories. |
__eq__(other)
Compare whether the current label object is equal to the other.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
other |
Another Label object to be compared with the current one. |
required |
Returns:
Type | Description |
---|---|
Whether the current label object is equal to the other. |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
__init__(name, supercategories=(), domain_name=None)
A Geometry class which abstracts a label object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
The name of the current label object. |
required | |
supercategories |
The collection of the current label's super category objects. |
()
|
|
domain_name |
The name of the class domain which the current label object belongs to. |
None
|
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
index_in_domain()
Returns:
Type | Description |
---|---|
The index of the current label object in the class domain which it belongs to. |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
set_domain(domain_name)
Set the _domain_name
of the current label object.
visualize(image, palette, **kwargs)
Draw the current label object on an given image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
The image where the label to be drawn. |
required | |
palette |
The palette which stores the color of different category name. |
required | |
**kwargs |
Other annotations which may be used when drawing the current label object, such as |
{}
|
Returns:
Type | Description |
---|---|
The image where the current label object has been drawn on. |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
LabelList
Bases: BaseGeometry
, FontMixin
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
|
category_names
property
Returns:
Type | Description |
---|---|
All the names of the label object in the current |
class_domains
property
Returns:
Type | Description |
---|---|
List[dsdl.geometry.ClassDomain]
|
The class domain objects of all the |
label_list
property
Returns:
Type | Description |
---|---|
All the |
names
property
Returns:
Type | Description |
---|---|
All the names of the label object in the current |
__init__(label_list)
A Geometry class which abstracts a list of label objects.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
label_list |
A collection of |
required |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/label.py
visualize(image, palette, **kwargs)
Draw the current LabelList
object on an given image.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
image |
The image where the labels to be drawn. |
required | |
palette |
The palette which stores the color of different category name. |
required | |
**kwargs |
Other annotations which may be used when drawing the current |
{}
|
Returns:
Type | Description |
---|---|
The image where the current |