# A Low-Cost Automated Digital Microscopy Platform for Automatic Identification of Diatoms
## 4 Conclusions  
This work demonstrates the feasibility of a low-cost automatic platform for digital microscopy to assist expert diatomists in time-consuming tasks such as diatom counting and classification. The most remarkable functions integrated in the developed system are:  
* Stage X-Y automatic motion control.
* Automated autofocus.
* Programmable illumination modes by the automatic generation of filter masks for image contrast enhancement (see Figure 7c).
* Automatic sequential scanning covering a slide area ranging from 0.17 to 2.07 mm\({}^{2}\) with the corresponding total time for acquisitions and processing from 15 s to 3 min (see Table 3); in addition, a derived random scanning scheme is included.
* Live detection of diatoms for faster diatom counting by using YOLO for on-time inferences with an average sensitivity of 84,6%, specificity of 96.2%, and precision of 72.7% (see Table 5).
* Focal stack acquisition and multifocus fusion by EDF.
* Full integration of operation and control from a user-friendly GUI.  
This work shows a path of science transference to the applied field of digital microscopy with planned future improvements to increase the capabilities of the system and its possible adoption by the market. Some future work for improving the system are:  
Figure 9: Main GUI window showing the camera view and the control panels: (**a**) configuration panel, (**b**) scanning and processing settings panel, and (**c**) motorized stage control panel.  
* Substitution of the small form factor PC by a computational unit with a GPU for embedded systems, capable of fast deep learning inference even for very demanding machine learning algorithms; in this line, a preliminary prototype is being testing with the NVIDIA JetSon platform.
* More precise segmentation algorithms to reduce false positives and false negatives.
* Better modularity of mechanical elements, for fast de/coupling to standard microscopes.
* Faster response times for sequential scanning, applying more complex motor control strategies, minimizing backlash effects, and optimizing followed paths.  
All the authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Spanish Government under the AQUALITAS-RETOS project with Ref. CTM2014-51907-C2-2-R-MINECO.  
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; nor in the decision to publish the results.  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} AI & Artificial intelligence \\ CLAHE & Contrast limit adaptive histogram equalization \\ CNN & Convolutional neural network \\ DNN & Deep neural network \\ EDF & Extended depth of field \\ FOV & Field of view \\ FCN & Fully convolutional network \\ GUI & Graphical user interface \\ GPU & Graphics processing unit \\ GT & Ground truth \\ HDMI & High-definition multimedia interface \\ HE & Histogram equalization \\ JSON & JavaScript object notation \\ LCD & Liquid crystal display \\ LM & Light microscope \\ MQTT & Message Queuing Telemetry Transport \\ MTF & Modulation transfer function \\ N.A. & Numerical aperture \\ PLA & Polylactic acid \\ ReLU & Rectifier linear unit \\ RI & Refractive index \\ ROI & Region of interest \\ RPN & Region proposal network \\ SCIRD & Scale and curvature invariant ridge detector \\ SDK & Software development kit \\ SEM & Scanning electron microscope \\ SGD & Stochastic gradient descent \\ UV & Ultraviolet \\ VJ & Viola-Jones \\ \end{tabular}