CrystalClear is a web application that allows you to predict the type of gemstone using a CNN (Convolutional Neural Network) model. This model achieves an accuracy rate of 96% thanks to the utilization of TensorFlow technology. Backend is build via Flask, for fronted i choosed Next.js.
Backend of application handles:
- Predictions based on images via CNN model
- models/ - Containes two best models that i trained for application
- app.py - Flask file that contain logic for handling requests.
- cnn.py - Python file for training CNN model using Tenserflow.
- test.py - Python file used for calculating accuracy of models.
- Flask
- Flask_cors
- Python
- Tensorflow
- Numpy
Frontend side of application is build with Next.js. It provides a platform for users to use the functionalities I described in Backend section
- app/contexts - folder that contains context that store results of model prediction.
- app/components - folder for smaller components used for building whole pages.
- public/ - folder that stores images used on frontend.
-
Next.js
-
Typescript
-
Axios
-
Tailwind CSS
-
Framer Motion
-
Clone the Repository: git clone https://github.com/your-account/CrystalClear.git
-
Instal Dependencies:
cd CrystalClear
cd backend
pip install -r requirements.txt
cd ..
cd frontend
npm install3.Running the Application:
- Backend: Navigate to the backend directory and run the Flask application:
cd ..
cd backend
python app.py- Fronend: Navigate to the fronend directory and run Next.js server
cd ..
cd frontend
npm run devThe application will be accessible at http://localhost:3000.
- Uploading an Image: On the homepage of the application, you can upload an image of a gemstone you want to identify using the "Choose File" button.
- Resetting: You can reset the application to upload a new image by clicking the "Reset" button.
- Viewing Results: After uploading the image, the application will display predictions of the gemstone type.
- Make new prediction: After reading all the info you can go back and make another prediction by clicking the "Back to Predictions!" button.
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License (MIT)