Inspiration

As pressing issues such as climate change worsen, our global food supply and production becomes increasingly vulnerable to eradication if change does not occur. Despite the volatile climate conditions which wipe out entire populations of certain crops, one source remains unwavering: the mushroom. These edible fungi represent a frontier in sustainability as the entire process of cultivating them, consuming or utilizing them and disposing of them is carbon neutral and in some cases carbon negative. However, there exists a barrier between the average person and their willingness to consume mushrooms as foraging without prior knowledge may lead an individual to consuming inedible mushrooms or just simply not knowing how to incorporate mushrooms in their meals. Currently no comprehensive mushroom identification guides exist, enabling this sustainability solution to remain unutilized.

What it does

The app consists of three categories: AI identification, mushroom encyclopedia, and a recipe book. The first category utilizes AI technology to take a photo of a mushroom that the user either takes on the app’s camera or selects from their camera roll and identifies the type of mushroom it is from a collection of 9 preloaded mushroom options. The second category allows the user to choose from the 9 different mushroom options to pull up an encyclopedia page with important information regarding the type of mushroom identified. The final category is a recipe book consisting of 9 unique recipes that the user can make using mushrooms, 1 for each mushroom type.

How we built it

To ensure compatibility across both iOS and Android devices, we established a shared codebase containing code that runs on both platforms. The majority of the program was programmed on VSCode in Dart with the Flutter framework. The only exception is our A.I. Model which was developed with TFLite and trained outside of Flutter. A Flutter API for Google Fonts was also used for visual appeal. Throughout the hacking period, we conducted regular testing using a physical Android phone This testing primarily focused on evaluating the camera functionality and image library integration within the app.

Challenges we ran into

One of the most surprising challenges we encountered was that the majority of our errors did not arise from syntax or logic issues. Instead, they were primarily caused by conflicting dependency versions required by different components of our application. Specifically, we initially utilized a TFLite library that necessitated a lower version of the Dart SDK (around 2.10) due to its reliance on the original Android embedding method. However, downgrading Dart and replacing the remaining libraries with ones that supported an earlier version proved to be quite problematic. As a result, relatively late in the project, we managed to identify and switch to an entirely different library that was developed after 2022. This alternative library was compatible with our more current version of Dart (around 3.0.0), resolving the compatibility issues we had been facing.

Accomplishments that we're proud of

This is the first artificial intelligence model we ever created and even more so, the first one we ever implemented in a mobile app. Although we had prior experience in getting a mobile app to access the camera, getting it to access the photo library proved to be an entirely different task. Additionally, we individually collected all the images that our model was trained on rather than use a large, already established data set despite the fact it probably would have made our model much more accurate and reliable.

What we learned

  1. Learned the process of creating an artificial intelligence model for image detection.
  2. Understood the steps involved in integrating a TFLite model into a Flutter application.
  3. Explored methods for accessing a user's camera and capturing photographic input to be used by the model.
  4. Discovered techniques for incorporating gesture-based page-turn animations to enhance navigation within the app.

What's next for Mushroomiva

In order to meet the deadline of the hackathon, we trained the AI model using a limited dataset consisting of only 90 images, with 10 images per category. This approach significantly skewed the results, resulting in an approximate 30% chance of any input being labeled as a "lion's mane mushroom" by the model Later on, we plan to make this program more reliable and accurate for aspiring foragers by replacing the current A.I. model with one that is trained on a more formal mushroom image data set such as one from Kaggle with thousands of photographs rather than hand-picking images for our model ourselves.

Built With

Share this project:

Updates