Inspiration

We wanted to build a hack which focused on sustainability, and through our deliberations we arrived at the idea of helping farmers choose the most sustainable crops they could grow.

What it does

Our project allows the user to upload a photo of soil. This image is sent through TensorFlow's image classification to yield a type of soil, and this category is inserted into an LLM model powered by Chat GPT's API, which will return the most sustainable crops that can be grown in that soil type.

How we built it

The frontend pages are written with the Flutter framework, the backend Chat GPT API was written in Python's FastAPI framework. TensorFlow was used for the image classification.

Challenges we ran into

The Flutter package to upload images had some deprecated features, which we had to resolve. We also had trouble pushing our code to Github, because we did not realize that Github checks for secret API keys and rejects commits which contain them.

By far the biggest challenge we had which we could not resolve in time was that our machine learning models were having trouble. Our first choice was AutoML, but the training process for that was taking an extremely long time. So we decided to switch to TensorFlow, but the library for importing TensorFlow into Flutter was for some reason not importing all the possible functions.

Accomplishments that we're proud of

We are quite proud of the fact that we were able to handle both camera and file uploads on our App via Flutter. It was interesting to see how the uploads were handled. We were proud that our ChatGPT API integration was working properly and we were happy to see that we could connect the Python backend to Flutter front-end via a FastAPI application service. Although our TensorFlow to Flutter was not particularly working, we were proud to still have utilized it to train a machine learning model.

What we learned

We learned how optimize a flutter front-end to take file uploads and camera uploads. We also managed to transfer a file to the backend to work-with. We learned how to utilize ChatGPT API for our LLM, and we learned how to use FastAPI to build a client to connect our Python backend with our Flutter frontend. We also learned how to use TensorFlow to be able to analyze and categorize images and we used it to categorize different soil types.

What's next for Soil Detection

We plan on efficiently being able to connect the TensorFlow software to the Flutter and we hope to have a seemless application. We hope to utilize the ChatGPT 4 model instead of the 3.5 to derive improved results to users. We also hope to see how we can take into account the climate and appropriate water resources needed for sustainable agriculture and gardening.

Built With

Share this project:

Updates