https://github.com/azad77/detecting-and-counting-plants-using-computer-vision-techniques
https://github.com/azad77/detecting-and-counting-plants-using-computer-vision-techniques
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 1 committers (100.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.3%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Azad77
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 966 KB
Statistics
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Plant Detection and Counting Using Computer Vision Techniques
Author: Azad Rasul (azad.rasul@soran.edu.iq)
Attribution: The code was inspired by the DroneMapper CropAnalysis project.
Introduction
This project explores the use of computer vision techniques to detect and count plants using raster data. By leveraging tools like OpenCV, rasterio, and EarthPy, the tutorial processes raster datasets to identify and visualize plant locations. The method employs blob detection to count plants within a specified plot area accurately, providing valuable insights for applications in agriculture and environmental monitoring.
Data Download
Download the data from: DroneMapper Crop Analysis Data and extract it into the data/ directory of your notebook.
Dependencies
The following Python libraries are required to run the code in this repository:
- GeoPandas
- NumPy
- Rasterio
- Matplotlib
- EarthPy
- OpenCV
- Pandas
You can install them using pip:
bash
pip install geopandas numpy rasterio matplotlib earthpy opencv-python pandas
Code Overview
Import Libraries The project starts by importing essential libraries for geospatial data handling, raster data processing, computer vision, and data visualization.
Reading and Processing Data readplotdata(filepath): Reads the plot data from a shapefile using GeoPandas. loadraster(filepath): Loads raster data from a file using Rasterio. maskrasterwithplot(raster, plot): Masks the raster data with the plot extent, cropping and filtering the data. generateplantmodel(demclip, dtmclip): Generates a plant model by calculating the difference between the DEM (Digital Elevation Model) and the DTM (Digital Terrain Model).
Visualization plotplantmodelandbinary(plantmodel, binaryimage, plot_extent): Plots the plant model and binary image using EarthPy and Matplotlib.
Plant Detection setupblobdetector(): Configures the SimpleBlobDetector with parameters to detect blobs (plants) in an image. detectplants(binaryimageint, rgb): Detects plant keypoints in the binary image. plotplant_count(rgb, keypoints): Visualizes the detected plants with blue circles on the RGB image.
Image Normalization and Building True Color Image normalizergb(image): Normalizes RGB image data to the range [0, 255]. buildtruecolorimage(rgb_clip): Ensures RGB values are correctly scaled for true color representation. Usage After setting up the environment and downloading the necessary data, run the Python scripts or Jupyter notebooks provided in this repository. Follow the instructions within the code to process the data, detect plants, and visualize the results.
License
This project is licensed under the MIT License.
Acknowledgements
This project is heavily inspired by the DroneMapper CropAnalysis project. Special thanks to the original authors for providing the data and initial code structure.
Owner
- Name: Dr Azad Rasul
- Login: Azad77
- Kind: user
- Company: Soran University
- Repositories: 4
- Profile: https://github.com/Azad77
As a geographer, I use remote sensing and GIS methods and techniques to study LST, urban environment, earth observation and natural disasters.
GitHub Events
Total
- Watch event: 6
Last Year
- Watch event: 6
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Dr Azad Rasul | a****l@s****q | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0