This project is a proof-of-concept Android app for offline mushroom genus classification using a lightweight neural network deployed directly on a mobile device.
The main goal was to experiment with on-device inference and explore the challenges of deploying deep learning models in mobile applications — without requiring an internet connection.
- 📱 Android app with a simple user interface
- ⚡ Runs completely offline — no internet connection needed
- 🧠 Pretrained ResNet-50 backbone (Hugging Face) with a custom classification head
- 🍄 Identifies images as one of 9 mushroom genera (from Northern Europe)
- 🔧 Experiment in on-device ML deployment and performance testing
The model was trained on the Mushrooms Classification (Common Genus) dataset.
- 9 folders, each representing a mushroom genus common in Northern Europe
- Between 300–1500 images per genus
- Labels = folder names
This app only classifies mushrooms at the genus level and should not be used for real-world identification. Mushroom identification is highly complex, and eating misidentified mushrooms can be extremely dangerous.
This project is for educational and experimental purposes only.
- Frameworks: Hugging Face, PyTorch, TensorFlow Lite (for mobile deployment)
- Model: ResNet-50 backbone + small dense classification layer
- Deployment: Converted for mobile inference, integrated into a basic Android app
- The model lives in the repo as
mushrooms.tflight
(pretrained ResNet-50 + small classification head). - At runtime, the app loads the model from
app/src/main/ml/
. - Ensure the filename in code matches the file in assets (e.g.,
model.tflite
vsmodel.tflight
).
- In Android Studio: Build → Generate Signed Bundle / APK…
- Choose APK, create or select a keystore, and pick release.
- In Build Variants, select
release
, then build. - Find the APK under:
app/build/outputs/apk/release/app-release.apk
ABI compatibility tips
- If your testers have mixed devices (ARMv7, ARM64, x86), either:
- Build a universal APK, or
- Enable ABI splits to generate per-architecture APKs (smaller but architecture-specific).
- Launch the app on your Android device.
- Take a photo of a mushroom (or load one from gallery).
- The model predicts the most likely genus (out of 9 classes).

The app includes a placeholder roadblock screen (e.g., suggesting support via Patreon or coffee donation).
This was included as a design experiment in user experience, but no real Patreon link exists.
This project was not intended as a production-ready mushroom identification tool. Instead, the objectives were:
- Learn and practice model deployment to mobile devices
- Explore the balance between model accuracy, size, and performance
- Prototype a minimal Android app around an ML model
- Have fun with a practical but deliberately limited use case
This app is for educational purposes only.
Do not use it for real mushroom identification.
Always consult expert sources before consuming wild mushrooms.