AI-Powered Cannabis Seed Detection and Classification: A Machine Learning Approach for Precision Agriculture

preprint OA: closed
Full text JSON View at publisher
Full text 72,679 characters · extracted from preprint-html · click to expand
AI-Powered Cannabis Seed Detection and Classification: A Machine Learning Approach for Precision Agriculture | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article AI-Powered Cannabis Seed Detection and Classification: A Machine Learning Approach for Precision Agriculture M S Binshad, K V Greeshma This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8566248/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Cannabis consumption and related research have accelerated globally as a result of recent legalization policy trends. Cannabis poses unique challenges in obtaining proper classification and standardization as it is the second most widely used psychoactive substance in the world. Accurate cannabis seed classification is crucial for precision agriculture since it has a direct impact on industrial regulation, genetic integrity, and crop productivity. This study uses a curated dataset of 3,434 seed images from 17 different varieties to investigate a machine-learning-based method for cannabis seed detection and classification. A Support Vector Machine (SVM) classifier was employed in this study for the classification of grayscale image features extracted after resizing and preprocessing the images. The SVM classifier achieved an impressive classification accuracy of 93.98% across certain varieties—such as AK47_photo, Hang Kra Rog KU, and Thaistick Foi Thong —exhibiting perfect classification performance. The macro-average F1-score of 0.93 and the weighted-average F1-score of 0.94 both show that the classification is strong, balanced, and reliable across all categories.These results confirm the usefulness of SVM-based grayscale feature modeling for automating cannabis seed classification and improving precision agriculture through efficient, scalable, and data-driven solutions. The study also points out areas for future research, like making the dataset more diverse and using advanced feature extraction and deep learning methods to make the model work better. Cannabis seeds Machine learning Cannabis classification SVM Precision agriculture Seeds classification Figures Figure 1 Figure 2 Figure 3 1. Introduction The cannabis business has grown a lot in the last few years because more places are making it legal and people want better products. This growth has underscored the need for precision and consistency in all stages of cannabis production, particularly in seed classification. It's important to be able to tell different types of cannabis seeds apart in order to maintain genetic purity, quality control, and follow the rules. It takes a lot of time and is easy to make mistakes when using common manual methods to sort seeds. These methods are not accurate enough for modern farming. These challenges highlight the urgent need for automated, reliable, and scalable classification systems. In the last few years, artificial intelligence (AI) has made a lot of progress, especially in machine learning (ML). This has affected a lot of areas, including farming. AI-powered solutions are great at solving hard classification problems because they use big datasets and smart algorithms. For cannabis seed classification, AI-driven systems can automate detection and identification processes, overcoming the limitations of traditional methods. These systems make things more efficient, cut down on mistakes, and make sure that quality control is always the same, which is in line with the larger goals of precision agriculture. This study builds on earlier work by using a dataset of 3,434 cannabis seed images that are sorted into 17 different types. We preprocess the dataset to make it more uniform and easier to work with by converting it to grayscale and reducing the number of dimensions. We chose a Support Vector Machine (SVM) classifier because it can handle high-dimensional data well, which shows that it could accurately classify cannabis seeds. The research presents a comprehensive AI-based framework for automated cannabis seed classification, achieving an overall accuracy of 93.98% on the test dataset. The methodology stresses the need for standardized preprocessing and strong feature extraction, which are both very important for the model's performance. Detailed evaluation metrics show that the model is good at telling apart certain types of seeds but needs to work on handling classes that look similar. This study makes three important contributions: first, it creates a reliable AI-powered pipeline for classifying cannabis seeds; second, it shows how well machine learning algorithms, especially SVM, can solve this specific problem; and third, it shows how AI can improve productivity, accuracy, and scalability in farming. This research lays the groundwork for new uses in precision agriculture by connecting traditional classification methods with AI-driven solutions. 2. Literature Review Islam et al. (2024) conducted an extensive study on the automated detection and classification of cannabis seeds, utilizing sophisticated deep learning techniques. The research was primarily driven by the necessity to tackle significant issues related to quality assurance, regulatory adherence, and genetic characterization in commercial cannabis cultivation and genetic studies (Islam et al., 2024). The authors created a one-of-a-kind dataset with 3,319 high-resolution pictures of 17 different types of cannabis seeds from different parts of Thailand. Self-supervised bounding box annotation was done with the Grounding DINO model to make sure that the data was labeled correctly for object detection tasks. The research assessed two cutting-edge object detection frameworks—Faster R-CNN and RetinaNet—incorporated with various backbone architectures, such as ResNet50, ResNet101, and ResNeXt101. The results showed that RetinaNet with ResNet101 had the highest strict mean average precision (mAP) of 0.9458 at Intersection over Union (IoU) thresholds between 0.5 and 0.95. Faster R-CNN, on the other hand, did better at a lower IoU threshold of 0.5, with a mAP of 0.9428 and a faster inference speed, especially with the ResNeXt101 backbone, which reached 17.5 frames per second (FPS). This performance comparison showed that there is a trade-off between accuracy and processing speed, and that the choice of model should be based on the specific needs of the operation (Islam et al., 2024; Yuan, 2023; Sarker, 2024). The study also found that the ResNeXt101 backbone, even though it was more complex in design, had slightly lower accuracy than the ResNet variants. The authors stressed the promise of combining ensemble learning and transformer-based architectures in future studies to improve classification accuracy and robustness even more. This study is one of the first to use deep neural networks to visually identify different types of cannabis seeds. It makes a big difference in automating breeding programs, quality control, and regulatory oversight in the cannabis agriculture industry (Islam et al., 2024; Sarker, 2024; Shu, 2024). Along with this, the dataset created by Islam et al. (2024) is a key tool for improving machine learning applications in the analysis of cannabis seeds. The dataset makes it possible to train and test object detection models like Faster R-CNN and RetinaNet. Experiments with these models get high mAP and F1 scores of 94.08% and 95.66%, respectively. These results show that the dataset can improve productivity, keep varietal purity, and encourage sustainable farming practices through automation (Islam et al., 2024). In addition to deep learning methodologies, Nguyen (2025) and colleagues investigated manually crafted feature extraction techniques for the classification of cannabis seeds. Their research utilized various image features, such as shape, color, and texture descriptors, specifically the Gray-Level Co-occurrence Matrix (GLCM), Local Binary Pattern (LBP), Scale-Invariant Feature Transform (SIFT), and GIST descriptors. Seven traditional machine learning classifiers were used to test these features. Combining GIST features with Logistic Regression gave the best accuracy of 93.25% across 17 seed varieties. This shows how well global image representations can find unique traits for seed classification (Nguyen, 2025; Trivedi, 2024; A, 2023). The results from both handcrafted and deep learning techniques highlight the increasing capabilities of artificial intelligence (AI) in agricultural imaging and classification. Faster R-CNN and RetinaNet are two examples of deep learning models that offer better detection accuracy and scalability. Handcrafted feature-based methods are still useful for lightweight, easy-to-understand classification systems. These studies together lay a strong foundation for AI-driven seed analysis, which will lead to automation, better quality control, and better compliance with regulations in the cannabis industry and beyond. 3. Methodology 3.1. Dataset Preparation The dataset used in this study contains 3,434 images of cannabis seeds, categorized into 17 distinct classes. Each class represents a unique cannabis seed variety, organized in separate folders. This structured organization facilitated clear identification and labeling of the data for supervised learning tasks. 3.2. Data Preprocessing To make the dataset consistent, each image was resized to 64×64 pixels, making sure that all the samples had the same size. Also, the images were changed to grayscale to save processing power while keeping important details. We then turned the grayscale images into one-dimensional arrays, which turned each image into a feature vector that machine learning algorithms could use. 3.3. Splitting the Dataset An 80:20 train-test split was applied to the dataset using Scikit-learn’s train_test_split function, which ensured a balanced and randomized distribution of images between the two subsets. This method facilitated comprehensive learning during training while preserving a representative portion of data for objective model evaluation. Table 1 Cannabis Seed Varieties (17 Classes) No. Class Label (Folder Name) Suggested Descriptive Name 1 AK47_photo AK-47 Cannabis Seeds 2 blackberry_auto Blackberry Auto Cannabis Seeds 3 cherry_pie Cherry Pie Cannabis Seeds 4 Gelato_photo Gelato Cannabis Seeds 5 gorillar_purple Gorilla Purple Cannabis Seeds 6 Hang Kra Rog KU Hang Kra Rog KU Seeds 7 Hang Kra Rog Phu Phan ST1 Hang Kra Rog Phu Phan ST1 Seeds 8 Hang Suea Sakon Nakhon TT1 Hang Suea Sakon Nakhon TT1 Seeds 9 KD KD Cannabis Seeds 10 KD_KT KD-KT Cannabis Seeds 11 Krerng Ka Via Krerng Ka Via Cannabis Seeds 12 purple_duck Purple Duck Cannabis Seeds 13 skunk_auto Skunk Auto Cannabis Seeds 14 sour_deisel_auto Sour Diesel Auto Cannabis Seeds 15 Tanaosri Kan Daeng RD1 Tanaosri Kan Daeng RD1 Seeds 16 Tanaosri Kan Kaw WA1 Tanaosri Kan Kaw WA1 Seeds 17 Thaistick Foi Thong Thaistick Foi Thong Cannabis Seeds 3.4. Feature Extraction The grayscale pixel intensity values were used as features, resulting in a 4,096-dimensional feature vector for each image (64×64). These raw pixel intensities effectively captured the structural and textural patterns of the seeds, enabling accurate classification. 3.5. Model Selection Support Vector Machine (SVM) We chose a Support Vector Machine with a linear kernel to do the classification. SVM works well with datasets that have a lot of dimensions and classes. Setting the C parameter to 1.0 struck a balance between getting the most out of the margin and making the fewest mistakes in classification. 3.6. Model Training The training dataset was used to teach the SVM classifier. The model used this process to find the best hyperplane in the high-dimensional feature space that could separate the 17 types of cannabis seeds. 3.7. Model Evaluation The trained model was evaluated using the test dataset. Metrics such as precision, recall, F1-score, and accuracy were calculated to assess the model's overall performance. A confusion matrix was also generated to provide insights into class-wise classification accuracy and identify misclassification patterns. 3.8. Tools and Libraries The implementation made use of a number of libraries and tools. We used OpenCV to change the size and color of images before processing them. We used NumPy to do math quickly. Scikit-learn had strong machine learning functions for splitting datasets, training models, and testing them. These tools worked together to make a complete system for classifying cannabis seeds. 4. Results and Discussion The Support Vector Machine (SVM) classifier did a great job of sorting the 17 types of cannabis seeds. It got 93.98% correct on the test dataset. The detailed classification report showed how well each class did in terms of precision, recall, F1-score, and support. Several classes, such as AK47_photo, Hang Kra Rog KU, Hang Suea Sakon Nakhon TT1, KD, sour_deisel_auto , and Thaistick Foi Thong , got perfect scores for precision, recall, and F1-score. This shows that the model was able to tell these seed types apart without making any mistakes. The F1-scores for other classes, like gorillar_purple and skunk_auto , were also very high, at 0.96 and 0.97, respectively. However, certain classes, such as cherry_pie and KD_KT , exhibited relatively lower performance. The cherry_pie class had an F1-score of 0.53, which means it was hard to tell its features apart from those of other classes. KD_KT also got an F1-score of 0.72, which means that the classification accuracy was average. These findings underscore the necessity for further investigation into class-specific challenges, potentially via enhanced data augmentation or meticulous adjustment of the model's hyperparameters. Table 2 Class-wise Performance Metrics for Cannabis Seed Classification Class Name Precision Recall F1-Score AK47_photo 1.00 1.00 1.00 blackberry_auto 1.00 0.97 0.99 cherry_pie 0.80 0.40 0.53 Gelato_photo 0.88 0.86 0.87 gorillar_purple 0.93 0.99 0.96 Hang Kra Rog KU 1.00 1.00 1.00 Hang Kra Rog Phu Phan ST1 0.93 0.90 0.92 Hang Suea Sakon Nakhon TT1 1.00 1.00 1.00 KD 1.00 1.00 1.00 KD_KT 0.70 0.73 0.72 Krerng Ka Via 0.95 1.00 0.98 purple_duck 1.00 0.96 0.98 skunk_auto 0.95 1.00 0.97 sour_deisel_auto 1.00 1.00 1.00 Tanaosri Kan Daeng RD1 1.00 0.96 0.98 Tanaosri Kan Kaw WA1 0.86 0.89 0.88 Thaistick Foi Thong 1.00 1.00 1.00 The model did well across all classes, even when some had fewer samples, as shown by the macro-average F1-score of 0.93 and the weighted-average F1-score of 0.94. The confusion matrix showed that most of the wrong classifications happened between classes that looked similar, which shows how complicated the dataset is and how small differences in seed features can make a big difference. The suggested method, which used SVM with grayscale image features, worked well for classifying cannabis seeds. The results are promising, but future improvements could include making the dataset more diverse, using better feature extraction methods, and trying out other advanced machine learning models to fix problems that were found in certain classes. 5. Conclusion A dataset of 3,434 images of 17 types of cannabis seeds is classified automatically by using machine-learning techniques. An SVM classifier is proposed to be used in the model that will be trained using grayscale images. The preprocessed and resized images were used to extract features that formed a high dimensional vector which was a 4096-dimensional vector. it will effectively represent morphology and texture through the extraction of those features from the image. To maintain proper balance in the evaluation of the model, data was arbitrarily split into a training and test set. The SVM classifier had an overall accuracy of 93.98% in the tests. The classes that got perfect scores in precision, recall, and F1 include AK47_photo, Hang Kra Rog KU, and Thaistick Foi Thong . The model's macro-average F1-score of 0.93 and weighted-average F1-score of 0.94 show that it is strong and can be used with different types of seeds. The study suggests how we can utilize machine learning techniques as a solution to complicated classification problems in precision agriculture. Further, it uses SVM to accomplish this task. The proposed methodology can significantly improve the accuracy and reliability of cannabis seed identification. This can further enhance quality control, genetic research, and regulatory compliance. Even though the results were good, the quality of seeds used and similarity of some classes to one another proved problematic. In the future, making use of advanced feature extraction techniques, larger datasets, and hybrid deep learning model architectures can enhance the overall performance and scalability of the model. In general, this work is a solid step toward automated, AI-driven solutions for seed classification, which can help realize other intelligent agricultural applications. Declarations Author Contribution Binshad M S and Greeshma K V wrote the main manuscript text. All authors reviewed the manuscript. References Ahmed, M.R., Yasmin, J., Wakholi, C., Mukasa, P., Cho, B.K.: Classification of pepper seed quality based on internal structure using X-ray CT imaging. Comput. Electron. Agric. 179 , 105839 (2020) Baek, I., Kusumaningrum, D., Kandpal, L.M., Lohumi, S., Mo, C., Kim, M.S., Cho, B.K.: Rapid measurement of soybean seed viability using kernel-based multispectral image analysis. Sensors. 19 (2), 271 (2019) Chumchu, P., Patil, K.: Dataset of cannabis seeds for machine learning applications. Data Brief. 47 , 108954 (2023) Cortes, C., Vapnik, V.: Support-vector networks. Mach. Learn. 20 (3), 273–297 (1995) Dönmez, E., Diker, A., Elen, A., Ulu, M.: Multiple deep learning by majority-vote to classify haploid and diploid maize seeds. Sci. Hort. 337 , 113549 (2024) Greeshma, K.V., Sreekumar, K.: Fashion-MNIST classification based on HOG feature descriptor using SVM. Int. J. Innovative Technol. Exploring Eng. 8 (5), 960–962 (2019) Freeman, T.P., Craft, S., Wilson, J., Stylianou, S., ElSohly, M., Di Forti, M., Lynskey, M.T.: Changes in delta-9‐tetrahydrocannabinol (THC) and cannabidiol (CBD) concentrations in cannabis over time: systematic review and meta‐analysis. Addiction. 116 (5), 1000–1010 (2021) Huang, M., Tang, J., Yang, B., Zhu, Q.: Classification of maize seeds of different years based on hyperspectral imaging and model updating. Comput. Electron. Agric. 122 , 139–145 (2016) Islam, T., Sarker, T.T., Ahmed, K.R., Lakhssassi, N.: Detection and Classification of Cannabis Seeds Using RetinaNet and Faster R-CNN. Seeds. 3 (3), 456–478 (2024) Johnson, R.: Hemp as an agricultural commodity, pp. 1–29. Congressional Research Service, Washington, DC, USA (2013) Khan, M.S., Nath, T.D., Hossain, M.M., Mukherjee, A., Hasnath, H.B., Meem, T.M., Khan, U.: Comparison of multiclass classification techniques using dry bean dataset. Int. J. Cogn. Comput. Eng. 4 , 6–20 (2023) Nguyen, L.H.B., Phan, T.T.H.: Evaluation of Handcrafted Feature Extraction Methods in Cannabis Seed Classification. In 2025 International Conference on Computing, Intelligence, and Application (CIACON) (pp. 1–6). IEEE. (2025), July Pereira, D.F., Saito, P.T., Bugatti, P.H.: An image analysis framework for effective classification of seed damages. In Proceedings of the 31st Annual ACM Symposium on Applied Computing (pp. 61–66). (2016), April Roy, B., Shukla, G., Dunna, V., Sharma, P., Shukla, P.S.: Advances in Seed Quality Evaluation and Improvement. Springer (2025) Sarker, T.T., Islam, T., Ahmed, K.R.: Cannabis Seed Variant Detection using Faster R-CNN. arXiv preprint arXiv:2403.10722. (2024) Small, E., Cronquist, A.: A practical and natural taxonomy for Cannabis, pp. 405–435. Taxon (1976) Stasiłowicz, A., Tomala, A., Podolak, I., Cielecka-Piontek, J.: Cannabis sativa L. as a natural drug meeting the criteria of a multitarget approach to treatment. Int. J. Mol. Sci. 22 (2), 778 (2021) Wang, L., Wang, S., Yang, Z., Zhang, Y.: A full-view detection method for storage quality of maize grains based on multi-mirror reflection imaging and the TPFM-SDPF-YOLO model. J. Stored Prod. Res. 114 , 102760 (2025) Xue, H., Xu, X., Yang, Y., Hu, D., Niu, G.: Rapid and non-destructive prediction of moisture content in maize seeds using hyperspectral imaging. Sensors. 24 (6), 1855 (2024) Yang, Y., Lewis, M.M., Bello, A.M., Wasilewski, E., Clarke, H.A., Kotra, L.P.: Cannabis sativa (hemp) seeds, ∆9-tetrahydrocannabinol, and potential overdose. Cannabis cannabinoid Res. 2 (1), 274–281 (2017) Zhang, L., Wang, D., Liu, J., An, D.: Vis-NIR hyperspectral imaging combined with incremental learning for open world maize seed varieties identification. Comput. Electron. Agric. 199 , 107153 (2022) Zhang, Y., Lv, C., Wang, D., Mao, W., Li, J.: A novel image detection method for internal cracks in corn seeds in an industrial inspection line. Comput. Electron. Agric. 197 , 106930 (2022) Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8566248","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":572479106,"identity":"51dddb2b-b9c8-4a82-a349-a4fc59a1a905","order_by":0,"name":"M S Binshad","email":"","orcid":"","institution":"Cochin University of Science and Technology","correspondingAuthor":false,"prefix":"","firstName":"M","middleName":"S","lastName":"Binshad","suffix":""},{"id":572479108,"identity":"87077473-07f1-458d-9f57-5e971d5194c7","order_by":1,"name":"K V Greeshma","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA4klEQVRIiWNgGAWjYLACxgYGBgkG5gNApoQMKVrYEkBaeEjRwmMAYhPWIh99+ODDnzu2yUvOyPn86kaNBQ8D++GjG/BpMTyXlmzMe+a24WyJ3G3WOceADuNJS7uBV0sPj5k0Y9ttxnk8Z7cZ57ABtUjwmBHQwv/958+22/bzeM48M875R4QWeR4eNgbettuJs9l7mB/nthGhxYCHzVgaqCV5ZnubGXNunwQPGyG/yPcwP/wIdJjtjMPMjz/nfKuT42c/fAy/LQcQbDYJMIlPOdiWBgSb+QMh1aNgFIyCUTAyAQB1+kbvYMKLlAAAAABJRU5ErkJggg==","orcid":"","institution":"PSGR Krishnammal College for Women","correspondingAuthor":true,"prefix":"","firstName":"K","middleName":"V","lastName":"Greeshma","suffix":""}],"badges":[],"createdAt":"2026-01-10 06:53:32","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8566248/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8566248/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":100366106,"identity":"11d18350-4d3c-40ee-b594-ebb2a97782c3","added_by":"auto","created_at":"2026-01-16 07:55:58","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1969176,"visible":true,"origin":"","legend":"","description":"","filename":"BMSGKVAIPoweredCannabisSeedDetectionandClassification.docx","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/ff8f0252762beabd92f3057f.docx"},{"id":100133718,"identity":"d70ae742-d022-463c-9ba6-9ac3c900c49f","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":4139,"visible":true,"origin":"","legend":"","description":"","filename":"fdc8699ff2364589ae87b9fb20a16947.json","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/6aac9c2d70aedd4c6e45ab4e.json"},{"id":100368114,"identity":"0e68d4f3-c764-479b-98e5-9f15f360ab76","added_by":"auto","created_at":"2026-01-16 07:57:36","extension":"xml","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":63886,"visible":true,"origin":"","legend":"","description":"","filename":"fdc8699ff2364589ae87b9fb20a169471enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/e5a072f07f74d5f2bd4cdc70.xml"},{"id":100133731,"identity":"a994478f-4752-448e-9788-cec3b1838549","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"png","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1604098,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/17f0d2bd56481d9b4ed6bc09.png"},{"id":100366387,"identity":"eaa9253b-2a9d-431b-a215-36380b2b16d5","added_by":"auto","created_at":"2026-01-16 07:56:17","extension":"png","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":101715,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/50eaddfad6a40a20daa9db5a.png"},{"id":100367750,"identity":"52553124-adc8-4e5d-8fb3-1da361a7b077","added_by":"auto","created_at":"2026-01-16 07:57:16","extension":"png","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":258049,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/153d18962142bff15cc57f35.png"},{"id":100133730,"identity":"3f45377b-6e96-4d6b-8b94-705a61ef5e46","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"png","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":149456,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/e767e1c8d3d783f7415b1336.png"},{"id":100133722,"identity":"181f09ea-b7d3-458e-ae3e-7583e0333a04","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"png","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":28182,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/ebeade5973bc14b469ed84b3.png"},{"id":100366896,"identity":"121d38e0-d261-4af8-883e-185eb1728aa4","added_by":"auto","created_at":"2026-01-16 07:56:37","extension":"png","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":64197,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/f377183284c83be57419a65b.png"},{"id":100133725,"identity":"177cf6b7-17d1-44d1-b836-e7d959e298b1","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"xml","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":60343,"visible":true,"origin":"","legend":"","description":"","filename":"fdc8699ff2364589ae87b9fb20a169471structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/079ec3dfc04c09adf02d3719.xml"},{"id":100133727,"identity":"c596ab4b-56ae-42d8-9554-a1196bdbeab1","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"html","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":71567,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/ff5ee8077075dba63933328f.html"},{"id":100133721,"identity":"31455ea2-42e7-4d99-86c8-cc29f981329e","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":1043135,"visible":true,"origin":"","legend":"\u003cp\u003eImages of Cannabis seeds of 17 classes\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/eb73583e4effc65acce52224.png"},{"id":100367793,"identity":"a38d1544-7735-4bc5-9cb4-32b552f1df1e","added_by":"auto","created_at":"2026-01-16 07:57:17","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":151587,"visible":true,"origin":"","legend":"\u003cp\u003eClass-Wise Image Count per Cannabis Seed Class\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/b122444aeed7b77306ac2a01.png"},{"id":100133719,"identity":"736fedd1-c7af-48f7-8da1-5a4fd5f7dc8f","added_by":"auto","created_at":"2026-01-13 10:28:38","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":445649,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion Matrix\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/621d1844387137ccebbc4369.png"},{"id":100733622,"identity":"22d4c750-238c-4d61-af02-871f4cbe8b2d","added_by":"auto","created_at":"2026-01-20 21:57:07","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":2355640,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8566248/v1/65599586-b78f-4c44-bd39-179410107794.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"AI-Powered Cannabis Seed Detection and Classification: A Machine Learning Approach for Precision Agriculture","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eThe cannabis business has grown a lot in the last few years because more places are making it legal and people want better products. This growth has underscored the need for precision and consistency in all stages of cannabis production, particularly in seed classification. It's important to be able to tell different types of cannabis seeds apart in order to maintain genetic purity, quality control, and follow the rules. It takes a lot of time and is easy to make mistakes when using common manual methods to sort seeds. These methods are not accurate enough for modern farming. These challenges highlight the urgent need for automated, reliable, and scalable classification systems.\u003c/p\u003e \u003cp\u003eIn the last few years, artificial intelligence (AI) has made a lot of progress, especially in machine learning (ML). This has affected a lot of areas, including farming. AI-powered solutions are great at solving hard classification problems because they use big datasets and smart algorithms. For cannabis seed classification, AI-driven systems can automate detection and identification processes, overcoming the limitations of traditional methods. These systems make things more efficient, cut down on mistakes, and make sure that quality control is always the same, which is in line with the larger goals of precision agriculture.\u003c/p\u003e \u003cp\u003eThis study builds on earlier work by using a dataset of 3,434 cannabis seed images that are sorted into 17 different types. We preprocess the dataset to make it more uniform and easier to work with by converting it to grayscale and reducing the number of dimensions. We chose a Support Vector Machine (SVM) classifier because it can handle high-dimensional data well, which shows that it could accurately classify cannabis seeds.\u003c/p\u003e \u003cp\u003eThe research presents a comprehensive AI-based framework for automated cannabis seed classification, achieving an overall accuracy of 93.98% on the test dataset. The methodology stresses the need for standardized preprocessing and strong feature extraction, which are both very important for the model's performance. Detailed evaluation metrics show that the model is good at telling apart certain types of seeds but needs to work on handling classes that look similar.\u003c/p\u003e \u003cp\u003eThis study makes three important contributions: first, it creates a reliable AI-powered pipeline for classifying cannabis seeds; second, it shows how well machine learning algorithms, especially SVM, can solve this specific problem; and third, it shows how AI can improve productivity, accuracy, and scalability in farming. This research lays the groundwork for new uses in precision agriculture by connecting traditional classification methods with AI-driven solutions.\u003c/p\u003e"},{"header":"2. Literature Review","content":"\u003cp\u003eIslam et al. (2024) conducted an extensive study on the automated detection and classification of cannabis seeds, utilizing sophisticated deep learning techniques. The research was primarily driven by the necessity to tackle significant issues related to quality assurance, regulatory adherence, and genetic characterization in commercial cannabis cultivation and genetic studies (Islam et al., 2024). The authors created a one-of-a-kind dataset with 3,319 high-resolution pictures of 17 different types of cannabis seeds from different parts of Thailand. Self-supervised bounding box annotation was done with the Grounding DINO model to make sure that the data was labeled correctly for object detection tasks.\u003c/p\u003e \u003cp\u003eThe research assessed two cutting-edge object detection frameworks\u0026mdash;Faster R-CNN and RetinaNet\u0026mdash;incorporated with various backbone architectures, such as ResNet50, ResNet101, and ResNeXt101. The results showed that RetinaNet with ResNet101 had the highest strict mean average precision (mAP) of 0.9458 at Intersection over Union (IoU) thresholds between 0.5 and 0.95. Faster R-CNN, on the other hand, did better at a lower IoU threshold of 0.5, with a mAP of 0.9428 and a faster inference speed, especially with the ResNeXt101 backbone, which reached 17.5 frames per second (FPS). This performance comparison showed that there is a trade-off between accuracy and processing speed, and that the choice of model should be based on the specific needs of the operation (Islam et al., 2024; Yuan, 2023; Sarker, 2024).\u003c/p\u003e \u003cp\u003eThe study also found that the ResNeXt101 backbone, even though it was more complex in design, had slightly lower accuracy than the ResNet variants. The authors stressed the promise of combining ensemble learning and transformer-based architectures in future studies to improve classification accuracy and robustness even more. This study is one of the first to use deep neural networks to visually identify different types of cannabis seeds. It makes a big difference in automating breeding programs, quality control, and regulatory oversight in the cannabis agriculture industry (Islam et al., 2024; Sarker, 2024; Shu, 2024).\u003c/p\u003e \u003cp\u003eAlong with this, the dataset created by Islam et al. (2024) is a key tool for improving machine learning applications in the analysis of cannabis seeds. The dataset makes it possible to train and test object detection models like Faster R-CNN and RetinaNet. Experiments with these models get high mAP and F1 scores of 94.08% and 95.66%, respectively. These results show that the dataset can improve productivity, keep varietal purity, and encourage sustainable farming practices through automation (Islam et al., 2024).\u003c/p\u003e \u003cp\u003eIn addition to deep learning methodologies, Nguyen (2025) and colleagues investigated manually crafted feature extraction techniques for the classification of cannabis seeds. Their research utilized various image features, such as shape, color, and texture descriptors, specifically the Gray-Level Co-occurrence Matrix (GLCM), Local Binary Pattern (LBP), Scale-Invariant Feature Transform (SIFT), and GIST descriptors. Seven traditional machine learning classifiers were used to test these features. Combining GIST features with Logistic Regression gave the best accuracy of 93.25% across 17 seed varieties. This shows how well global image representations can find unique traits for seed classification (Nguyen, 2025; Trivedi, 2024; A, 2023).\u003c/p\u003e \u003cp\u003eThe results from both handcrafted and deep learning techniques highlight the increasing capabilities of artificial intelligence (AI) in agricultural imaging and classification. Faster R-CNN and RetinaNet are two examples of deep learning models that offer better detection accuracy and scalability. Handcrafted feature-based methods are still useful for lightweight, easy-to-understand classification systems. These studies together lay a strong foundation for AI-driven seed analysis, which will lead to automation, better quality control, and better compliance with regulations in the cannabis industry and beyond.\u003c/p\u003e"},{"header":"3. Methodology","content":"\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e3.1. Dataset Preparation\u003c/h2\u003e \u003cp\u003eThe dataset used in this study contains 3,434 images of cannabis seeds, categorized into 17 distinct classes. Each class represents a unique cannabis seed variety, organized in separate folders. This structured organization facilitated clear identification and labeling of the data for supervised learning tasks.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e3.2. Data Preprocessing\u003c/h2\u003e \u003cp\u003eTo make the dataset consistent, each image was resized to 64\u0026times;64 pixels, making sure that all the samples had the same size. Also, the images were changed to grayscale to save processing power while keeping important details. We then turned the grayscale images into one-dimensional arrays, which turned each image into a feature vector that machine learning algorithms could use.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e3.3. Splitting the Dataset\u003c/h2\u003e \u003cp\u003eAn 80:20 train-test split was applied to the dataset using Scikit-learn\u0026rsquo;s \u003cb\u003etrain_test_split\u003c/b\u003e function, which ensured a balanced and randomized distribution of images between the two subsets. This method facilitated comprehensive learning during training while preserving a representative portion of data for objective model evaluation.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eCannabis Seed Varieties (17 Classes)\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"3\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eNo.\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eClass Label (Folder Name)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eSuggested Descriptive Name\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eAK47_photo\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eAK-47 Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e2\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eblackberry_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eBlackberry Auto Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e3\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003echerry_pie\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eCherry Pie Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e4\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eGelato_photo\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eGelato Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e5\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003egorillar_purple\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eGorilla Purple Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e6\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eHang Kra Rog KU\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eHang Kra Rog KU Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e7\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eHang Kra Rog Phu Phan ST1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eHang Kra Rog Phu Phan ST1 Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e8\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eHang Suea Sakon Nakhon TT1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eHang Suea Sakon Nakhon TT1 Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eKD\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eKD Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eKD_KT\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eKD-KT Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e11\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eKrerng Ka Via\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eKrerng Ka Via Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e12\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003epurple_duck\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003ePurple Duck Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e13\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eskunk_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eSkunk Auto Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e14\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003esour_deisel_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eSour Diesel Auto Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e15\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eTanaosri Kan Daeng RD1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eTanaosri Kan Daeng RD1 Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e16\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eTanaosri Kan Kaw WA1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eTanaosri Kan Kaw WA1 Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e17\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eThaistick Foi Thong\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eThaistick Foi Thong Cannabis Seeds\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003e3.4. Feature Extraction\u003c/h2\u003e \u003cp\u003eThe grayscale pixel intensity values were used as features, resulting in a 4,096-dimensional feature vector for each image (64\u0026times;64). These raw pixel intensities effectively captured the structural and textural patterns of the seeds, enabling accurate classification.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003e3.5. Model Selection\u003c/h2\u003e \u003cp\u003e \u003cb\u003eSupport Vector Machine (SVM)\u003c/b\u003e \u003c/p\u003e \u003cp\u003eWe chose a Support Vector Machine with a linear kernel to do the classification. SVM works well with datasets that have a lot of dimensions and classes. Setting the C parameter to 1.0 struck a balance between getting the most out of the margin and making the fewest mistakes in classification.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003e3.6. Model Training\u003c/h2\u003e \u003cp\u003eThe training dataset was used to teach the SVM classifier. The model used this process to find the best hyperplane in the high-dimensional feature space that could separate the 17 types of cannabis seeds.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec10\" class=\"Section2\"\u003e \u003ch2\u003e3.7. Model Evaluation\u003c/h2\u003e \u003cp\u003eThe trained model was evaluated using the test dataset. Metrics such as precision, recall, F1-score, and accuracy were calculated to assess the model's overall performance. A confusion matrix was also generated to provide insights into class-wise classification accuracy and identify misclassification patterns.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec11\" class=\"Section2\"\u003e \u003ch2\u003e3.8. Tools and Libraries\u003c/h2\u003e \u003cp\u003eThe implementation made use of a number of libraries and tools. We used OpenCV to change the size and color of images before processing them. We used NumPy to do math quickly. Scikit-learn had strong machine learning functions for splitting datasets, training models, and testing them. These tools worked together to make a complete system for classifying cannabis seeds.\u003c/p\u003e \u003c/div\u003e"},{"header":"4. Results and Discussion","content":"\u003cp\u003eThe Support Vector Machine (SVM) classifier did a great job of sorting the 17 types of cannabis seeds. It got 93.98% correct on the test dataset. The detailed classification report showed how well each class did in terms of precision, recall, F1-score, and support. Several classes, such as \u003cem\u003eAK47_photo, Hang Kra Rog KU, Hang Suea Sakon Nakhon TT1, KD, sour_deisel_auto\u003c/em\u003e, and \u003cem\u003eThaistick Foi Thong\u003c/em\u003e, got perfect scores for precision, recall, and F1-score. This shows that the model was able to tell these seed types apart without making any mistakes. The F1-scores for other classes, like \u003cem\u003egorillar_purple and skunk_auto\u003c/em\u003e, were also very high, at 0.96 and 0.97, respectively. However, certain classes, such as \u003cem\u003echerry_pie\u003c/em\u003e and \u003cem\u003eKD_KT\u003c/em\u003e, exhibited relatively lower performance. The \u003cem\u003echerry_pie\u003c/em\u003e class had an F1-score of 0.53, which means it was hard to tell its features apart from those of other classes. \u003cem\u003eKD_KT\u003c/em\u003e also got an F1-score of 0.72, which means that the classification accuracy was average. These findings underscore the necessity for further investigation into class-specific challenges, potentially via enhanced data augmentation or meticulous adjustment of the model's hyperparameters.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eClass-wise Performance Metrics for Cannabis Seed Classification\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eClass Name\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003ePrecision\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eRecall\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eF1-Score\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eAK47_photo\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eblackberry_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.97\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.99\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003echerry_pie\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.80\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.40\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.53\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eGelato_photo\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.88\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.86\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.87\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003egorillar_purple\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.93\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.99\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.96\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHang Kra Rog KU\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHang Kra Rog Phu Phan ST1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.93\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.90\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.92\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHang Suea Sakon Nakhon TT1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eKD\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eKD_KT\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.70\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.73\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.72\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eKrerng Ka Via\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.95\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003epurple_duck\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.96\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eskunk_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.95\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.97\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003esour_deisel_auto\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eTanaosri Kan Daeng RD1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.96\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eTanaosri Kan Kaw WA1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.86\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.89\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.88\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eThaistick Foi Thong\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e1.00\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003eThe model did well across all classes, even when some had fewer samples, as shown by the macro-average F1-score of 0.93 and the weighted-average F1-score of 0.94. The confusion matrix showed that most of the wrong classifications happened between classes that looked similar, which shows how complicated the dataset is and how small differences in seed features can make a big difference. The suggested method, which used SVM with grayscale image features, worked well for classifying cannabis seeds. The results are promising, but future improvements could include making the dataset more diverse, using better feature extraction methods, and trying out other advanced machine learning models to fix problems that were found in certain classes.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e"},{"header":"5. Conclusion","content":"\u003cp\u003eA dataset of 3,434 images of 17 types of cannabis seeds is classified automatically by using machine-learning techniques. An SVM classifier is proposed to be used in the model that will be trained using grayscale images. The preprocessed and resized images were used to extract features that formed a high dimensional vector which was a 4096-dimensional vector. it will effectively represent morphology and texture through the extraction of those features from the image. To maintain proper balance in the evaluation of the model, data was arbitrarily split into a training and test set. The SVM classifier had an overall accuracy of 93.98% in the tests. The classes that got perfect scores in precision, recall, and F1 include \u003cem\u003eAK47_photo, Hang Kra Rog KU, and Thaistick Foi Thong\u003c/em\u003e. The model's macro-average F1-score of 0.93 and weighted-average F1-score of 0.94 show that it is strong and can be used with different types of seeds.\u003c/p\u003e \u003cp\u003eThe study suggests how we can utilize machine learning techniques as a solution to complicated classification problems in precision agriculture. Further, it uses SVM to accomplish this task. The proposed methodology can significantly improve the accuracy and reliability of cannabis seed identification. This can further enhance quality control, genetic research, and regulatory compliance. Even though the results were good, the quality of seeds used and similarity of some classes to one another proved problematic. In the future, making use of advanced feature extraction techniques, larger datasets, and hybrid deep learning model architectures can enhance the overall performance and scalability of the model. In general, this work is a solid step toward automated, AI-driven solutions for seed classification, which can help realize other intelligent agricultural applications.\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eBinshad M S and Greeshma K V wrote the main manuscript text. All authors reviewed the manuscript.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eAhmed, M.R., Yasmin, J., Wakholi, C., Mukasa, P., Cho, B.K.: Classification of pepper seed quality based on internal structure using X-ray CT imaging. Comput. Electron. Agric. \u003cb\u003e179\u003c/b\u003e, 105839 (2020)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBaek, I., Kusumaningrum, D., Kandpal, L.M., Lohumi, S., Mo, C., Kim, M.S., Cho, B.K.: Rapid measurement of soybean seed viability using kernel-based multispectral image analysis. Sensors. \u003cb\u003e19\u003c/b\u003e(2), 271 (2019)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eChumchu, P., Patil, K.: Dataset of cannabis seeds for machine learning applications. Data Brief. \u003cb\u003e47\u003c/b\u003e, 108954 (2023)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eCortes, C., Vapnik, V.: Support-vector networks. Mach. Learn. \u003cb\u003e20\u003c/b\u003e(3), 273\u0026ndash;297 (1995)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eD\u0026ouml;nmez, E., Diker, A., Elen, A., Ulu, M.: Multiple deep learning by majority-vote to classify haploid and diploid maize seeds. Sci. Hort. \u003cb\u003e337\u003c/b\u003e, 113549 (2024)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGreeshma, K.V., Sreekumar, K.: Fashion-MNIST classification based on HOG feature descriptor using SVM. Int. J. Innovative Technol. Exploring Eng. \u003cb\u003e8\u003c/b\u003e(5), 960\u0026ndash;962 (2019)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eFreeman, T.P., Craft, S., Wilson, J., Stylianou, S., ElSohly, M., Di Forti, M., Lynskey, M.T.: Changes in delta-9‐tetrahydrocannabinol (THC) and cannabidiol (CBD) concentrations in cannabis over time: systematic review and meta‐analysis. Addiction. \u003cb\u003e116\u003c/b\u003e(5), 1000\u0026ndash;1010 (2021)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHuang, M., Tang, J., Yang, B., Zhu, Q.: Classification of maize seeds of different years based on hyperspectral imaging and model updating. Comput. Electron. Agric. \u003cb\u003e122\u003c/b\u003e, 139\u0026ndash;145 (2016)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eIslam, T., Sarker, T.T., Ahmed, K.R., Lakhssassi, N.: Detection and Classification of Cannabis Seeds Using RetinaNet and Faster R-CNN. Seeds. \u003cb\u003e3\u003c/b\u003e(3), 456\u0026ndash;478 (2024)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJohnson, R.: Hemp as an agricultural commodity, pp. 1\u0026ndash;29. Congressional Research Service, Washington, DC, USA (2013)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKhan, M.S., Nath, T.D., Hossain, M.M., Mukherjee, A., Hasnath, H.B., Meem, T.M., Khan, U.: Comparison of multiclass classification techniques using dry bean dataset. Int. J. Cogn. Comput. Eng. \u003cb\u003e4\u003c/b\u003e, 6\u0026ndash;20 (2023)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eNguyen, L.H.B., Phan, T.T.H.: Evaluation of Handcrafted Feature Extraction Methods in Cannabis Seed Classification. In \u003cem\u003e2025 International Conference on Computing, Intelligence, and Application (CIACON)\u003c/em\u003e (pp. 1\u0026ndash;6). IEEE. (2025), July\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePereira, D.F., Saito, P.T., Bugatti, P.H.: An image analysis framework for effective classification of seed damages. In Proceedings of the 31st Annual ACM Symposium on Applied Computing (pp. 61\u0026ndash;66). (2016), April\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eRoy, B., Shukla, G., Dunna, V., Sharma, P., Shukla, P.S.: Advances in Seed Quality Evaluation and Improvement. Springer (2025)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSarker, T.T., Islam, T., Ahmed, K.R.: Cannabis Seed Variant Detection using Faster R-CNN. arXiv preprint arXiv:2403.10722. (2024)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSmall, E., Cronquist, A.: A practical and natural taxonomy for Cannabis, pp. 405\u0026ndash;435. Taxon (1976)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eStasiłowicz, A., Tomala, A., Podolak, I., Cielecka-Piontek, J.: Cannabis sativa L. as a natural drug meeting the criteria of a multitarget approach to treatment. Int. J. Mol. Sci. \u003cb\u003e22\u003c/b\u003e(2), 778 (2021)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWang, L., Wang, S., Yang, Z., Zhang, Y.: A full-view detection method for storage quality of maize grains based on multi-mirror reflection imaging and the TPFM-SDPF-YOLO model. J. Stored Prod. Res. \u003cb\u003e114\u003c/b\u003e, 102760 (2025)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eXue, H., Xu, X., Yang, Y., Hu, D., Niu, G.: Rapid and non-destructive prediction of moisture content in maize seeds using hyperspectral imaging. Sensors. \u003cb\u003e24\u003c/b\u003e(6), 1855 (2024)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYang, Y., Lewis, M.M., Bello, A.M., Wasilewski, E., Clarke, H.A., Kotra, L.P.: Cannabis sativa (hemp) seeds, ∆9-tetrahydrocannabinol, and potential overdose. Cannabis cannabinoid Res. \u003cb\u003e2\u003c/b\u003e(1), 274\u0026ndash;281 (2017)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZhang, L., Wang, D., Liu, J., An, D.: Vis-NIR hyperspectral imaging combined with incremental learning for open world maize seed varieties identification. Comput. Electron. Agric. \u003cb\u003e199\u003c/b\u003e, 107153 (2022)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZhang, Y., Lv, C., Wang, D., Mao, W., Li, J.: A novel image detection method for internal cracks in corn seeds in an industrial inspection line. Comput. Electron. Agric. \u003cb\u003e197\u003c/b\u003e, 106930 (2022)\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Cannabis seeds, Machine learning, Cannabis classification, SVM, Precision agriculture, Seeds classification","lastPublishedDoi":"10.21203/rs.3.rs-8566248/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8566248/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eCannabis consumption and related research have accelerated globally as a result of recent legalization policy trends. Cannabis poses unique challenges in obtaining proper classification and standardization as it is the second most widely used psychoactive substance in the world. Accurate cannabis seed classification is crucial for precision agriculture since it has a direct impact on industrial regulation, genetic integrity, and crop productivity. This study uses a curated dataset of 3,434 seed images from 17 different varieties to investigate a machine-learning-based method for cannabis seed detection and classification. A Support Vector Machine (SVM) classifier was employed in this study for the classification of grayscale image features extracted after resizing and preprocessing the images. The SVM classifier achieved an impressive classification accuracy of 93.98% across certain varieties\u0026mdash;such as \u003cem\u003eAK47_photo, Hang Kra Rog KU, and Thaistick Foi Thong\u003c/em\u003e \u0026mdash;exhibiting perfect classification performance. The macro-average F1-score of 0.93 and the weighted-average F1-score of 0.94 both show that the classification is strong, balanced, and reliable across all categories.These results confirm the usefulness of SVM-based grayscale feature modeling for automating cannabis seed classification and improving precision agriculture through efficient, scalable, and data-driven solutions. The study also points out areas for future research, like making the dataset more diverse and using advanced feature extraction and deep learning methods to make the model work better.\u003c/p\u003e","manuscriptTitle":"AI-Powered Cannabis Seed Detection and Classification: A Machine Learning Approach for Precision Agriculture","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-01-13 10:28:32","doi":"10.21203/rs.3.rs-8566248/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"6ac5aea9-9061-4eef-83ce-76b661a72327","owner":[],"postedDate":"January 13th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-01-25T04:40:42+00:00","versionOfRecord":[],"versionCreatedAt":"2026-01-13 10:28:32","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8566248","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8566248","identity":"rs-8566248","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00