Hello
I am doing an image recognition project, I used the Teachable Machine Extension to identify if the user has touched grass. I noticed the classification result is always 100, whether the user has/has not touched grass. I want the similar value, how can I get this? (My model only has 1 class, the grass pictures)
Thanks, my project is due tomorrow now i need to be fast =(
By the way the code looks like this
The result string's length is 19 characters if it is 100%
If the result string's length is 18 characters, I need to see the 16th place to see if it is over 90%
For other lengths, it will not do anything
Hellllllllllllpppppppppppppppppp
Some things that are probably not correct.
Blue : result can never be 18 and 9 characters at the same time: this Block will never execute.

I dont understand . You use the right sided and block incorrectly to check the 16th place incorrectly I guess.
instead of your else statement possibly you should test if the length is <18 at the green arrow perhaps?
You have to test this. Good luck.
The result looks like this
{"Touch Grass":100}
Also, isnt segment used to check the nth places in texts? I suppose it could check the 16th character.
If the length is bigger than 18 I suppose its an error message???
The problem is, I cannot filter the int out of the str so this is what I did
That's JSON format, saying the value of "Touch Grass" is 100.
You can decode JSON using the Web component DecodeJSONAsDictionary block.
But worse than that, your model can't be right if it only has one class.
If all you have is a hammer, everything looks like a nail.
Try training your model to also recognize
- concrete
- water
- sky
- bare dirt
This would give you a total of 5 attributes in your JSON result, which you can search through for the highest value.
Thanks, I'll update the model