-
Notifications
You must be signed in to change notification settings - Fork 72
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
update hog #59
update hog #59
Conversation
25861bc
to
2acf109
Compare
@patricksnape Hey, could you check if this pr could be merged? |
Can we fix the RGB before merging? |
I guess this is because ignoring memory order is incorrect |
I create a simple demo in C++ using the C library to calculate HOG features, see https://github.com/hubutui/vlfeat-hog-example. The extracted feature is saved to a txt file one value per line with no reshape operation. So we could load it later on with |
28aac29
to
3db3dd0
Compare
""" | ||
# vlfeat requires image in channel-first style | ||
if image.ndim == 3: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other thing I would request is a flag to be able to control this behaviour - in case the user wants to pass something where the channels are already first. Maybe something like channels_first=False
?
This is amazing work! The mat files are really really good tests and you approached this really methodically which makes it really easy for me to review. I had one annoying nitpick comment and then we are good to go and I can make a release. Thanks a lot for this work! |
1. remove unneeded function declaration 2. specify memoryview order 3. image is row-major by default 4. add `visualize` optional flag, return a HOG image if True 5. update document 6. update hog test, use face image from scipy 7. add `channel_first` optional flag, specify if the input array is in channel-first format
@patricksnape OK, I have update again. I think we could merge it now. I'd like to update |
Thanks for your hard work - this was an excellent PR! |
visualize
optional flag, return a HOG image if Truechannel_first
optional flag, specify if the input array is inchannel-first format