-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Correctly invert the swapping of colour channels in Python API 'deprocess' #443
Conversation
In the 'deprocess' method, get back the image with the original channel order by inverting the original transform, rather than reversing the tuple which is incorrect.
Correctly invert the swapping of colour channels in Python API 'deprocess'
Thanks for the fix! |
@@ -284,7 +284,8 @@ def _Net_deprocess(self, input_name, input_): | |||
decaf_in += mean | |||
decaf_in = decaf_in.transpose((1,2,0)) | |||
if channel_order: | |||
decaf_in = decaf_in[:, :, channel_order[::-1]] | |||
channel_order_inverse = tuple([channel_order.index(i) for i in (0,1,2)]) |
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.
for i in range(decaf_in.shape[2])
to support any number of channels.
fix OSX 10.9 compiler/stdlib override for latest homebrew follow-up on #443 to invert k channels (instead of 3) Correctly invert the swapping of colour channels link presentation on dropbox (was self-hosted during a dropbox issue) link to demo fix draw_net python script release v1 model defs + weights point out @niuzhiheng's work on the Windows port fix test_all path in docs link canonical bvlc site fix detection notebook link
Correctly invert the swapping of colour channels in Python API 'deprocess'
fix OSX 10.9 compiler/stdlib override for latest homebrew follow-up on BVLC#443 to invert k channels (instead of 3) Correctly invert the swapping of colour channels link presentation on dropbox (was self-hosted during a dropbox issue) link to demo fix draw_net python script release v1 model defs + weights point out @niuzhiheng's work on the Windows port fix test_all path in docs link canonical bvlc site fix detection notebook link
In the 'deprocess' method, get back the image with the original channel order
by inverting the original transform, rather than reversing the tuple which is
incorrect.