# Potential of Deep Learning Methods for Deep Level Particle Characterization in Crystallization
## 1 Introduction  
Crystallization is extensively used in the fine chemical and pharmaceutical industry and represents a key process step towards the final product [1]. To achieve product characteristics of high purity and reproducible defined particle size, the crystallization phenomena must be understood and the process parameters must be tuned during crystallization based on this knowledge. In addition to the primary crystallization phenomena of nucleation and growth, secondary phenomena such as breakage and agglomeration must also be considered. Agglomeration, which is caused by collision and subsequent cementation by solid bridges [2], can have a significant and irreversible effect on the final product. In some cases, e.g., spherical agglomeration, agglomeration is desired to improve processability [3]. In most cases, however, agglomeration should be prevented. By irreversibly assembling of primary crystals to agglomerates the particle sizes and particle size distribution (PSD) are affected in an undesired manner to larger particles sizes and a broader PSD impacting bio availability and processing [4]. Additionally, by the interaction of different crystals, liquid inclusions such as mother liquor entrapment is inevitable and can reduce purity [5]. Whereas nucleation and growth can be depicted quite well these days, agglomeration is still challenging due to complex interactions [6]. Many influencing factors can impact one of the three main steps of agglomeration, the collision, the formation of aggregates by molecular interactions and finally the cementation by solid bridges. These leverscan be influenced by various parameters: process parameters, such as agitation rate, supersaturation, saturation temperature and solid content [6; 7; 8]; system properties, e.g., particle size [9], solvent and impurities [1; 4; 7]. For understanding the agglomeration process and dependencies on parameters, first the challenge of measuring agglomeration must be overcome. Until now, agglomeration kinetics are determined by fitting PSD data without any knowledge about the appearance of agglomerates and single crystals [10; 11]. Image analysis is promising to characterize crystals' shape and size on a microscopic scale. In the literature there already exist publications, which distinguish between single crystals and agglomerates [12; 13], but a deeper crystal characterization up to the level of primary crystals is desired to obtain important information for agglomeration behavior and kinetics of a crystallization system. Primary crystals are all crystals that originated from nucleation. So they sum up all single crystals and all primary crystals forming an agglomerate (pc\({}_{\text{ag}}\)). The main contribution of this work is that not only the agglomerates (ag) and single crystals (sc) are determined, but also information about primary crystals (pc) are provided for the first time. By recognizing the primary crystals in crystallization, the goal is to better characterize the phenomenon of agglomeration and process parameters influencing agglomeration so that the crystallization process can be optimized later on to gain high-quality, less agglomerated products. As basis for the detailed product characterization a sophisticated deep learning image analysis is developed based on flow cell microscopy and the Mask-RCNN method [14]. Here, different variants of Mask-RCNN are elaborated and used for instance segmentation identifying ag, sc, pc\({}_{\text{ag}}\) on a pixel level. To compare the performance of image segmentation, a comparison with an already existing image processing by [PERSON] et al. [15] is provided. Only the differentiation between ag and sc are considered because the method of [PERSON] is not capable of detecting pc\({}_{\text{ag}}\). The developed image analysis with the novelty of characterizing primary crystals in agglomerates is then applied to batch cooling crystallizations of L-alanine in aqueous solution under different process conditions.