About the project
Most small farmers choose a crop by habit and put a fixed amount of fertiliser, even when the soil health card shows a problem. This crop recommendation and yield prediction Android project (app name FasalYukti) turns the soil card into clear advice: which crop to grow, how many quintals to expect, how much money it can bring and how many bags of Urea, DAP and MOP to buy. The machine learning runs inside the phone, so the advice works even without internet.
How it works
- The farmer adds a farm with its area, soil type and irrigation (well, drip, canal or rainfed).
- In Soil Test the farmer types N, P, K and pH from the soil health card; temperature, humidity and last 30 days rainfall are filled from the weather API.
- A Random Forest of 100 trees runs in the app and shows the best crop with its confidence, other suitable crops and the reasons.
- A neural network predicts the yield per acre; the app shows the total yield and the income at the mandi rate.
- The fertiliser screen gives a soil health score out of 100 and the exact bags of Urea, DAP and MOP with cost.
- The agriculture officer of the district verifies the soil test and replies to questions; the farmer downloads a PDF farm advisory report.
Users
- Farmer: farms, soil test, crop advice, yield and income, fertiliser plan, mandi prices, weather, history, charts, quiz with badges, ask officer, PDF report.
- Agriculture Officer: dashboard, farmer query chat, soil card verify / reject, advisories to villages with reach count, area analytics.
- Admin (web panel): officer approval, farmers, crop and fertiliser masters, mandi prices, soil tests, queries, notices, quiz, printable reports, settings.
Highlights
- 3 roles, 23 app screens, 12 admin pages, 34 PHP APIs, 14 MySQL tables
- Random Forest crop model (22 crops, 99.55 % test accuracy) and neural network yield model, both offline in the app
- Python training script with dataset, confusion matrix and accuracy charts included
- Validations on every form in the app and on the server (mobile 10 digits, email, password, soil value ranges)
- Hashed passwords, prepared SQL statements, role check on every API, CSRF-protected admin forms
- Sample data with demo logins for farmer, officer and admin – ready for the first review
What you get
- Full Android Studio source code (Java) and PHP admin panel + APIs
- MySQL database file with sample data
- Project report in Word (50 pages) with UML, DFD and ER diagrams
- 2-page project abstract (Word + PDF) and project explanation with viva questions
- Setup guide (PDF + Word) and help to run the project
Who can use this project
BE / B.Tech (Computer, IT, AI & DS), MCA, BCA, M.Tech and Diploma students looking for a machine learning Android project with source code and documentation. A good fit for agriculture, AI/ML and Android project topics.
Frequently asked questions
Does the crop prediction need internet? No. Both ML models run inside the phone; internet is needed only to save data and get weather. Can I use the original Kaggle dataset? Yes. Copy the Kaggle CSV in the ML_Training folder and run train_model.py, then copy the two JSON model files to the app. Which crops are supported? 22 crops including rice, maize, cotton, chickpea, pigeon pea, grapes, pomegranate, banana and mango. Will it run on my laptop? Yes – XAMPP and Android Studio on a normal 8 GB laptop; the setup guide explains every step.