Python 类型错误:';模块';对象不可调用
我该如何使用函数Python 类型错误:';模块';对象不可调用,python,python-3.x,object-recognition,Python,Python 3.x,Object Recognition,我该如何使用函数选择性搜索获取此错误 AttributeError:模块“selectivesearch”没有属性“Selectiver\u search”看起来好像您在选择搜索模块中导入了selectivesearch,然后调用它而不是调用函数 错误表示不能像函数那样调用模块简单的输入错误;它应该是regions=selectivesearch.selective\u search(…当我使用函数get这个错误 File "<ipython-input-23-e640c8ab269c&g
选择性搜索
获取此错误
AttributeError:模块“selectivesearch”没有属性“Selectiver\u search”
看起来好像您在选择搜索模块中导入了selectivesearch
,然后调用它而不是调用函数
错误表示不能像函数那样调用模块简单的输入错误;它应该是
regions=selectivesearch.selective\u search(…
当我使用函数get这个错误File "<ipython-input-23-e640c8ab269c>", line 1, in <module>
img_lbl, regions= selectivesearch.selectivesearch(img, scale=500, sigma=0.9, min_size=10)
TypeError: 'module' object is not callable
import skimage.data
import selectivesearch
import matplotlib.pyplot as plt
img = skimage.data.astronaut()
img_lbl, regions= selectivesearch.selectivesearch(img, scale=500, sigma=0.9, min_size=10)
regions[:10]
[{'labels': [0.0], 'rect': (0, 0, 15, 24), 'size': 260},
{'labels': [1.0], 'rect': (13, 0, 1, 12), 'size': 23}]