How to access the origin label of an image through python script

231 views Asked by At

I am trying to practice adversarial attacks in orange data mining, but am having some trouble loading the image in a python script widget. I have it set up where the import images widget is connected to the python script. 'image' has two labels that can be viewed in 'edit domain', 'origin' and 'type'. To actually use the image from in_data, I need to have access to the 'origin' label. I have no idea how to do this. I am new to python so specific code would be greatly appreciated. thank you :)

1

There are 1 answers

0
vijolica On

You can access it with in_data.domain["image"].attributes["origin"].

You can also refer to the documentation, but I am not sure this is very informative.