{"id":15932958,"url":"https://github.com/logeshwaran-ks/medicinal-plants-detection-using-machine-learning","last_synced_at":"2026-02-07T08:31:11.374Z","repository":{"id":253738115,"uuid":"843527487","full_name":"Logeshwaran-KS/Medicinal-Plants-Detection-Using-Machine-Learning","owner":"Logeshwaran-KS","description":"Medicinal Plants Detection","archived":false,"fork":false,"pushed_at":"2024-08-25T01:28:58.000Z","size":6079,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T07:03:41.161Z","etag":null,"topics":["gabor-feature-extraction","glcm","hsv-color-detection","lbp","machine-learning","medicinal-plants","prediction","principal-component-analysis","python","segmentation","standardscaler","support-vector-machine"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Logeshwaran-KS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-16T18:00:06.000Z","updated_at":"2024-10-18T08:27:54.000Z","dependencies_parsed_at":"2025-03-24T20:42:37.250Z","dependency_job_id":null,"html_url":"https://github.com/Logeshwaran-KS/Medicinal-Plants-Detection-Using-Machine-Learning","commit_stats":null,"previous_names":["logeshwaran-ks/medicinal-plants-detection-using-machine-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Logeshwaran-KS/Medicinal-Plants-Detection-Using-Machine-Learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logeshwaran-KS%2FMedicinal-Plants-Detection-Using-Machine-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logeshwaran-KS%2FMedicinal-Plants-Detection-Using-Machine-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logeshwaran-KS%2FMedicinal-Plants-Detection-Using-Machine-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logeshwaran-KS%2FMedicinal-Plants-Detection-Using-Machine-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Logeshwaran-KS","download_url":"https://codeload.github.com/Logeshwaran-KS/Medicinal-Plants-Detection-Using-Machine-Learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Logeshwaran-KS%2FMedicinal-Plants-Detection-Using-Machine-Learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190170,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gabor-feature-extraction","glcm","hsv-color-detection","lbp","machine-learning","medicinal-plants","prediction","principal-component-analysis","python","segmentation","standardscaler","support-vector-machine"],"created_at":"2024-10-07T02:20:21.550Z","updated_at":"2026-02-07T08:31:11.356Z","avatar_url":"https://github.com/Logeshwaran-KS.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Medicinal Plants Detection Using Machine Learning** :shamrock:\n\n## **Machine Learning / Deep Learning: Project 1**\n\n\nThis project focuses on Medicinal Plants Detection using Machine Learning techniques to identify various medicinal plants through images. The process involves Segmentation, Gray Scale Conversion, and advanced Feature Extraction methods such as GLCM, Gabor, and LBP. Multiple models are trained and evaluated to identify the most suitable one for prediction.\n\n## **Project Overview** :page_facing_up:\nThe primary objective is to develop a reliable model capable of accurately identifying medicinal plants from images. The project emphasizes manual feature extraction techniques without relying on neural networks, ensuring high performance across various machine learning models.\n\n---\n\n## **Data Collection** :package:\nThe dataset comprises images of 30 different plant species, each labeled with both common and botanical names. These images vary in size, providing a comprehensive dataset for robust classification tasks.\n\n- **Dataset URL:** [Medicinal Leaf Dataset](https://data.mendeley.com/datasets/nnytj2v3n5/1)\n\n---\n\n## **Preprocessing** :hammer_and_wrench:\n### **1. Segmentation** :scissors:\nImages are segmented using the HSV (Hue, Saturation, Value) color space to isolate the relevant plant regions, removing unnecessary background.\n\n\u003cdiv\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/aee5227f-2b46-44f1-a2ed-b34d91959011\" alt=\"ImgSeg\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n### **2. Gray Scale Conversion** :black_circle:\nThe segmented images are then converted to grayscale to simplify further processing while preserving essential details.\n\n\u003cdiv\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/38c27710-bd6f-42bb-a8ba-8b07ea5af34b\" alt=\"GrayScale\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n### **3. Sobel Filter** :triangular_ruler:\nA Sobel Filter is applied to highlight the edges in the images, making them more suitable for feature extraction.\n\n\u003cdiv\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/a807095a-0e98-466c-9356-e4488c332393\" alt=\"Sobel\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n---\n\n## **Feature Extraction** :mag_right:\nFeatures are extracted from both segmented and grayscale images using the following techniques:\n\n### **1. Local Binary Patterns (LBP)** :1234:\nLBP converts an image into a binary pattern by comparing neighboring pixels to the center pixel. This binary code is then converted to a decimal value, serving as a texture descriptor.\n\n### **2. Gray-Level Co-occurrence Matrix (GLCM)** :chart_with_upwards_trend:\nGLCM analyzes pixel pairs within a specific spatial relationship, creating a matrix that reflects their frequency. This matrix is used to derive texture features such as contrast, correlation, energy, and homogeneity.\n\n### **3. Gabor Filters** :wave:\nGabor filters process the image by convolving it with a sinusoidal wave modulated by a Gaussian envelope. These filters are sensitive to specific image features, such as edges and textures, at various scales and orientations.\n\n### **4. Color Moments** :rainbow:\nColor moments, including mean, standard deviation, and skewness, capture the color distribution in each channel (e.g., RGB). These moments are highly effective for image classification tasks.\n\n**Note:** A total of 62 features are extracted from each image and stored in a `FeatureExtracted.csv` file. If you require this file, please contact me using the information provided at the end.\n\n---\n\n## **Feature Reduction** :scissors:\nTo improve model performance and reduce dimensionality, the dataset is split into training and test sets, and the following techniques are applied:\n\n### **1. Principal Component Analysis (PCA)** :bar_chart:\nPCA identifies the principal components that capture the most variance in the data, reducing the dimensionality while retaining essential information.\n\n### **2. StandardScaler** :balance_scale:\nThe StandardScaler normalizes the data by transforming each feature to have a mean of 0 and a standard deviation of 1, ensuring consistency during model training.\n\n---\n\n## **Model Training** :computer:\nThe extracted features are used to train multiple models, with a focus on identifying the best-performing one.\n\n### **Model Comparison** :bar_chart:\n\u003cdiv\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/b1cdb539-347a-40a1-8c49-9182446f67aa\" alt=\"ModelComp\" width=\"400\" /\u003e\n\u003c/div\u003e\n\n### **Support Vector Machine (SVM)** :rocket:\nSVM achieved the highest accuracy of 99%, outperforming all other models. Its ability to find the optimal hyperplane that maximizes class separation makes it particularly effective for this classification task.\n\n---\n\n## **Prediction** :crystal_ball:\nReal-time data can be used for prediction by leveraging pre-trained models, including PCA for dimensionality reduction, StandardScaler for normalization, and SVM for classification. The process involves:\n\n1. **Data Preprocessing:** Incoming data is normalized using the saved StandardScaler to ensure consistency.\n2. **Dimensionality Reduction:** The data is transformed using the saved PCA model, retaining the most significant features.\n3. **Prediction:** The transformed data is fed into the saved SVM model to generate real-time predictions.\n\nThis approach ensures efficient and accurate predictions on new, unseen data by utilizing the computational efficiency and patterns learned by the pre-trained models.\n\n---\n\n## **Contact** :mailbox:\nIf you have any questions, need additional data, or have suggestions or feedback, feel free to contact me:\n\n- :email: **Email:** logeshwaranks01@gmail.com\n- **LinkedIn:** [Logeshwaran KS](https://www.linkedin.com/in/logeshwaran-ks)\n\n---\n\n**Thank You for Checking Out This Project!** :smile:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogeshwaran-ks%2Fmedicinal-plants-detection-using-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogeshwaran-ks%2Fmedicinal-plants-detection-using-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogeshwaran-ks%2Fmedicinal-plants-detection-using-machine-learning/lists"}