What would you say if I told you there is a app on the market that tell you if you have a hotdog or not a hotdog.
This app is a clone of Jian Yang's SeeFood app from HBO's Silicon Valley.
The first screen has a live viewfinder and two buttons, one to capture the image from the viewfinder and the other to select an image from the gallery. For the live viewfinder I used the camera plugin.Once an image has been selected the application will be then directed to the second screen where the power of Machine learning will help us label the image. For this, I have used mlkit plugin to utilize the Label Detection offered by Firebase.
The LabelDetector returned a List of VisionLabel objects, whose label property defines what the detected image is of. To find out if the image contained HotDog , I just queried if the list contained a VisionLabel of ‘Hot dog’ and after a bit of tinkering here and there, the app was ready.
To run this app on your phone you can download the apk here.
If you want to build the application yourself you can:
- Create a project in Firebase and add an android app
- Download the googleServices.json
- Paste it inside android/app/ and you're good to go.
You can also read the article here.