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