Deep Convolutional Neural Networks for Autofocus Control on a C. elegans Tracking System | 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 Article Deep Convolutional Neural Networks for Autofocus Control on a C. elegans Tracking System Santiago Escobar-Benavides, Jose-Julio Peñaranda-Jara, Joan-Carles Puchalt, and 1 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7620136/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 Correct focal positioning is essential for microscopy imaging of live moving subjects such as Caenorhabditis elegans. However, many methods can be too slow to perform real-time control to keep the subject in focus. In this work, we propose a convolutional neural network-based method to perform one-shot prediction of the optimal focusing distance, without the need to scan iteratively the optical axis to find the optimal position. A new data augmentation technique is proposed, and its effectiveness is validated through statistical analysis. This technique is shown to improve results without the need for additional data collection. Several architectures are trained in z-stacks of images, using the proposed data augmentation technique, and compared on a validation set. Through this comparison, we find that the ConvNext V2, a novel architecture in this context, outperforms other models proposed in previous works. Furthermore, the impact of the Field of View used for the model’s prediction is studied, with the aim of further understanding the influence of spatial resolution and spatial compression on the performance of the model. Biological sciences/Computational biology and bioinformatics Physical sciences/Engineering Physical sciences/Mathematics and computing Full Text 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-7620136","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":534280686,"identity":"c0d95365-16b5-4d14-95fa-0800709aba3f","order_by":0,"name":"Santiago Escobar-Benavides","email":"","orcid":"","institution":"Universitat Politècnica de València","correspondingAuthor":false,"prefix":"","firstName":"Santiago","middleName":"","lastName":"Escobar-Benavides","suffix":""},{"id":534280689,"identity":"75904afe-5762-4f79-8979-6928151c151a","order_by":1,"name":"Jose-Julio Peñaranda-Jara","email":"","orcid":"","institution":"Universitat Politècnica de València","correspondingAuthor":false,"prefix":"","firstName":"Jose-Julio","middleName":"","lastName":"Peñaranda-Jara","suffix":""},{"id":534280690,"identity":"5611c391-196a-4656-900f-82021d13718d","order_by":2,"name":"Joan-Carles Puchalt","email":"","orcid":"","institution":"Universitat Politècnica de València","correspondingAuthor":false,"prefix":"","firstName":"Joan-Carles","middleName":"","lastName":"Puchalt","suffix":""},{"id":534280691,"identity":"313daf2f-657b-4f9f-aeb0-1a72e5d0f9bd","order_by":3,"name":"Antonio-José Sánchez-Salmerón","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA1UlEQVRIie3OsQrCMBSF4VsKzRLImiLUV4gUqoPYV6kITpmdC0KcxLcRx0CGLEXXDA6VQl2dRCdtu7kEuwnmm+/PuQCO86u8HID4vZNw3Tth8ttrslN1+TxM01ijy80T53mONqU1oWY5Hm2LpZ8oHFNP1PMcF8w+YyAZeEIFTQJNomKg3F4MT/reJC8cr1H16JLh1f4Yk7xdkZT5kLQrEVCwPzYyfBVuxYJRhZNJdqyjAHN7Ep30nj7FLCU7XZnb6owJ0vbHPmUgIehx35F9A8dxnD/wBlJ2QbRlac5OAAAAAElFTkSuQmCC","orcid":"","institution":"Universitat Politècnica de València","correspondingAuthor":true,"prefix":"","firstName":"Antonio-José","middleName":"","lastName":"Sánchez-Salmerón","suffix":""}],"badges":[],"createdAt":"2025-09-15 11:38:33","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7620136/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7620136/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":94455754,"identity":"a9cda162-619a-4f7f-bf4f-d8674a1eae74","added_by":"auto","created_at":"2025-10-27 14:43:55","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":605494,"visible":true,"origin":"","legend":"","description":"","filename":"AutofocusDataAvailability.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7620136/v1/81a8a34982aea839e19f4027.pdf"},{"id":94455696,"identity":"ab7b6795-0f0a-44cb-86ce-daa923c219af","added_by":"auto","created_at":"2025-10-27 14:43:52","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":5593,"visible":true,"origin":"","legend":"","description":"","filename":"b315531662b0484d946832d6aa28b212.json","url":"https://assets-eu.researchsquare.com/files/rs-7620136/v1/5769f7c2e12aeb19148231df.json"},{"id":96245804,"identity":"5828c16b-8bb0-4557-9398-bb57c120743a","added_by":"auto","created_at":"2025-11-19 07:22:58","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":694865,"visible":true,"origin":"","legend":"","description":"","filename":"AutofocusDataAvailability.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7620136/v1_covered_1ea89105-b349-40a2-b066-0c4e37e03120.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Deep Convolutional Neural Networks for Autofocus Control on a C. elegans Tracking System","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":true,"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":"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":"","lastPublishedDoi":"10.21203/rs.3.rs-7620136/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7620136/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Correct focal positioning is essential for microscopy imaging of live moving subjects such as Caenorhabditis elegans. However, many methods can be too slow to perform real-time control to keep the subject in focus. In this work, we propose a convolutional neural network-based method to perform one-shot prediction of the optimal focusing distance, without the need to scan iteratively the optical axis to find the optimal position. A new data augmentation technique is proposed, and its effectiveness is validated through statistical analysis. This technique is shown to improve results without the need for additional data collection. Several architectures are trained in z-stacks of images, using the proposed data augmentation technique, and compared on a validation set. Through this comparison, we find that the ConvNext V2, a novel architecture in this context, outperforms other models proposed in previous works. Furthermore, the impact of the Field of View used for the model’s prediction is studied, with the aim of further understanding the influence of spatial resolution and spatial compression on the performance of the model.","manuscriptTitle":"Deep Convolutional Neural Networks for Autofocus Control on a C. elegans Tracking System","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-10-27 11:39:42","doi":"10.21203/rs.3.rs-7620136/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":"79d6974d-da28-4dca-ab35-c56af0c6a21f","owner":[],"postedDate":"October 27th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":56807867,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":56807868,"name":"Physical sciences/Engineering"},{"id":56807869,"name":"Physical sciences/Mathematics and computing"}],"tags":[],"updatedAt":"2025-11-17T04:38:43+00:00","versionOfRecord":[],"versionCreatedAt":"2025-10-27 11:39:42","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7620136","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7620136","identity":"rs-7620136","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","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.