Kadenze / siamese_net

This package shows how to train a siamese network using Lasagne and Theano and includes network definitions for state-of-the-art networks including: DeepID, DeepID2, Chopra et. al, and Hani et. al. We also include one pre-trained model using a custom convolutional network.
Other
128 stars 37 forks source link

The current example problem #3

Closed nassarofficial closed 7 years ago

nassarofficial commented 8 years ago

I tried running the current example using "model.pkl", but the results are always "same person". Also I tried training my own model, and same result.

ghinrichs commented 8 years ago

Hi All, any news about issue related to "same person". I have the same "error".

nassarofficial commented 8 years ago

@ghinrichs I tried contacting the author by email, and no response unfortunately. I thought it was me only. Did you try training your own dataset or model, it also gives me the same result.

ghinrichs commented 8 years ago

@nassarofficial , I tried only the pre trained. I have some concern about n_files_per_person = 2, I not sure is correct.

pkmital commented 8 years ago

Hi all, I haven't looked at this in awhile I'm afraid. I am not sure I'll have a chance to check it myself.

Have you tried to assess more than a single image pair, or a test set? When you tried to train your own model, can you copy the train/valid performance here and what model you used?

Thanks!

nassarofficial commented 8 years ago

@pkmital yes, I've tried with the LFW dataset, all of them give the same result. Also, training my own dataset, and lfw with Hani, it gives the same result too.

ghinrichs commented 8 years ago

@pkmital, I tried the pre trained (model.pkl) and my own loaded by images (in attached) ds-lfw_files-2_crop_style-none_flips-False_warps-False_crop_factor-0.5_resolution-50x50_grayscale-False.zip

ghinrichs commented 8 years ago

@pkmital, one question, the model.pkl was created from lfw? I saw that in original lfw some times have only one image to Person, this could impact?

pkmital commented 8 years ago

There is a dataset creation which takes parameters for pruning images without enough images per person. It also augments the dataset by warping the image. So it shouldn't be a problem, but also, setting min number of images per person to a higher number gives the training a lot more examples of positive pairs. The issue with that is that it also increases the required memory very easily. So higher minimum number of files per person should give better accuracy, but requires much more memory.

ghinrichs commented 8 years ago

@pkmital , do you have any suggestion or direction to understand why "same person" occur in all execution? May be a scenario...

pkmital commented 8 years ago

Have you tried training a model with more files per person? That should help.

nassarofficial commented 8 years ago

@pkmital I tried actually with triple the number of the lfw dataset, and still the same. There is something wrong that has nothing to do with the dataset at all.

pkmital commented 8 years ago

Can you post your training loss and validation loss during training? Also 3 images is still very small. I believe I had use between 5-10.

ghinrichs commented 8 years ago

@pkmital, In my scenario I used the original model.pkl and used 2 person from fwl (with 5 images each one). lfw.zip

ds-lfw_files-5_crop_style-none_flips-False_warps-False_crop_factor-0.5_resolution-50x50_grayscale-False.zip

nassarofficial commented 8 years ago

@pkmital Oh I misunderstood you, I only trained 50,000 pairs with my dataset, and same problem. Also, the same issue with LFW.

gautam20197 commented 7 years ago

I am having the same problem with the LFW dataset and is the visualization same as shown in the image ? For me the spread is very thin and it seems like the number of images is small too.

nassarofficial commented 7 years ago

@gautam20197 dont waste your time, its not working properly, its predictions are all wrong, even with the attached model.

gautam20197 commented 7 years ago

@nassarofficial Thank you. Is there another profile where i can find a similar model ?

vishal00100 commented 7 years ago

Was anyone able to get it to work?

pkmital commented 7 years ago

Try the advice above: training with more image pairs, more images, and augmenting the dataset if you are seeing low accuracy. Also experiment between hani/chopra/custom models. If you still have issues, post the parameters you've used to a new issue.

nassarofficial commented 7 years ago

@pkmital its not working. Even the attached model is not working, dont waste your time on it people.

ghinrichs commented 7 years ago

Agree!

Att Gabriel cel 51993827272

Em 6 de jul de 2017, às 19:36, Ahmed Nassar notifications@github.com<mailto:notifications@github.com> escreveu:

@pkmitalhttps://github.com/pkmital its not working. Even the attached model is not working, dont waste your time on it people.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Kadenze/siamese_net/issues/3#issuecomment-313537949, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALoy9cdH0WZtPlgTtn58pn1PoBQRWI-kks5sLWFmgaJpZM4Kz2iE.

pkmital commented 7 years ago

If you have a specific problem it would help if you describe it. Otherwise "it's not working" isn't really helpful. I've just run the model and am getting 70% validation accuracy on the default settings.