PomegradeAI — AI-Powered Pomegranate Quality Grading System | Final Year Project with Source Code
Back to ProjectOpen a terminal and navigate to the backend directory.
cd "pomegranate quality grading/pomegranate_backend"
Create and activate a Python virtual environment.
python3 -m venv venv
source venv/bin/activate
On Windows, use:
venv\Scripts\activate
Install all required Python dependencies.
pip install -r requirements.txt
Create the models directory and copy the trained model files into it.
mkdir -p models/
cp "../outputs_v2/pomegranate_cnn_model.keras" models/
cp "../outputs_v2/pomegranate_cnn_model.h5" models/
cp "../outputs_v2/class_indices.json" models/
Apply database migrations to set up the SQLite schema.
python manage.py makemigrations
python manage.py migrate
Optionally create a Django admin superuser.
python manage.py createsuperuser
Start the development server.
python manage.py runserver 0.0.0.0:8000
The backend will be accessible at http://localhost:8000.
In a separate terminal, navigate to the Flutter project directory.
cd "pomegranate quality grading/pomgrade_ai"
Install all Flutter dependencies.
flutter pub get
Open the file at lib/constants/api_constants.dart and set the correct backend URL for your device.
Run the app on a connected device or emulator.
flutter run
To build a release APK for Android distribution.
flutter build apk --release
The APK will be available at build/app/outputs/flutter-apk/app-release.apk.
If you want to retrain the model on a new or expanded dataset, open the Jupyter notebook from the project root.
jupyter notebook pomegranate_v2_efficientnet.ipynb
The notebook covers dataset splitting, class imbalance handling, the full tf.data augmentation pipeline, two-phase EfficientNetB0 training, evaluation with confusion matrix, Grad-CAM visualization, and saving the final model to outputs_v2.
Our team is here to assist you with installation and setup.