This project provides a modular ML pipeline to assess the germination potential of corn (maize) kernels. It includes image segmentation using U-Net, feature extraction (skeleton, contour, bounding boxes), and classification using various ML algorithms (Random Forest, SVR, Adaboost, LR, SHAP explainability, etc).
- Automated seedling evaluation using computer vision
- Designed for high-throughput phenotyping tasks in agriculture
- Flexible structure to support plug-and-play segmentation and classification models
Maize/
├── Classification/ # Germination assessment module
│ ├── ALE_PREDICT_* # Predictions in the Fields of Aleysk
│ ├── POS_PREDICT_* # Predictions in the Fields of Pospelikha
│ ├── Dataset/ # Data
│ ├── config.py # Configurations
│ ├── feature_engineering.py # PySpark feature processing
│ ├── hough.py # Highlighting growth lines
│ ├── inference_utils.py # Auxiliary functions of the inference
│ ├── Inference.py # The Inference script
│ ├── spark_session.py # Spark Initialization
│ ├── visualization.py # Visualizations
│ └── ... # Other utilities
│
├── segmentation_project/ # The segmentation module
│ ├── Config.py # Configurations
│ ├── Dataset.py # Data
│ ├── Inference.py # The Inference script
│ ├── Model.py # Neural network architecture
│ ├── Train.py # Training pipeline for training a segmentation model
│ ├── Visualization.py # Utilities for visualizing predictions, labels, masks, etc.
│ └── ...
│
├── Web-Interface/ # A web interface module on Streamlit to demonstrate a model
│ ├── load_models.py # Downloading and preparing models for use in the web
│ ├── main.py # The main starting point for local interface testing
│ ├── Streamlit_app.py # Streamlit application: UI for uploading images and displaying results
│ └── ...
│
└── data_lee.csv # Basic CSV with annotations
Clone the project and install dependencies:
git clone https://github.com/your_username/Maize.git
cd Maize
pip install -r requirements.txtMake sure data_lee.csv and image directories are properly structured under Dataset/.
python Web_Interface/main.pypython segmentation_project/Inference.pypython Classification/Inference.py- Segmentation: U-Net model segments seed parts
- Feature Extraction: Extracts contours, skeletons, bounding boxes, top-left points
- Classification: Predicts germination using extracted features
- Visualization: Overlays predictions and metrics on images
- U-Net based image segmentation
- Custom feature engineering (skeleton, contours)
- Classification using Random Forest and SHAP
- Configurable inference/visualization modules
Pull requests are welcome! Please follow these steps:
- Fork the repo
- Create a feature branch (
git checkout -b feature/XYZ) - Commit your changes
- Push to the branch and open a PR
Distributed under the MIT License. See LICENSE for more info.
Project Author: Rassinin Maxim
