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

flip in face_deploy_mirror_normalize.prototxt doesn't work properly #30

Open
robosina opened this issue Dec 31, 2018 · 0 comments
Open

Comments

@robosina
Copy link

robosina commented Dec 31, 2018

I set an image to AMSoftmax, which net prototxt is (face_deploy_mirror_normalize.prototxt) and weight is (your pretrained weights) . after loading weights I put an image to net input and run forward() method on it. Then I wanted to explore how the flip layer works but after plot the output of flip_data blobs I see something goes wrong, the flip layer has flipped data vertically(I mean up down) !! is it Okay?
result of code:
selection_027

The code is something like below:


net=caffe.Net(
        'face_deploy_mirror_normalize.prototxt',
        'face_train_test_iter_30000.caffemodel',
        caffe.TEST);

def return_layer_name(layer_name,i):
    output=net.blobs[layer_name].data[i]
    output=np.swapaxes(output,0,2)
    return output


img=caffe.io.load_image('Anthony_Hopkins_0002.jpg')
img=caffe.io.resize(img,(96,112))
img=np.expand_dims(img,0)
img=np.swapaxes(img,1,3)
net.blobs['data'].data[...]=img
net.forward()
output=net.blobs['norm1'].data[0]
out1=return_layer_name('data_input_0_split_0',0)
out2=return_layer_name('flip_data',0)
fig = plt.figure(figsize=(15,15))
plt.subplot(1,2,1)
plt.imshow(out1)
plt.subplot(1,2,2)
plt.imshow(out2)

@robosina robosina changed the title flip in face_deploy_mirror_normalize.prototxt doesn't work flip in face_deploy_mirror_normalize.prototxt doesn't work properly Dec 31, 2018
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

1 participant