Advanced Deep Learning Approaches for Accurate Macrofungi Species Classification Using Optimized ResNet-150 and Vision Transformer | 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 Advanced Deep Learning Approaches for Accurate Macrofungi Species Classification Using Optimized ResNet-150 and Vision Transformer Duong Thi Kim Chi, Nghi N. Nguyen, Thanh Q. Nguyen This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9218048/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 7 You are reading this latest preprint version Abstract Accurate identification of macrofungi is critical for biodiversity monitoring, ecological research, and preventing mushroom poisoning incidents. However, conventional identification based on morphology and molecular barcoding is time-consuming and requires expert knowledge. In this study, we investigate advanced deep learning approaches for fine-grained classification of 47 macrofungi species, including 25 poisonous and 22 non-poisonous classes, using a real-world image dataset of 2,820 samples collected under unconstrained conditions. We develop and evaluate two deep models: (i) an optimized ResNet-150 transfer learning pipeline and (ii) a Vision Transformer (ViT-L/16) model. The proposed ResNet-150 pipeline incorporates a lightweight task-specific classification head and an aggressive augmentation strategy tailored to small macrofungi datasets, enabling robust learning despite limited samples. Experimental results show that the improved ResNet-150 achieves a test accuracy of 93%, outperforming ViT-L/16 (91.4% accuracy) and previously published mushroom classification systems based on Swin Transformer and DenseNet-121. The ResNet-150 model also attains macro-averaged precision, recall, and F1-score of 0.95, 0.93, and 0.93, respectively, demonstrating strong balanced performance across 47 species. Beyond predictive accuracy, we analyze model behavior using attention visualization to highlight key morphological regions that drive decisions, and discuss how these attention maps can be integrated with biochemical data and ITS sequences in future multimodal frameworks. The findings indicate that optimized convolutional backbones remain highly competitive on small, fine-grained biological datasets, while transformer-based architectures open promising directions for interpretable macrofungi characterization. The proposed framework provides a practical and extensible baseline for AI-assisted mushroom identification in smart agriculture and food safety applications. macrofungi classification poisonous mushrooms ResNet-150 Vision Transformer attention mechanism deep learning Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Review Version 1 posted Reviewers agreed at journal 10 May, 2026 Reviews received at journal 21 Apr, 2026 Reviewers agreed at journal 12 Apr, 2026 Reviewers invited by journal 27 Mar, 2026 Editor assigned by journal 27 Mar, 2026 Submission checks completed at journal 27 Mar, 2026 First submitted to journal 25 Mar, 2026 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-9218048","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":613230980,"identity":"7c1b7b14-02b3-4413-a351-3d48096e1eb5","order_by":0,"name":"Duong Thi Kim Chi","email":"","orcid":"","institution":"Thu Dau Mot University","correspondingAuthor":false,"prefix":"","firstName":"Duong","middleName":"Thi Kim","lastName":"Chi","suffix":""},{"id":613230981,"identity":"9907fcee-0597-4402-83fc-1ddfdd98d573","order_by":1,"name":"Nghi N. Nguyen","email":"","orcid":"","institution":"Hospital of Odonto-Stomatology Ho Chi Minh City","correspondingAuthor":false,"prefix":"","firstName":"Nghi","middleName":"N.","lastName":"Nguyen","suffix":""},{"id":613230982,"identity":"147e680f-c599-4605-adf6-d5a0518b4822","order_by":2,"name":"Thanh Q. Nguyen","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAxElEQVRIiWNgGAWjYHACNiA+IIdgEwbMYC3GDGzMJGpJbCBaizl7/rEHP3fcSd8u33+A4UPZYQaD2w34tVj2PGY37D3zLHdnGzMD44xzQC13DuDXYnAjmU2Ct+1w7oZjzAzMQAaD5IwEwlok/7YdTjcAaflLrBZpoOEJYC2MQC38EoS0nHlsJi3bdthww7Fkg4M959J5CGs5nvhM8m3bYXmDwwcfPvhRZi3HRkgLAwOSggNAzENIPaqWUTAKRsEoGAVYAQBNw0Myx4RK/QAAAABJRU5ErkJggg==","orcid":"","institution":"Trường ĐH Nguyễn Tất Thành","correspondingAuthor":true,"prefix":"","firstName":"Thanh","middleName":"Q.","lastName":"Nguyen","suffix":""}],"badges":[],"createdAt":"2026-03-25 04:38:45","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9218048/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9218048/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":105817178,"identity":"be42000c-87e7-40e3-a34d-382dda5f3519","added_by":"auto","created_at":"2026-03-31 12:29:25","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1017145,"visible":true,"origin":"","legend":"","description":"","filename":"FullpaperpredictMushroom.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9218048/v1_covered_948ba7b2-edbf-4a6e-83cd-53eb7d534ed1.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Advanced Deep Learning Approaches for Accurate Macrofungi Species Classification Using Optimized ResNet-150 and Vision Transformer","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"human-ecology","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"huec","sideBox":"Learn more about [Human Ecology](http://link.springer.com/journal/10745)","snPcode":"10745","submissionUrl":"https://submission.nature.com/new-submission/10745/3","title":"Human Ecology","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"macrofungi classification, poisonous mushrooms, ResNet-150, Vision Transformer, attention mechanism, deep learning","lastPublishedDoi":"10.21203/rs.3.rs-9218048/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9218048/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eAccurate identification of macrofungi is critical for biodiversity monitoring, ecological research, and preventing mushroom poisoning incidents. However, conventional identification based on morphology and molecular barcoding is time-consuming and requires expert knowledge. In this study, we investigate advanced deep learning approaches for fine-grained classification of 47 macrofungi species, including 25 poisonous and 22 non-poisonous classes, using a real-world image dataset of 2,820 samples collected under unconstrained conditions. We develop and evaluate two deep models: (i) an optimized ResNet-150 transfer learning pipeline and (ii) a Vision Transformer (ViT-L/16) model. The proposed ResNet-150 pipeline incorporates a lightweight task-specific classification head and an aggressive augmentation strategy tailored to small macrofungi datasets, enabling robust learning despite limited samples. Experimental results show that the improved ResNet-150 achieves a test accuracy of 93%, outperforming ViT-L/16 (91.4% accuracy) and previously published mushroom classification systems based on Swin Transformer and DenseNet-121. The ResNet-150 model also attains macro-averaged precision, recall, and F1-score of 0.95, 0.93, and 0.93, respectively, demonstrating strong balanced performance across 47 species. Beyond predictive accuracy, we analyze model behavior using attention visualization to highlight key morphological regions that drive decisions, and discuss how these attention maps can be integrated with biochemical data and ITS sequences in future multimodal frameworks. The findings indicate that optimized convolutional backbones remain highly competitive on small, fine-grained biological datasets, while transformer-based architectures open promising directions for interpretable macrofungi characterization. The proposed framework provides a practical and extensible baseline for AI-assisted mushroom identification in smart agriculture and food safety applications.\u003c/p\u003e","manuscriptTitle":"Advanced Deep Learning Approaches for Accurate Macrofungi Species Classification Using Optimized ResNet-150 and Vision Transformer","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-03-31 12:27:54","doi":"10.21203/rs.3.rs-9218048/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"reviewerAgreed","content":"44348843801127926594385029085697114171","date":"2026-05-10T19:56:17+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-21T08:37:23+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"169166594442655659289601685840961866948","date":"2026-04-12T12:35:46+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-03-27T10:42:43+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-03-27T10:21:44+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-03-27T10:21:41+00:00","index":"","fulltext":""},{"type":"submitted","content":"Human Ecology","date":"2026-03-25T04:31:10+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"human-ecology","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"huec","sideBox":"Learn more about [Human Ecology](http://link.springer.com/journal/10745)","snPcode":"10745","submissionUrl":"https://submission.nature.com/new-submission/10745/3","title":"Human Ecology","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"8524b298-713d-4970-a9c5-0b8d73dc9c2d","owner":[],"postedDate":"March 31st, 2026","published":true,"recentEditorialEvents":[{"type":"reviewerAgreed","content":"44348843801127926594385029085697114171","date":"2026-05-10T19:56:17+00:00","index":24,"fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[],"tags":[],"updatedAt":"2026-03-31T12:27:54+00:00","versionOfRecord":[],"versionCreatedAt":"2026-03-31 12:27:54","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9218048","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9218048","identity":"rs-9218048","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.