It's clear you have no idea what you are doing. You want to go from getting a code sample showing "how to upload images to database", which you should have easily been able to Google an answer for, to advanced image recognition! You are crazy! Try a decade
of programming some basic stuff before you jump into AI.