RockID
Rockid is a mobile application built using Flutter for both iOS and Android devices that allows users to identify and classify different types of rocks. Whether you're a geology enthusiast or just curious about the rocks you find, this app will help people identify rough stones as well as gemstones that have been treated and cut based on their appearance, texture, and other characteristics.
Features
- Login creditionals: Firebase Authorization is used to register the user via email, and then they can log in to the app and navigate to the home page.
- Rocks found: Every time a user finds a rock and chooses to display it, it is stored in Firestore. This page displays the time, date, and location for each rock found.
- Rock information: This page allows the user to search for every rock in the application, and when they click on a specific rock, it displays general information about that rock.
- Recently found rocks: All the rocks found in the application will be shown on the recently found rocks page in chronological order as users scroll down.
- Rock Classification: The user is presented with an option to save their location. They can then choose to upload an image or take a photo using their phone's camera. The application will then attempt to identify that rock.
- User profile: Every user has a profile where they can edit their name, occupation, bio, profile picture, and phone number. They also have the option to choose if they want to keep some of these attributes private, so they will not be shown to other users.
Installation
-
Install the Flutter SDK and emulator using the instuctions in the following link
-
Clone this repository to your local machine:
git clone https://github.com/hishaam19/RockID.git
-
Change your working directory to the project folder:
cd rockID
-
Get the required dependencies by running:
flutter pub get
-
Run the app using:
flutter run
Google sign in
-
Use the following commands to get the SHA-1 and SHA-256 fingerprints.
-
Windows:
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
- Mac/Linux:
keytool -list -v \
-alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
-
Go to firebase.com and login into the RockID account and under autherization go to sign-in method and go to project settings and add both the SHA-1 and SH-256 fingerprints.
Technologies Used
-
Flutter: A popular open-source UI software development toolkit by Google for building natively compiled applications for mobile, web, and desktop from a single codebase.
-
TensorFlow Lite: An open-source deep learning framework for on-device inference used mostly for mobile applications.
-
Firebase: Google's mobile platform that helps with authentication, database management, and cloud storage.
Classification Models
-
Purpose: The rock ID app uses three classification models: one for rough stones, another for polished stones, and a model for determining whether a stone is rough or polished, which picks which of these models will be used to classify the rock image taken by the user.
-
How to use: To replace the current training models in the application, you just have to put the new tflite files in the assets folder of the Rockid Flutter application. Additionally, add a labels.txt file that contains the index followed by the name of the class on each line for every class in that model. Afterward, replace the models and labels file paths in the camera page with the new files.
-
Datasets: here are some link to some datasets that can be trained and used for this application:
Contributing
To contribute to the RockID application please use the following steps.
- Create a branch from the main and name it "development."
- Create a branch from "development" for the feature or bug fix.
- Commit changes made and add a descriptive commit message.
- Create a pull request to the "development" branch and explain the purpose of the changes.
- When all changes and bug fixes have been completed, create a pull request from "development" to the main branch.
Future improvements
- Improving the training models: Currently, both the rough and polished classification models have an accuracy of 80-82. This can possibly be improved by optimizing the dataset and trying different hyperparameters.
- Adding more rocks: Adding more rocks to the app will make the app more robust.
- iOS compatibility: Unfortunately, we ran out of time and could not get this app to run on iOS. We set up the emulator, but it would not build successfully.
- Maps page: Add more filters and attributes to the pins, such as username, rock information, etc.
- Friend list: When a user views another user's profile, they can have the option to send messages or send a friend request. If they accept it, all that user's friends will be viewable within the application.
- tflite_flutter_helper: The tflutter_lite_helper package is used to help with image processing. The package is deprecated as of 8/2/23. Because the package is deprecated and the package uses a gradle build version that is older, there may be difficulties updating some packages in the future. A bug fixes may be available for this soon though.
Notes On Building for iOS
- Currently the project is only capable of building for Android devices. Problems occur when building for iOS devices. To start building for iOS, a team member must have an iOS simulator on an macOS machine.
- Simulators can be created using XCode on macOS. If a team member is able to create a simulator, after starting the simulators and downloading the Android iOS Emulator package in VSCode, the project can start to be build for iOS devices.
- Currently the project fails while building using the tflite_flutter package.
Authors