get_annotations_attributes#
- Dataset.get_annotations_attributes() list[str][source]#
Get the name of columns related to annotations attributes. In other words, get columns that are NOT the default ones.
the actual attribute values can then be
self.annotations[self.get_annotations_attributes()]- Returns:
list of column names in
self.annotationsthat represent attributes
See also
Example
>>> from lours.utils.doc_utils import dummy_dataset >>> example = dummy_dataset(2, 2, seed=1) >>> example.annotations["else"] = 10 >>> example.annotations["something"] = True >>> example Dataset object containing 2 images and 2 objects Name : shake_effort_many Images root : care/suggest Images : width height relative_path type split id 0 955 229 determine/story.jpg .jpg train 1 131 840 air/method.bmp .bmp train Annotations : image_id category_str category_id ... box_height else something id ... 0 1 listen 14 ... 184.684056 10 True 1 0 reach 22 ... 174.239136 10 True [2 rows x 10 columns] Label map : {14: 'listen', 15: 'marriage', 22: 'reach'} >>> example.get_annotations_attributes() ['else', 'something']