Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError:X has 22032 features per sample;expecting 38916 #30

Open
Tomingz opened this issue Jun 28, 2019 · 1 comment
Open

ValueError:X has 22032 features per sample;expecting 38916 #30

Tomingz opened this issue Jun 28, 2019 · 1 comment

Comments

@Tomingz
Copy link

Tomingz commented Jun 28, 2019

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?

@HenryJunW
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants