learn to perform tasks without explicitly being programmed to do so - In simple terms - “They are functions that map input to output. But the function body is not defined by us.” - Bunch of different algorithms come under this, we’ve used “Neural Networks”
filter. We have many such filters at each layer Output of the final covolution block We convert covolution output into an array of numbers called embeddings These embeddings are used by fully connected layers to produce final outputs
layer output is a vector representation of our input - If these outputs represent our input in vector space, we can infer that -- “ Outputs generated by images with similar features, should lie close to each other in euclidean space. And those generated by images with different features, should be far apart. ”
model (NasNet architecture) to classify between 37 breeds - Sliced model uptil the embedding layer - Ran model on entire dataset NasNet (Imagenet) . . 512 . .
we follow for a query image: - Calculate embedding vector for query image (let’s call it ‘Q’) - From our pre-calculated embedding vectors, search for those that are at minimum distance from Q (let’s call them set ‘R’) - Retrieve images that correspond to vectors in set ‘R’
Official MLKit - tflite - Wrapper around Android’s tflite - our_monkey_patched_tflite - To extract raw network outputs Available at https://github.com/difference-engine/flutter_tflite
pass our image through the model and calculate the 512d embedding array - We then pass this array to the Java code via MethodChannel, where we calculate and return similar image ids using annoy-java