类型错误:hog() 获得了意外的关键字参数“可视化”;
typeError:hog()有一个意外的关键字参数'visalise'typeError
TypeError Traceback (most recent call last)
<ipython-input-21-24a971cd17ef> in <module>
36 notcar = mpimg.imread(notcars[10])
37 #plot_row2(car, notcar, 'Car', 'Not Car')
---> 38 car_features = single_img_features(car, color_space=color_space,
39 spatial_size=spatial_size, hist_bins=hist_bins,
40 orient=orient, pix_per_cell=pix_per_cell,
<ipython-input-20-9e1ff462ce4f> in single_img_features(img, color_space, spatial_size, hist_bins, orient, pix_per_cell, cell_per_block, hog_channel, spatial_feat, hist_feat, hog_feat)
108 hog_features = []
109 for channel in range(feature_image.shape[2]):
--> 110 hog_features.extend(get_hog_features(feature_image[:,:,channel],
111 orient, pix_per_cell, cell_per_block,
112 vis=False, feature_vec=True))
<ipython-input-20-9e1ff462ce4f> in get_hog_features(img, orient, pix_per_cell, cell_per_block, vis, feature_vec)
44 # Otherwise call with one output
45 else:
---> 46 features = hog(img, orientations=orient,
47 pixels_per_cell=(pix_per_cell, pix_per_cell),
48 cells_per_block=(cell_per_block, cell_per_block),
TypeError: hog() got an unexpected keyword argument 'visualise'
:hog()获得了意外的关键字参数'visalise''
TypeError: hog() got an unexpected keyword argument'visualise'
TypeError Traceback (most recent call last)
<ipython-input-21-24a971cd17ef> in <module>
36 notcar = mpimg.imread(notcars[10])
37 #plot_row2(car, notcar, 'Car', 'Not Car')
---> 38 car_features = single_img_features(car, color_space=color_space,
39 spatial_size=spatial_size, hist_bins=hist_bins,
40 orient=orient, pix_per_cell=pix_per_cell,
<ipython-input-20-9e1ff462ce4f> in single_img_features(img, color_space, spatial_size, hist_bins, orient, pix_per_cell, cell_per_block, hog_channel, spatial_feat, hist_feat, hog_feat)
108 hog_features = []
109 for channel in range(feature_image.shape[2]):
--> 110 hog_features.extend(get_hog_features(feature_image[:,:,channel],
111 orient, pix_per_cell, cell_per_block,
112 vis=False, feature_vec=True))
<ipython-input-20-9e1ff462ce4f> in get_hog_features(img, orient, pix_per_cell, cell_per_block, vis, feature_vec)
44 # Otherwise call with one output
45 else:
---> 46 features = hog(img, orientations=orient,
47 pixels_per_cell=(pix_per_cell, pix_per_cell),
48 cells_per_block=(cell_per_block, cell_per_block),
TypeError: hog() got an unexpected keyword argument 'visualise'
TypeError: hog() got an unexpected keyword argument'visualise'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将“可视化”替换为“可视化”。
you can try to replace 'visualise' to 'visualize'.