It’s interesting because when I think of AI, I automatically think of AI within our computers and phones, especially now that Apple Intelligence will be in the new iOS update. The reading discusses AI within vehicles, assisted technology and more. AI is so integrated in everyday lives, that it’s sometimes easy to forget how reliant many of us have become on it. I’m excited/worried to see the future of AI and how far we as society take it.
I took the code from the image classifier single image example and played around with adding different images to see what results the console would get. Most of the images I replaced it with had a high confidence level, such as a pen, a heart shaped container I had, and my water bottle.
I then wanted to add to this code and have it detect different dog breeds, including a photo of my own dog that I assumed it would get incorrectly and have a low confidence level. I wanted to change the code so that if the confidence level was above 0.7, the photo tint would turn green, and if anything else, the tint would turn red.
I added an if then statement to display the tint as wanted.
After, I ran into the issue that 3 different results in the console would appear, so the image would automatically go to red.
I changed the code so that only one result would print in the console.
I am now stuck on why the image is still showing up as red, even though the confidence score is above 0.7. I am not sure if the confidence value is not correctly updating or being reported incorrectly within the gotResult function. There could also be an issue with the placement of the tint function, but I tried moving it around, but it isn’t placed above the image so that it runs before hte image is drawn.