Improve Accuracy Siamese Network

Hello. I am new in AI programming, so sorry if am I asking something dumb.
Ok, I am having problems with face recognition siamese network with triplet loss training. My accuracy is so instable and does not go up to 65%. I am using a model projected by myimagesearch website and lfw as dataset. I dunno what is wrong here and wanted help. I can’t post the code right now, so can you help me with some tips to improve accuracy?

Hi @KozmoF

No worries, your question isn’t dumb at all!

Try normalizing your input images, and use data augmentation to increase variability. Lastly, make sure your network architecture has adequate capacity but isn’t too complex to prevent overfitting. Fine-tuning a pre-trained model may also help boost your results quickly.

Hope it helps!

Hi @KozmoF

if you are new to ai programming, can I know if you have first done the tensorflow developer professional course before doing this advanced tf course specialisation?

Also just a heads-up you are not suppose to post any codes from the grade cell.

While you select the category, choose which week assignment you are working in the tag selection option.

The best step to check or improve accuracy with what other mentor already mentioned is also go from building a simpler model to complex model. try changing model compile parameters if your accuracy is not achieved based on the data you are working.

Thank you for answer. My network is like this:

posting codes correct or incorrect is against community guidelines

I rlly do not know about code details, so I dont know also what is the problem

Hi @Deepti_Prasad. Thanks for answer. I did not done any course from here, would I do? I really don’t know. Sorry.
About the code, I was writing a code for university, so I didn’t have so much time to progride from simple networks, you know?

if you are new to python programming, I would advise first to do the basic tensorflow specialisation first i.e. tensorflow developer professional certificate specialisation

and before doing this, to create a model you use different type of layer like cnn, rnn and dropout layer, batch normalisation significance of which is explained in Deep Learning specialisation.

So ideally it is best to do first DLS, then tensorflow developer professional and then jump to these advanced specialisation.

if you had done this way, you would have know how to address your issue with model accuracy on better understanding level as these are convered in DLS.

Also as I stated you are not suppose to post codes and yet you have responded with codes which is against community guidelines.

Regards
DP

Hi @KozmoF,

As @Deepti_Prasad suggested, it would be good to strengthen your Python programming skills before diving deeper into this course, as it will make your learning experience easier. Also, please remember that while you can’t share your code publicly here, you’re welcome to share it privately with mentors if they request it. Once you feel ready, I’d be happy to help!

Hope this helps!

1 Like

oh, ok. thank you. I tought that it would not be necessary, but it is is forbidden. So, sorry for misunderstanding. I’m afraid that I don’t have any more time to view your courses right now, but i will definitely.

1 Like

we mentors can provide you solution for your query but to understand why and how a model accuracy is affected with layer selection and model compile parameters. When you have time, do learn AI the proper step wise for your benefit.

Your unit layer selection seems to be too high, for the starting 3 layers use lesser units and another important point your last dense unit layer is usually the output unit layer, hence it needs to match with number of feature you have in your data or classes.

Although I felt your codes are not totally matching instructions given in the assignment.

Best Regards
DP

So, when I picked up this one, I wanted to learn a bit about how project models like this. So I dont know exactly why each one of this layers were chosen. Do you recommend I restart the implementation after learn about these details, then? Also, I really searched many information sources to study about this, and found this website just now :(. That is why I’m at this point rn.

Yes @KozmoF If you had done Deep Learning specialisation and tensorflow Developer professional certificate specialisation, you would have understood my previous comment about the unit significance. So we mentioning you to reduce this or use this would only be like arranging a puzzle you have no idea. So kindly go through a systematic learning journey, to benefit yourself in growing and smarter way.

I am not saying once you do these course, you will not face such issue(accuracy being not enough), but you will understand why you faced this issue and also the responses mentors would give you to address your issue.

Project models related to what you wanted to learn. Models can be AI related and also statistical related. That’s why I said go stepwise, believe me you will not regret!

Regards
DP

1 Like