Skip to content

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

Open

Description

@robosina

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)

Activity

  1. changed the title [-]flip in face_deploy_mirror_normalize.prototxt doesn't work[/-] [+]flip in face_deploy_mirror_normalize.prototxt doesn't work properly[/+] on Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions