VeAg (Vacant Vectors Agriculture) is a comprehensive AI-powered platform designed to help farmers and agronomists detect and manage crop diseases efficiently. Using state-of-the-art deep learning models, VeAg provides:
- 🔍 Accurate Disease Detection - AI-powered analysis using ensemble of ConvNeXt, EfficientNetV2, and DeiT models
- 📸 Image-Based Diagnosis - Upload crop images for instant analysis
- 💡 Treatment Recommendations - Available in standalone model interface (integration with main platform coming soon)
- 📊 Case Management - Track and manage multiple disease cases
- 💳 Subscription Plans - Flexible pricing for different user needs
- 🌐 Web & Mobile Ready - Responsive design for all devices
VeAg is a final year project by Sarthak Chakraborty , demonstrating the practical application of:
- Deep Learning in Agriculture
- Full-Stack Web Development
- Cloud Computing & DevOps
- Payment Gateway Integration
- Real-time AI Model Deployment
- Example Crop: Rice Leaf Disease Detection
- Diseases Detected: Bacterial leaf blight, Brown spot, Leaf smut
- Extensible: Can be adapted for wheat, corn, tomato, potato, and other crops
VeAg follows a modern microservices architecture:
┌─────────────────────────────────────────────────────────────┐
│ VeAg Platform │
└─────────────────────────────────────────────────────────────┘
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ │ │ │ │ │
│ CLIENT (React) │────▶│ SERVER (Node) │────▶│ MODEL (Python) │
│ │ │ │ │ │
│ • React 18 │ │ • Express.js │ │ • Gradio │
│ • Vite │ │ • MongoDB │ │ • PyTorch │
│ • Tailwind CSS │ │ • Cloudinary │ │ • TIMM │
│ • Firebase Auth │ │ • Razorpay │ │ • ConvNeXt │
│ • Framer Motion │ │ • Gradio Client │ │ • EfficientNet │
│ │ │ │ │ • DeiT │
└──────────────────┘ └──────────────────┘ └──────────────────┘
│ │ │
│ │ │
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Firebase │ │ MongoDB Atlas │ │ Hugging Face │
│ Authentication │ │ Database │ │ Spaces │
└──────────────────┘ └──────────────────┘ └──────────────────┘
VeAg_Project/
├── client/ # React frontend application
│ ├── src/
│ │ ├── components/ # Reusable React components
│ │ ├── contexts/ # React context providers
│ │ ├── pages/ # Application pages
│ │ ├── config/ # Firebase configuration
│ │ └── utils/ # Utility functions
│ ├── public/ # Static assets
│ └── package.json # Client dependencies
│
├── server/ # Node.js backend server
│ ├── config/ # Configuration files
│ ├── controllers/ # Request handlers
│ ├── models/ # MongoDB schemas
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ └── package.json # Server dependencies
│
├── model/ # AI/ML components
│ ├── backend/ # Model training pipeline
│ │ └── ML_Crop_Disease_Detection_Model.ipynb
│ ├── client/ # Gradio inference application
│ │ ├── app.py # Gradio web interface
│ │ ├── src/ # Model handlers
│ │ ├── models/ # Trained model files
│ │ └── Model.ipynb # Development notebook
│ └── README.md # Model documentation
│
└── README.md # This file
Before you begin, ensure you have the following installed:
- Node.js 18.x or higher
- Python 3.8 or higher
- MongoDB 6.x or higher
- Git for version control
-
Clone the repository
git clone https://github.com/ok-sarthak/VeAg_Project.git cd VeAg_Project -
Set up the Model (Optional - if training new models)
cd model/backend # Follow instructions in model/backend/README.md # Train models and copy .pth files to model/client/models/checkpoints/
-
Set up the Model Client (Gradio)
cd model/client pip install -r requirements.txt # Configure classes.json for your crops python app.py # Or deploy to Hugging Face Spaces
-
Set up the Backend Server
cd server npm install # Create .env file cp .env.example .env # Edit .env with your credentials npm run dev
-
Set up the Frontend Client
cd client npm install # Create .env file cp .env.example .env # Edit .env with your Firebase and API credentials npm run dev
-
Access the Application
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Model Interface: http://localhost:7860
VITE_FIREBASE_API_KEY=your_firebase_api_key
VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id
VITE_API_URL=http://localhost:5000
VITE_API_BASE_URL=http://localhost:5000/apiPORT=5000
NODE_ENV=development
MONGODB_URI=mongodb://localhost:27017/veag
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_key
CLOUDINARY_API_SECRET=your_cloudinary_secret
RAZORPAY_KEY_ID=your_razorpay_key
RAZORPAY_KEY_SECRET=your_razorpay_secret
GRADIO_SPACE_URL=sharkthak/VeAg
CLIENT_URL=http://localhost:5173GEMINI_API_KEY=your_gemini_api_key
PORT=7860- Easy Image Upload: Take photos of affected crops and upload instantly
- Quick Diagnosis: Get AI-powered disease detection in seconds
- Treatment Advice: Available in standalone model interface (full integration coming in v4.0.0)
- Case History: Track all your submitted cases in one place
- Multi-Language Support: English, Hindi (हिंदी), and Bengali (বাংলা) - Making agriculture accessible across India
- Training Pipeline: Complete notebook for training custom models
- Model Comparison: Evaluate different architectures (ConvNeXt, EfficientNetV2, DeiT)
- Ensemble Methods: Combine models for improved accuracy
- Extensible Design: Adapt for different crops and diseases
- Open Architecture: Learn from complete implementation
- Authentication: Secure Google Sign-In via Firebase
- Image Storage: Cloud-based storage with Cloudinary
- AI Processing: Gradio-powered ML inference
- Payment Gateway: Razorpay integration for subscriptions
- Responsive Design: Works on desktop, tablet, and mobile
- Real-time Updates: Track case processing status
- RESTful API: Clean, documented API endpoints
- Database: MongoDB for scalable data storage
- Progressive Web App (PWA): Install and use offline capabilities
- Batch Processing: Analyze multiple images simultaneously
VeAg supports three major Indian languages to make agricultural technology accessible to farmers across India:
- 🇬🇧 English - Primary language for international users and technical documentation
- 🇮🇳 Hindi (हिंदी) - India's most widely spoken language, serving millions of farmers
- 🇮🇳 Bengali (বাংলা) - Supporting farmers in West Bengal regions
Language Features:
- ✅ Full UI translation for all pages
- ✅ Disease names and descriptions in local languages
- ✅ Treatment recommendations in user's preferred language
- ✅ Easy language switching from settings
- ✅ Automatic language detection based on browser settings
-
ConvNeXt-Base (88M parameters)
- Modern CNN architecture
- Excellent overall accuracy
- Balanced performance
-
EfficientNetV2-M (54M parameters)
- Optimized for efficiency
- Fast inference time
- Production-ready
-
DeiT-Small (22M parameters)
- Vision Transformer
- Attention mechanisms
- Captures global features
-
Ensemble Model
- Combines all three architectures
- Customizable weights
- Best overall performance
Current Implementation (Rice):
- Bacterial leaf blight
- Brown spot
- Leaf smut
- Healthy leaf detection
Extensible to Other Crops:
- Wheat: Rust, blight, powdery mildew
- Tomato: Early blight, late blight, leaf mold
- Potato: Early blight, late blight, black scurf
- Corn: Northern corn leaf blight, gray leaf spot
| Feature | Free Plan | Premium Plan |
|---|---|---|
| Cases per month | ❌ | Unlimited |
| AI Analysis | ❌ | ✅ |
| Treatment Advice | ❌ | ✅ |
| Priority Support | ❌ | ✅ |
| Advanced Analytics | ❌ | ✅ |
| Export Reports | ❌ | ✅ |
| Price | ₹0 | ₹9/month |
*Treatment advice is currently available in the standalone model interface. Integration with the main platform is planned for v4.0.0.
Note: Currently, there is no free plan. All users require a premium subscription.
- React 18.3 - UI library
- Vite 5.1 - Build tool
- Tailwind CSS - Styling
- Framer Motion - Animations
- React Router v6 - Routing
- Axios - HTTP client
- Firebase - Authentication
- Node.js - Runtime
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM
- Cloudinary - Image storage
- Razorpay - Payments
- Python 3.8+ - Programming language
- PyTorch - Deep learning framework
- TIMM - Model architectures
- Gradio - Web interface
- Pandas - Data processing
- Matplotlib - Visualization
Detailed documentation for each component:
- Client Documentation - Frontend setup and features
- Server Documentation - Backend API and deployment
- Model Documentation - AI/ML training and inference
- Model Backend - Training pipeline
- Model Client - Gradio deployment
cd client
npm run build
# Deploy dist/ foldercd server
# Push to platform
# Set environment variablescd model/client
# Create new Space
# Upload files
# Set secretscd client
npm testcd server
npm testcd model/client
python -m pytest tests/- Detection Accuracy: 95%+ (ensemble model)
- Response Time: < 15 seconds for analysis
- Uptime: 99.9% availability target
- Concurrent Users: Supports 1000+ simultaneous users
- Authentication: Firebase Auth with JWT tokens
- Data Encryption: HTTPS/TLS for all communications
- Payment Security: PCI-compliant Razorpay integration
- Input Validation: Server-side validation for all inputs
- Rate Limiting: API rate limits to prevent abuse
- CORS: Configured for security
This is a final year academic project of Sarthak Chakraborty. I welcome feedback and suggestions!
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
We chose the MIT License for VeAg because:
-
🌍 Maximum Accessibility
- Anyone can use, modify, and distribute VeAg
- Perfect for educational institutions and research
- Enables farmers and NGOs to deploy without legal concerns
-
🚀 Encourages Innovation
- Developers can build upon VeAg for commercial use
- Startups can integrate our disease detection models
- Academic researchers can extend and improve the system
-
📚 Educational Purpose
- Students can learn from production-ready code
- Great for portfolio and resume projects
- Demonstrates best practices in full-stack development
-
🤝 Community Collaboration
- Simple and permissive - easy to understand
- No complex restrictions or copyleft requirements
- Encourages contributions and forks
-
💼 Business-Friendly
- Can be used in proprietary software
- No obligation to open-source derivatives
- Suitable for commercial agricultural technology companies
What the MIT License Allows:
- ✅ Commercial use
- ✅ Modification
- ✅ Distribution
- ✅ Private use
Requirements:
- 📋 Include original copyright notice
- 📋 Include copy of MIT License text
Limitations:
- ❌ No warranty provided
- ❌ No liability for damages
Our Vision: We believe agricultural technology should be accessible to everyone. By using MIT License, we ensure VeAg can benefit the maximum number of farmers worldwide, whether through direct use, derivative works, or commercial applications.
- PyTorch Team - Deep learning framework
- TIMM Library - Pre-trained models
- Gradio - ML interface framework
- Firebase - Authentication services
- Cloudinary - Image storage
- Razorpay - Payment gateway
- MongoDB - Database
- Open-source crop disease datasets
- GitHub: @ok-sarthak
- Project Repository: VeAg_Project
- Issues: Report a Bug
- ✅ Rice disease detection
- ✅ User authentication
- ✅ Case management
- ✅ Subscription system
- ✅ Payment integration
- 🔄 Multi-crop support (10+ crops)
- 🔄 Mobile app (React Native - iOS & Android)
- 🔄 Treatment Advice Integration (currently available in model interface)
- 🔄 Advanced analytics dashboard with insights
- 🔄 Community forum for farmers
- 🔄 Expert consultation system (connect with agronomists)
- 🔄 Offline mode for areas with poor connectivity
- 🔄 SMS/WhatsApp notifications for case updates
- 🔄 Voice input for disease descriptions
- 🔄 Weather integration for prevention advice
- 🔄 Crop calendar and farming tips
- 🔄 More languages (Tamil, Telugu, Marathi, Punjabi, etc.)
- 🔄 Blockchain-based disease tracking
- 🔄 Farmer-to-farmer marketplace
VeAg provides automated crop disease predictions and treatment suggestions for educational and informational purposes only. It is not a substitute for professional agricultural advice. Always consult with agricultural experts and local extension services for critical farming decisions.
- Lines of Code: 30,000+
- Components: 25+ React components
- API Endpoints: 20+ REST endpoints
- ML Models: 3 architectures + ensemble
- Database Collections: 7 MongoDB collections
- Deployment Ready: ✅ Production-grade