I don't know if anyone's interested, but I took a combination of the Sketch example, along with some other examples I've seen online, and come up with the following.
It's a simple Neural Network class, prepare data, train it and it can hopefully guess what you draw to test it with.
- Draw three positive image, all the same. I.e. Draw three smiley faces.
- Then draw three negative images, all the same. I.e. Draw three sad faces.
- Then press the Train button.
- OK so now it's ready. Draw either a copy of the positive or negative image, and see if it gets it right 😀
I don't claim this is the best code ever, or even efficient algorithm and could be tuned much better, but thought I'd share it anyway 😀
@jmv38 and @mkeywood : can the script recognize also the same picture drew in different positions inside the three squares? I tried it but maybe I'm wrong with something because it doesn't work, I mean if I draw the same picture in different positions, I can't obtain the good choice of the picture inside the guess square.
@st84 hi. I dont see which omz post you are referring to. Can you put a link? thanks
@Matteo my version ofthe script tries to recognize 3 different objects. So draw the same object in 2 boxes will not work: the software assumes they are different.
The initial version of mkeywood is different.
- how much memory is used? where is the model stored?
- what is the NN structure?
- is it fully local?
@jmv38 the models are downloaded from https://docs-assets.developer.apple.com/coreml/models/MobileNet.mlmodel and copied in a local file, then next time, it is entirely local.
Big file of 170 MB