如何通过python脚本访问图像的来源标签
我正在尝试在橙色数据挖掘中练习对抗性攻击,但是在将图像加载到python脚本小部件中遇到了一些困难。我将其设置为“导入图像”小部件连接到Python脚本的位置。 “图像”具有两个可以在“编辑域”,“原点”和“类型”中查看的标签。要实际使用IN_DATA的图像,我需要访问“ Origin”标签。我不知道该怎么做。我是Python的新手,因此将不胜感激。谢谢 :)
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 :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
in_data.domain [“ image”]。属性[“ Origin”]
访问它。您还可以参考文档,但我不确定这是否非常有用。
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.