https://github.com/sarangs1621/detection-of-mixed-pixels-in-thermal-image
A lightweight Python deep learning framework for precision agriculture. It leverages a CNN autoencoder to detect mixed pixels in thermal images, enabling early crop disease detection with robust metrics (MPP, SSIM, MSE) and scalable design.
https://github.com/sarangs1621/detection-of-mixed-pixels-in-thermal-image
agriculture ai autoencoder cnn computer-vision crop-disease crop-disease-detection data-augmentation deep-learning disease-detection image-processing machine-learning mixed-pixels plant-health precision-agriculture python scalable-design tensorflow thermal-imaging unsupervised-learning
Last synced: 2 months ago
JSON representation
A lightweight Python deep learning framework for precision agriculture. It leverages a CNN autoencoder to detect mixed pixels in thermal images, enabling early crop disease detection with robust metrics (MPP, SSIM, MSE) and scalable design.
- Host: GitHub
- URL: https://github.com/sarangs1621/detection-of-mixed-pixels-in-thermal-image
- Owner: sarangs1621
- Created: 2025-03-04T08:39:47.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-04T09:28:55.000Z (7 months ago)
- Last Synced: 2025-03-04T10:26:05.195Z (7 months ago)
- Topics: agriculture, ai, autoencoder, cnn, computer-vision, crop-disease, crop-disease-detection, data-augmentation, deep-learning, disease-detection, image-processing, machine-learning, mixed-pixels, plant-health, precision-agriculture, python, scalable-design, tensorflow, thermal-imaging, unsupervised-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 2.32 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐พ Mixed Pixel Detection in Thermal Images for Precision Agriculture
## ๐จโ๐ป Team Members:
- [**Sachin SM**](https://github.com/sachin02-hub)
- [**Sarang S Nair**](https://github.com/sarangs1621)
- [**Shradha Saji**](https://github.com/ShradhaShaji)
- [**Anaswer Ajay**](https://github.com/imanaswer)
- **Mentor**: [**Sarath S**](https://github.com/sarath444)---
## ๐ Project Overview
This project tackles the **Mixed Pixel Problem** in thermal imaging, enhancing precision agriculture through artificial intelligence. The aim is to detect mixed pixels in thermal images, quantify their proportion, and improve early disease detection in crops.### ๐ Highlights
- **Mixed Pixel Detection Algorithm**: Autoencoder-based deep learning framework.
- **Custom Dataset**: Includes labeled thermal images of healthy and diseased crops.
- **Performance Metrics**:
- **Mixed Pixel Percentage (MPP)**: `5.58%`
- **SSIM**: `0.8905`
- **MSE**: `0.0028`
- **Scalable Design**: Adapts to diverse crops and environments.---
## ๐ ๏ธ Methodology
1. **Data Preprocessing**:
- Augment dataset size through transformations.
- Resize and normalize images for uniformity.
2. **Deep Learning Model**:
- **CNN-Based Autoencoder** for unsupervised learning.
- Mixed pixel identification via reconstruction errors.
3. **Validation**:
- Tested across varying environmental conditions.
- Evaluated using **MPP**, **SSIM**, and **MSE**.---
## ๐ High-Level System Design
1. **Input**: High-resolution thermal images.
2. **Preprocessing**: Data augmentation, normalization, resizing.
3. **Model**: CNN-based Autoencoder for pixel-level analysis.
4. **Output**: Visual representation and quantitative metrics of mixed pixels.---
## Architectural Design

---## Block Diagram

---## ๐ฏ Results & Findings
- **Visual Detection**: Successfully identified and highlighted mixed pixels.
- **Quantitative Metrics**: Achieved robust and scalable performance metrics:
- **MPP**: 5.58%
- **SSIM**: 0.8905
- **MSE**: 0.0028
- **Robustness**: Strong generalization under diverse conditions.
### โจ Key Takeaway
Combining **AI** and **thermal imaging** offers a scalable, cost-effective solution for precision agriculture.---
## ๐งช Experimental Setup
### Dataset:
- High-resolution thermal images captured under controlled conditions.
- Metadata includes plant type, disease, and environmental settings.### Validation Metrics:
- **Mixed Pixel Percentage (MPP)**: Measures pixel ambiguity.
- **SSIM**: Evaluates image reconstruction quality.
- **MSE**: Measures reconstruction error.### Robustness Testing:
- Simulated various environmental conditions.
- Added synthetic noise to test algorithm resilience.### Results Table:
#### Image 1:
| **Metrics** | **Values** |
|---------------------------|------------|
| Mixed Pixel Percentage | 5.58% |
| SSIM | 0.8905 |
| MSE | 0.0028 |#### Image 2:
| **Metrics** | **Values** |
|---------------------------|------------|
| Mixed Pixel Percentage | 5.53% |
| SSIM | 0.8339 |
| MSE | 0.0028 |---
## โ ๏ธ Limitations
1. Dataset limited to specific plant types.
2. High-resolution thermal cameras required.
3. Computational demands for real-time applications.
4. Complex model interpretability for non-experts.---
## ๐ฎ Future Scope
1. **Expanded Dataset**: Include diverse crops, diseases, and environments.
2. **Algorithm Optimization**: Develop lightweight models for edge devices.
3. **Advanced Segmentation**: Leverage transformers or graph-based models.
4. **Real-World Validation**: Conduct large-scale field trials.
5. **User-Friendly Interfaces**: Create tools accessible to non-technical users.
---## ๐ How to Use
1. **Clone the repository**:
```bash
git clone https://github.com/sarangs1621/Detection-of-Mixed-Pixels-in-Thermal-Image.git
```
2. **Navigate to the directory**:
```bash
cd mixed-pixel-detection
```
3. **Install dependencies**:
```bash
pip install -r requirements.txt
```
4. **Run the model**:
```bash
python Thermal.ipynb
```
---## ๐ Repository Structure
```
|-- dataset/
| |-- images/
| |-- labels.csv
|-- models/
| |-- autoencoder.py
|-- results/
| |-- output_images/
|-- Thermal.ipynb
|-- README.md
|-- requirements.txt
```
---## ๐ Requirements
### ๐ ๏ธ Dependencies:
- **Python 3.8+**
- **TensorFlow 2.x**
- **NumPy**
- **Matplotlib**
- **scikit-learn**
- **OpenCV**To install all dependencies, run:
```bash
pip install -r requirements.txt
```
---## ๐ค Additional Resources
**Dataset Access**
-- The dataset used in this project is proprietary and is shared exclusively within Amrita University. External requests for the dataset require explicit permission from the university. Please contact the maintainers to initiate the permission process, which includes signing a consent form to ensure non-commercial use.---
## ๐ References
1. **Jones, H. G., & Sirault, X. R. R.** (2014). Scaling of Thermal Images at Different Spatial Resolutions: The Mixed Pixel Problem. *Agronomy*, 4(3), 380โ396. [DOI: 10.3390/agronomy4030380]
2. **Santos, L., et al.** (2020). Analyzing the Effect of Spectral Interference of Mixed Pixels. *IEEE JSTARS*. [DOI: 10.1109/JSTARS.2020.3045712]
3. **Bovolo, F., et al.** (2010). Subpixel Image Classification Based on SVM. *IEEE Transactions on Image Processing*. [DOI: 10.1109/TIP.2010.2051632]---
## ๐ค Contribution
Feel free to submit issues and pull requests to enhance the project. For queries, reach out through the **Issues** section of this repository.---