This project is a mobile application built to demonstrate how to automate cell counting in Neubauer hemocytometer chambers using on-device AI.
It serves as an open-source production-ready tool and showcases how to:
- 📱 Build cross-platform mobile apps with Expo SDK 54 and React Native
- 🤖 Run YOLO object detection models on-device with TensorFlow Lite
- 📷 Capture and process images using react-native-vision-camera
- 🔬 Perform Neubauer chamber calculations (cells/mL concentration)
- 🌙 Support dark/light themes with a modern, polished UI
- 🌍 Internationalization (English & Spanish) with i18next
| Feature | Description |
|---|---|
| Camera with Grid Overlay | Live camera feed with customizable Neubauer grid overlay for precise cell alignment |
| AI Cell Detection | On-device YOLO inference using TFLite for real-time cell detection |
| Photo Gallery | Review captured images with detected bounding boxes and manual count adjustments |
| Concentration Calculator | Automatic cells/mL calculation based on dilution factor and chamber dimensions |
| Settings Panel | Configure dilution factors, model parameters, and appearance preferences |
| Multi-language Support | Full English and Spanish translations |
NeubaVision/
├── NeubaVision-APP/ # React Native / Expo mobile application
│ ├── app/ # Expo Router screens (tabs)
│ ├── components/ # UI components organized by feature
│ ├── hooks/ # Custom React hooks (inference, camera, etc.)
│ ├── store/ # Zustand state management
│ ├── i18n/ # Internationalization (en, es)
│ └── assets/model/ # TFLite model file
│
└── experiments/ # ML experiments and training
├── notebooks/ # Jupyter notebooks for model training
├── dataset/ # Training data (images, annotations)
├── src/ # Vision tools and utilities
└── tests/ # Python tests
- Node.js 18+ and npm
- Expo CLI (
npm install -g expo-cli) - Android Studio (for Android) or Xcode (for iOS)
- EAS CLI for builds (
npm install -g eas-cli)
-
Clone this repository
git clone https://github.com/MateoMor/NeubaVision.git cd NeubaVision/NeubaVision-APP -
Install dependencies
npm install
-
Add your TFLite model (if training your own)
Place your trained model at: assets/model/best_float16.tflite -
Run in development mode
# For development build (required for camera & TFLite) npx expo run:android # or npx expo run:ios
-
Build for production
eas build -p android --profile preview eas build -p ios --profile preview
| Category | Technology |
|---|---|
| Framework | React Native 0.81 + Expo SDK 54 |
| Styling | NativeWind (TailwindCSS) + Gluestack UI |
| State Management | Zustand |
| AI/ML | react-native-fast-tflite (YOLO) |
| Camera | react-native-vision-camera |
| Animations | react-native-reanimated |
| i18n | i18next + react-i18next |
| Navigation | Expo Router |
This project is designed to be reusable.
You can fork or clone it and adapt it to your own needs by:
- 🔧 Training your own model: Use the notebooks in
experiments/to train a custom YOLO model for different cell types - 🎨 Customizing the theme: Edit
constants/theme.tsto change colors for light/dark modes - 🌍 Adding languages: Add new translation files in
i18n/directory - 📐 Modifying grid configuration: Adjust
GRID_CONFIGincamera.tsxfor different chamber layouts - ⚙️ Adjusting calculations: Modify
useNeubauerCalculationsStore.tsfor different chamber specifications
It works well as a starter boilerplate for medical imaging apps, laboratory automation tools, or any on-device ML application.
The experiments/ folder contains everything needed to train a custom cell detection model:
- Prepare your dataset in
experiments/dataset/ - Run training notebooks in
experiments/notebooks/ - Export to TFLite (float16 recommended for mobile)
- Replace
assets/model/best_float16.tflite
If you find an issue or have a suggestion for improvement:
- Open an issue using the Issues tab
- If submitting a PR, please reference the related issue
Contributions are welcome 🚀
This project is still under active development.
Current known limitations include:
⚠️ iOS builds may require additional configuration for camera permissions⚠️ Model accuracy depends on image quality and proper chamber alignment- 🔄 Real-time detection is not yet implemented (inference runs on captured photos)
- 📱 Expo Go does not support TFLite or Vision Camera (development build required)
This project is licensed under the MIT License - see the LICENSE file for details.
© 2025 Mateo Morales