object-detector
object-detector copied to clipboard
ValueError:X has 22032 features per sample;expecting 38916
I train my own data on windows,python3.6 , 192 pos images(RGB) and 192 neg images(RGB), size=(192,384) [hog] min_wdw_sz: [150, 300] step_size: [8, 8] orientations: 9 pixels_per_cell: [8, 8] cells_per_block: [2, 2] visualize: False transform_sqrt:True [nms] threshold: 0.3 how to fix it?
You may resize the image to keep the length of feature vector consistent before you extract the HOG features. e.g. add a line 'im = cv2.imresize(im, (150, 300))' after #38 and #48 respectively. Also, add 'import cv2' in the beginning.