代码之家  ›  专栏  ›  技术社区  ›  sushruthan

TypeError:hog()得到一个意外的关键字参数“Visualize”

  •  -1
  • sushruthan  · 技术社区  · 2 年前

    TypeError:hog()得到一个意外的关键字参数“Visualize”

    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()得到一个意外的关键字参数“Visualize”

    0 回复  |  直到 2 年前
        1
  •  0
  •   yashow hoo    2 年前

    你可以尝试将“可视化”替换为“可视化”。

    推荐文章