This project is a Mars Rock Image Classification tool built with Streamlit. It allows users to upload images of Mars rocks and predicts the rock type using a pre-trained Support Vector Machine (SVM) model.
To run this project locally, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/Project-Altair-IUT/Mars-Rock-Classification-using-SVM.git
cd Mars-Rock-Classification-using-SVMInstall the required packages. Make sure you have Python 3.6 or later installed:
pip install scikit-learn==1.0.2 streamlit==1.26.0 pillow==7.1.0 numpy==1.24.3 opencv-python==4.7.0.72 pandas==2.0.2 matplotlib==3.1.2 gdown
Download the pre-trained model file "img_model.pkl" from this link . Save the downloaded file in the project's root directory. alternate shell command to download the img_model.pkl file directly:
gdown 1s8MvLxAgUlOyIwryHdRq2AuBO4rgS9ce
After installing the required packages and downloading the model file, run the Streamlit app with the following command:
streamlit run app.pyThis will start a local server and launch the Mars Rock Image Classification web app in your default web browser.
- Access the web app using the provided URL.
- Click on the "Upload the Rock Image (Keep this in Rocks)" button.
- Select an image of a Mars rock from your local machine.
- The app will display the uploaded image.
- Click on the "Predict Rock Type" button to classify the rock type.
- The app will display the probabilities of the image belonging to different rock types in both tabular and chart form.
We welcome contributions to improve this project. If you find any bugs or want to add new features, feel free to open an issue or submit a pull request.