The Dragon Fruit Ripeness Detection System is a production-ready AI system that predicts the ripeness level of dragon fruits using deep learning.
It combines:
- Deep Learning (EfficientNet)
- FastAPI backend for inference
- Docker containerization for deployment
- Intelligent decision layer for actionable insights
-
Image-based ripeness detection
-
Ripeness percentage prediction
-
Intelligent output layer:
-
Quality scoring (0–100)
-
Market grading (A+, A, B+, B, C)
-
Shelf-life estimation
-
Price categorization
-
Harvest recommendation
-
Out-of-Distribution (OOD) detection
-
Optimized CPU inference
-
REST API for mobile/web integration
-
Fully Dockerized for portability
ML Model (EfficientNet) ↓ FastAPI Backend ↓ Inference + Intelligence Layer ↓ Docker Container ↓ Cloud Deployment (Render) ↓ Mobile / Client Integration
- ML Framework: PyTorch, timm
- Backend: FastAPI
- Deployment: Docker
- Image Processing: PIL
- Numerical Ops: NumPy
git clone https://github.com/your-username/dragon-fruit-ai.git
cd dragon-fruit-ai/backenddocker build -t dragon-fruit-api .
docker run -p 8000:8000 dragon-fruit-apihttp://localhost:8000/docs
POST /predict
- Type:
multipart/form-data - Field:
file(image)
{
"ripeness_percent": 78,
"grade": "A",
"quality_score": 82,
"price_category": "Premium",
"shelf_life_days": 3,
"harvest_recommendation": "Ready"
}| Scenario | Response |
|---|---|
| Invalid image | 400 |
| Internal error | 500 |
| OOD input | { "status": "invalid" } |
- Swagger UI available at
/docs - Supports real-time image upload
- Validated with real dataset samples
dragon-fruit-ai/
├── backend/
│ ├── app/
│ ├── models/
│ │ └── ripeness_model.pth
│ ├── Dockerfile
│ ├── requirements.txt
│ └── .dockerignore
├── ai-engine/
The system is designed for deployment on cloud platforms like Render.
Key Features:
- Dynamic port handling
- Docker-based deployment
- Production-ready architecture
We welcome contributions from developers, ML engineers, and students!
- Fork the repository
- Create a new branch
- Make your changes
- Submit a Pull Request
Check out:
good-first-issuefor beginnershelp wantedfor contributorsml,backend,devopsfor domain-specific tasks
- API authentication & rate limiting
- Mobile app integration
- Batch inference support
- Model explainability (Grad-CAM)
- Multi-fruit detection system
- CI/CD pipeline automation
This project involved solving real-world engineering problems:
- Model architecture mismatch (timm vs torchvision)
- Docker dependency conflicts
- Large image optimization (CUDA → CPU)
- Network timeout handling
- Cloud deployment constraints
- End-to-end ML system (training → deployment)
- Production-ready backend
- Dockerized and optimized
- Real-world problem solving
For collaboration or queries:
- GitHub: https://github.com/defender-777
If you find this project useful:
Star ⭐ the repository Share with others Contribute 🚀