پیادهسازی یک مدل یادگیری انتقالی برای دستهبندی تصاویر تعدادی از علفهای هرز
محورهای موضوعی : فناوری های تولید پایدارایمان احمدی 1 * , فاطمه توسلي 2
1 - استادیارگروه مهندسی تولید و ژنتیک گیاهی، دانشکده کشاورزی، آب، غذا و فراسودمندها، واحد خوراسگان، دانشگاه آزاد اسلامی، اصفهان، ایران
2 - دانش آموخته کارشناسی ارشد ریاضی کاربردی، دانشگاه یزد، يزد، ايران
کلید واژه: دستهبندي, صحت آزمون, علف هرز, مدل EfficientNet, يادگيري انتقالي,
چکیده مقاله :
چکیده
هدف: ماشین بینایی شاخهای از هوش مصنوعی است که با تشخیص اشیاء موجود در یک تصویر و یا دستهبندی تصاویر سر و کار دارد. در این مقاله برای دستهبندی تصاویر علفهای هرز در هجده دسته از روش یادگیری انتقالی استفاده شده است. با استفاده از مدلهای یادگیری انتقالی، پیادهسازی پردازش تصویر به کمک الگوریتمهای یادگیری عمیق روی رایانههای دارای امکانات سختافزاری معمولی امکانپذیر میشود. هزینه انجام این کار کم شدن صحت مدل بر مبنای یادگیری انتقالی نسبت به مدل یادگیری عمیق است.
مواد و روشها: ابتدا تصاویری از هر یک از هجده دسته علفهای هرز جمعآوری شد و این تصاویر به دو دسته آموزش، شامل 695 تصویر، و آزمون، شامل 260 تصویر، تقسیم شدند. سپس تعداد تصاویر پایگاه دادهای آموزش با فرآیند افزایش رایانهای تصاویر ده برابر شد و تعداد تصاویر پایگاه دادهای آموزش به 6950 تصویر رسید. این تصاویر به عنوان دادههای خام اولیه برای ایجاد مدل ماشین بینایی مورد استفاده قرار گرفت. عملیات پیشپردازش تصاویر به کمک توابع موجود در کتابخانه PyTorch انجام شد، سپس مدل یادگیری انتقالی با استفاده از تصاویر پایگاه دادهای آموزش توسعه یافت و روی تصاویر پایگاه دادهای آزمون، ارزیابی شد. معیار اصلی ارزیابی مدل، ماتریس در هم ریختگی بود که به وسیله آن سایر معیارهای ارزیابی یعنی حساسیت، اختصاصیت، دقت، نمره F1 و صحت محاسبه و نتایج آن ارائه شد.
يافتهها: بر طبق نتایج به دست آمده مقادیر معیارهای حساسیت، اختصاصیت، دقت، نمره F1 و صحت به دست آمده در این پژوهش بهترتیب برابر با 84، 99، 83، 84 و 84 درصد بودند.
نتيجهگيري: این نتایج از قابل قبول بودن عملکرد دسته بند با وجود عدم استفاده از رایانه مجهز به GPU در فرآیند آموزش حکایت دارد.
Objective: Computer vision is a branch of artificial intelligence that deals with object recognition in images or image classification. In this article, transfer learning was used to classify weed images into eighteen categories. With the help of transfer learning models, image processing using deep learning algorithms can be implemented on computers with standard hardware capabilities. The trade-off is reduced model accuracy compared to using deep learning from scratch.
Material and methods: First, images from each of the eighteen weed categories were collected. These were split into a training set (695 images) and a test set (260 images). The training dataset was then augmented using computer-based image enhancement, increasing its size tenfold to 6,950 images. These images served as the raw input data for building the computer vision model. Image preprocessing was carried out using functions available in the PyTorch library. Then, a transfer learning model was developed using the training images and evaluated using the test images. The main evaluation metric in this study was the confusion matrix, through which other metrics—sensitivity, specificity, precision, F1-score, and accuracy—were calculated and presented.
Results: According to the results, the values of sensitivity, specificity, precision, F1-score, and accuracy were 84%, 99%, 83%, 84%, and 84%, respectively.
Conclusion: These results indicate that the classifier performed acceptably well despite being trained without a GPU-equipped computer.
Chen, J., Zhang, D., Sun, Y., & Nanehkaran, Y. A. (2020). Using deep transfer learning for image-based plant disease identification. Computers and Electronics in Agriculture, 173, 105393. Available from https://doi.org/10.1016/j. compag.2020.105393.
Gopalakrishnan, K., Sivaraj, R., & Vijayakumar, M. (2025). Automated weed and crop recognition and classification model using deep transfer learning with optimization algorithm. Scientific Reports, 15, Article 15275. https://www.nature.com/articles/s41598-025-15275-3
Hasan, A. S. M. M., Laga, H., Jones, M. G. K., & Sohel, F. (2022). Weed recognition using deep learning techniques on class-imbalanced imagery. Crop and Pasture Science, 74(6), 628–644. https://www.publish.csiro.au/CP/pdf/CP21626
Huang, Z., Su, L., Wu, J., Chen, Y. (2023). Rock Image Classification Based on EfficientNet and Triplet Attention Mechanism. Appl. Sci. 2023, 13, 3180. https://doi.org/10.3390/app13053180
Li, X., & Chen, Z. (2025). Research on weed identification based on deep learning. Proceedings of the 2025 ACM International Conference on Artificial Intelligence and Agriculture, 3728820. https://dl.acm.org/doi/epdf/10.1145/3728725.3728820
Ouhami, M., Es-Saady, Y., Hajji, M. E., Hafiane, A., Canals, R., & Yassa, M. E. (2020). Deep transfer learning models for tomato disease detection. In: ICISP 2020. LNCS (Vol. 12119, pp. 65_73).
Pai, D. G., Kamat, R., & Balachandra, M. (2024). Deep learning techniques for weed detection in agricultural environments: A comprehensive review. IEEE Access, 12, 113193–113214. https://doi.org/10.1109/ACCESS.2024.3418454
Thenmozhi, K., & Srinivasulu Reddy, U. (2019). Crop pest classification based on deep convolutional neural network and transfer learning. Computers and Electronics in Agriculture, 164, 104906. Available from https://doi.org/10.1016/j. compag.2019.104906.
Vidyarthi, S. K., Singh, S. K., Xiao, H. W., & Tiwari, R. (2021). Deep learnt grading of almond kernels. Journal of Food Process Engineering, 44(4), p.e13662.