Application of Multiple Random Forest Algorithm in Image Segmentation of Nanoparticles

. Because of its large speci ﬁ c surface area, small particle size, high surface energy, and unique nanoe ﬀ ect, the morphological characteristics of nanoparticles are the key factors a ﬀ ecting the properties of materials. How to detect and evaluate the morphological characteristics of nanoparticles is the ﬁ rst problem to be solved in the preparation and application of nanomaterials. The main purpose of this paper is to use TEM to recognize the image features of nanoparticles and introduce the transmission electron microscope and image edge segmentation method and random forest algorithm. A method integrating the in situ characterization of modern electron microscopy and the measurement of the electrical properties of nanomonomers was developed. In this paper, a multielectrode TEM in situ electrical measurement platform is prepared, which improves the contact during the integration of nanomaterials and improves the electrical measurement accuracy of the TEM in situ electrical method. In this paper, based on the random forest algorithm, a multirandom forest algorithm is proposed. Due to the di ﬀ erent gray levels of images referenced by the multirandom forest algorithm, the segmentation results are processed by FCM clustering algorithm. Experimental results show that in terms of image segmentation accuracy, the minimum Jaccard coe ﬃ cient obtained by multiple random forest algorithm is 89% and 95%, respectively, which is obviously better than watershed segmentation method and maximum entropy threshold segmentation. In the aspect of automatic image segmentation of nanoparticles, the image segmentation accuracy is the highest when the sample block size and the number of sample blocks selected in the multiple random forest algorithm are 5 ∗ 5 , 7500, and 35, respectively. Therefore, the multirandom forest algorithm has achieved high accuracy in image segmentation of nanoparticles, which provides valuable information for the preparation and application of nanomaterials. A new type of TEM dark-ﬁ eld imaging diaphragm was prepared, which greatly improved the imaging quality of weak-phase bulk materials represented by graphene and nonspiral biological samples represented by intracellular polyvesicles.


Introduction
At present, the traditional CMOS process is close to the limit of development, and the traditional means of improving the performance of nanoelectronic devices by reducing the device size will become less and less feasible in the foreseeable future. Application requirements such as high-performance computing and big data have put forward higher requirements on the computing speed and reliability of electronic devices. In recent years, with the continuous research of image processing technology in the field of computer, the emergence of electron microscope provides the possibility for people to explore the mystery of the micro world. After years of development, it has become an indispensable tool in modern science and technology. For nanomaterials, the size and distribution of nanoparticles determine the physical and chemical properties of nanomaterials. Therefore, the measurement and characterization of nanoparticle size are an important aspect of nanomaterial structure research, especially the measurement of nanoparticle distribution has important practical significance. Nanoparticle recognition refers to the extraction and analysis of particle features in nanoparticle images. Transmission electron microscopy (TEM) is an important tool for characterizing nanomaterials [1]. It can observe the submicroscopic or ultramicrostructure which cannot be seen under the optical microscope below 0:2 μm.
Strzeciwilk et al. describe the results of TEM training at TiC Crystal and Co. Teak crystals are prepared using high temperature superconductivity (HTS) technology using cobalt as high temperature oil. The physical structure of the crystal is investigated by natural metal. X-ray phase analysis of the samples was performed. Li et al. focused on the study of twins in bulk metals FCC and BCC and their effects on the mechanical properties of all metals. It is possible that these unique defects are directly related to the properties of the macro machine that uses the flexible mounting tool to simultaneously degrade the nanomachine and the nanoimage [2,3]. Mayer et al. combine double-angle shear geometry and flat-bore compression at nanointerter to determine the mechanical properties of these films under shear stress. In order to further explain the voltage attenuation failure device, TEM-mounted tests were performed on TEM sheets with dual markers. Aluminum layer thicknesses of 50 nm and 100 nm were used to indicate the effect of the restriction on deformation. Compared to the 100 nm sample (423 ± 28:7 MPa), the tensile strength of the 50 nm sample is higher (690 ± 54 MPa) [4]. Shen and Sun introduce external fields such as electronics, thermal energy, light field, and electricity to TEM, which can create a nanolaboratory at TEM and compare real-world environments. Therefore, in addition to static structural design, the indoor TEM can also recognize the capabilities of the two-dimensional material structure and the evolution of performance. This extension is expected to handle and create two-dimensional materials in individual size, providing the necessary features and properties for future applications [5]. Lyon et al. reduced Au to water-soluble gold-plated iron magnetic oxide nanoparticles with a diameter of 60 nm on the surface 2-Fe2O3 or Fe3O4 oxidized particles partially from recycled hydroxylamine. The morphology and optical properties of the core/shell particles depend on the amount of gold deposited, while the magnetic properties are very independent of the amount of gold added [6]. Wei et al. solve this problem by synchronizing 30 nm nanoprecipitation via Ostwald maturation. When the prefrontal cortex has a large swelling of the membrane, 2 hours of boiling or 10 days of ambient aging allow the gelatinous material to grow into a nonuniform nanoparticle [7]. Nayral et al. prepared core-core nanocomposites consisting of a sn0 core and a thin-layer tin oxide with thermal decomposition of [{Sn (Nm2) 2} 2] containing a small amount of water control in anisole. The particles are exposed by electron microscopy (TEM, HRTEM, and SEM), X-ray diffraction (XRD), photoelectron spectroscopy (XPS), and Mossbauer (Mssbauer) spectroscopy. TEM micrographs show the magnitude of a particle's rotation, and their distribution depends on the initial test conditions, such as temperature, time, water concentration, and pretin concentration [8]. Copolymers of ε-caprolactone and L-lactide (pCLLA) with different monomer fractions were synthesized at the rate of GEH polymerization and the drug accumulated in large amounts of PCL, PLLA, and their copolymers were prepared by precipitation. Large particles are indicated by XRD, TEM, and attenuation luminescence. The size of LiYF4 molecules can be adjusted by converting the F ratio to lanthanide ions. After passivation with oleic acid ligands, LiYF4 nanoparticles can be readily dispersed in various nonpolar liquids, such as hexane, cyclohexane, dichloromethane, and toluene [9,10].
This paper mainly introduces the transmission electron microscope, image edge segmentation method, and random forest algorithm. In this paper, based on the random forest algorithm, a multirandom forest algorithm is proposed. Due to the different gray levels of images referenced by the multirandom forest algorithm, the segmentation results are processed by FCM clustering algorithm. The experimental results show that the multirandom forest algorithm achieves high accuracy in the segmentation of nanoparticles. The electrodes prepared by this technique can be easily improved into excellent ohmic contacts when integrated with nanomaterials, which can reduce the influence of contact resistance on the measurement of electrical properties. In addition, the technology realizes the adjustable number, size, and spacing of electrodes, and it is easy to obtain contact resistance information by multiterminal electrical measurement, so as to obtain more reliable electrical properties.

TEM and Nanoparticles
2.1. Transmission Electron Microscope. Since the advent of the world's first transistor in 1947, integrated circuits based on microelectronics technology have greatly changed human production and lifestyle. During this period, the development of integrated circuits has always followed Moore's law, that is, the number of integrated transistors per unit area doubles every 18 months, and the critical size of transistors shrinks by a factor of 0.7 every 18 months. By 2009, the feature size of the marketed microprocessors in integrated circuits has reached 45 nm, the 32 nm size is brewing into mass production, and the industry and academia have aimed at 22 nm.
Transmission electron microscope (TEM) is one of the important tools to detect the micromorphology, crystal structure, and chemical composition of materials. It uses a short wavelength high-energy electron beam as the incident light source [11]. Under a certain accelerating voltage, the electron beam converges through the electromagnetic lens and passes through the sample, thus obtaining the subangstrom spatial resolution.
TEM is generally composed of three parts: electronic optical part (lighting system, imaging system, observation, and recording system), vacuum part (vacuum system and vacuum display instrument), and electronic part (various power supply, safety system, and control system). Electron optics is the core part of electron microscope. According to the different types of electron gun in lighting system, TEM can be divided into thermal emission transmission electron microscope and field emission transmission electron microscope. In TEM, an incident electron beam is generated by heating the filament with lanthanum hexaborate (LaB6). Tungsten wire is used as electron emission source of field emission TEM. Under the strong electric field, the internal electrons will be emitted from the filament surface above the barrier due to the tunneling effect. Compared with thermal emission, field emission can produce electron beam with higher brightness, better coherence, and single wavelength. Combined with the TEM-SPM technique, the structuredependent in situ electrical measurement experiments were carried out on a variety of nanomaterials. First press the gold tip of the STM with the gold electrode inside the sample holder. It was then slowly separated under TEM observation until atomically sized gold nanowires were obtained. Since the entire stretching process can be imaged in TEM, the width of the nanowires is controlled to be only a single atom wide.
(1) Lighting system The electrical system is essentially an electrical circuit breaker, a condenser, an electronic pistol, and a printer. Your job is to provide a light source with high brightness, low beam angle, good contrast, and stable beam. In order to meet the requirements of the dark field image, the light beam can be adjusted to 2-3 degrees.
(1) Electron gun The electron gun is the light source that emits electrons. It is actually an electrostatic lens composed of cathode, grid, and anode. The cathode is the source of free electrons. There are usually direct heating and close contact heating as well as cathode separation, each of which remains independent. In electron microscopy, the cathode is usually made of heated filament and tungsten metal, which has the characteristics of low cost, low brightness, and short life. The cathode is the source of free electrons. Once the cathode is heated, it can produce free electrons, anode, and cathode electric field. The anode can attract the cathode that emits free electrons and change its motion state from chaos to orderly orientation. After the cathode grid is biased, it can produce the convergence effect of the electron beam, that is, to gather to the central axis, so that the electron beam is in the center of the axis the movement can be carried out through anode and injection gun to form the required light source to irradiate the sample.
Within a certain limit, the amount of free electrons emitted by the filament is proportional to the heating current intensity, but after this limit is exceeded, the current continues to increase, which can only reduce the service life of the filament, but cannot increase the amount of free electrons emitted. We call this critical point the filament saturation point, which means that the emission of free electrons has reached "full capacity" and can no longer be added. In normal use, the heating current of the filament is often adjusted and set at a position close to saturation, which is called "undersaturation point." In this way, the service life of the filament can be extended to the maximum extent under the condition that a large amount of free electron emission can be obtained.
The grid is located between the cathode and anode, near the end of the filament. It is a cap-shaped metal object with a small hole in the center for the electron beam to pass through. Apply a negative voltage of 0-1000 v (cathode) to the grid. This negative voltage is called gate bias, its height is different, and users can adjust it according to their needs. The grid bias voltage can make the electron beam converge to the central axis and control and restrain the electron emission on the filament to a certain extent.
The working principle of the electron gun: under the action of the filament power supply, the current flows through the cathode of the filament and heats it to above 2500°C. Free electrons are generated and escape from the surface of the filament. When the power is turned on, an accelerating voltage is generated. The positive charge generated on the anode surface forms a positive electric field, and the free electrons on the cathode surface escape after being affected by the electric field and are emitted by the electron gun to form a power supply. In the process of electron microscope, the filament can be adjusted to the low saturation point, and the beam current can be controlled by adjusting the gate bias voltage.
In the electron microscope, the acceleration voltage is also adjustable, so as long as the acceleration voltage is increased, the penetration can be enhanced, because the acceleration of voltage will reduce the wavelength, and the smaller the wavelength, the stronger the penetration. Although this can improve the resolution, but also brings the corresponding disadvantages, that is, the reduction of imaging contrast. Therefore, when the application of highresolution observation is not pursued, a lower acceleration voltage can be selected to obtain a larger imaging contrast, especially for biological samples with low contrast, it is sometimes advantageous to choose a lower acceleration voltage.
(2) Condenser The capacitor is under the gun. The condenser is composed of a first condenser and a second condenser. The purpose of setting a condenser in the electron microscope is to gather the electron beam emitted by the electron gun into a spot with uniform brightness and adjustable irradiation range and project it on the sample below. After the electron beam passes through the capacitor, a uniform spot with adjustable irradiation range is formed and projected onto the sample. The first condenser is a strong magnetic field lens, and the second one is a weak magnetic field lens. All levels of capacitors are used together to adjust the diameter of the light beam spot, so as to change the intensity of illumination brightness. The corresponding adjustment knob is generally set on the control panel of the electron microscope. The first concentrator and the second concentrator have different magnetic pole shape and working current, so the first concentrator has stronger magnetic field strength, while the 3 Journal of Nanomaterials second concentrator has lower magnetic field strength. The method of changing the brightness by adjusting the capacitance current is actually an indirect method. The maximum brightness is limited by the electron beam. In order to change the brightness of the light to a greater extent, the size of the electron beam can be fundamentally changed by adjusting the gate bias voltage in the electron gun mentioned above. The main requirements for magnifying imaging lenses such as intermediate mirrors and projection mirrors are to obtain the highest magnification required for high resolution and the lowest magnification required to find a suitable field of view under the condition of shortening the height of the lens barrel as much as possible. It is also hoped that their aberrations, distortions, and axial astigmatism are as small as possible when conducting electron diffraction image analysis, doing special observations such as selectedarea diffraction and small-angle diffraction.
The condenser is located below the electron gun and is generally composed of one stage, which are called the first and second condensers in order from top to bottom. The purpose of setting the condenser in the electron microscope is to condense the electron beam emitted by the electron gun into a light spot with uniform brightness and adjustable illumination range and project it on the sample below. The structures of the first condenser and the second condenser are similar, but the shape of the pole piece and the working current are different, so the strength and use of the magnetic field formed are also different. The first condenser is a strong magnetic field lens, and the second condenser is a weak magnetic field lens. The condensers of all levels are used together to adjust the diameter of the illumination beam spot, thereby changing the intensity of the illumination brightness. Generally, it is set on the electron microscope control panel. There are corresponding adjustment knobs.
(2) Imaging system The sample chamber is under the condenser, and there is a sample stage for loading the sample. The sample stage must be able to move on the horizontal plane and direction to select and move the observation field. Correspondingly, it is equipped with a joystick or a rotating handwheel, which is a precise adjustment mechanism to move left and right in a certain direction. Modern high-end electron microscopes can be equipped with a computer-controlled motor-driven sample stage, which strives to be accurate when moving, stable when fixed, and can make label-type positioning marks on the sample by the computer, so that users can rely on it when they need to do retrospective comparison. Computer positioning search is difficult to achieve in manual selection operations.
Because of the short electron wavelength and weak penetration, it is necessary to make very thin samples. At this time, ultrathin slicing machine is needed for cutting. In order to achieve better cutting effect, diamond cutter or special glass cutter is required for ultrathin slicer. The sample is first installed on the copper wire and then fixed on the sam-ple table. The sample table and the sample holding rod are integrated, which is a very fine part. There is an O-shaped rubber sealing ring in the middle of the sample bar, and the surface of the sealing ring is coated with vacuum grease to isolate the vacuum between the sample chamber and the outside of the mirror body.
(2) Objective The objective lens is the most important part of electron microscope. Its function is to keep the phase of the elastic scattering beam converging on the focusing plane from the difference direction of the sample. A scattering pattern containing the sample structure or diffraction pattern will converge the elastic scattering beam of the same sample point on the image plane to form the sample group corresponding to the microscopic image. The quality of TEM depends on the quality of objective lens to a great extent.
The objective lens is a strong magnetic lens with a very short focal length, which requires extremely high working conditions such as material purity, processing accuracy, and pollution conditions during use. The core problem of improving the resolution index of an electron microscope is the comprehensive assessment of the performance design and process manufacturing of the objective lens. The focal length is as short as possible, the aberration is small, and the space is expected to be large, which is convenient for sample manipulation, but there are many contradictory links in the middle.
The function of the objective lens is to enlarge the main image, change the working current of the objective lens, and adjust the focal length. An electron microscope is used to change the operating current of the objective. After passing through the sample, the electron beam is projected onto the objective lens to form the first image, which usually determines the imaging accuracy. If there is an error in this kind of imaging, even if the error is very small, it will be displayed at a higher magnification once it is amplified.  Journal of Nanomaterials In the TEM-SPM method, the Schottky contact between the sample and the electrode is easy to form, which affects the measurement of the electrical properties of nanomaterials. Currently, TEM-SPM optimizes the contact between nanomaterials and electrodes by applying Joule heat generated by a suitable current. The contact Schottky resistance obtained in this way is large, the resistance difference between different contacts is obvious, and the TEM-SPM method is difficult to improve to the ohmic contact.

Medical Ultrasound Imaging Based on Edge
Segmentation Method. Edge is the important visual information contained in the image, and it contains most of the information of the image [12]. Edge detection is a key step in image processing and machine vision. The effect of edge detection is very important for image analysis and understanding. Images contain a lot of information, but not all of it [13][14][15]. By edge detection, not only the structural attributes of the image are preserved but also the information irrelevant to the image processing target is eliminated, greatly reducing the amount of data contained in the image, and finally, the edge information we need is obtained [16][17][18]. The edge-based segmentation method is used to detect the gray change of the discontinuous position image in terms of texture, gray level, and color and reflect the gray level gradient, represented by ∇f ða, bÞ = ∂f /∂f i + ∂f /∂f j [19]. The edge detection operator eða, bÞ = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi f 2 a ða, bÞ + f 2 b ða, bÞ q is defined, which is the amplitude of ∇f ða, bÞ. To simplify the calculation, it can also be defined as the sum of the absolute values of the partial derivatives f a , f b : (1) Sobel operator Sobel operator image a point is as the center, in the neighborhood of 3 * 3D direction and the partial derivative of the direction [20,21]. The formula of Sobel operator is as follows: In the vertical direction: In the horizontal direction: Select a threshold T, if S 1 ðx, yÞ > T, it means there is edge passing in the vertical direction of ðx, yÞ, and ðx, yÞ is edge point. In the same way, if Sðx, yÞ > T, also means edge point in ðx, yÞ [22].
(2) Roberts operator The gradient in the Roberts algorithm can be seen as the difference between two pixels in any vertical direction. The Roberts operator, on the other hand, takes the difference between two adjacent pixels in the diagonal direction: Its gradient amplitude value is or The convolution operator is expressed as Select the close value T appropriately, if Rðx, yÞ > T, then, ðx, yÞ is the edge point.

(3) Laplace operator
Laplace operator is a second derivative operator, whose center of function is zero in the frequency domain is symmetric, so it has rotation invariance. This graph is processed by Laplace operator, and the pixel has the feature of zero gray mean. The Laplace transform of a two-dimensional graph function is the isotropic second derivative. The formula is as follows: Let us write it as a difference: The principle of a random forest algorithm is the development of many independent decision trees, and each decision tree can be trained independently with training samples [23]. Each decision tree is according to the training plan. In order to create decision trees, it is necessary to create a corresponding number of training programs. Creation of N training units is from an original training base with a statistical modeling process. The test samples are categorized according to randomly assigned subtrees, and the results of each background are summarized. As a powerful classifier, the random forest algorithm has a strong power.
Random forest algorithm has many excellent characteristics. Random forest algorithm can be applied in many fields and has achieved excellent performance. It has the following advantages: (1) the algorithm is simple and easy to understand and easy to implement; (2) it can detect the interaction between features in the training process; (3) it has good antinoise ability and good ability to deal with a certain amount of data loss; (4) it can be processed in parallel. When the nearest neighbor field is initialized, a 5 × 5 window is used to sample the reference image set a uniformly and independently, and a set of 8000 effective blocks is obtained.

Experimental Design
In the process of image block matching, the matching block of the block to be searched is searched step by step. Table 1 shows the experimental results of one query block under three different search steps and calculates the best five matching blocks. Di represents the distance between the query block and the 6-neighborhood block.
The weights of the corresponding tag matching blocks are extracted and optimized. Six query blocks are selected, and the similarity weights between the optimal matching of each query and the five blocks are calculated according to the formula.
From Tables 1 and 2, we can get the d i and w i values of each query block, search out the optimal image matching block of the query block, and finally extract the optimal matching block for weighting to reconstruct the initial segmentation results of nanoparticles.

Experimental
Steps. In this experiment, n reference images with different gray levels are extracted from database X and y for decision tree algorithm processing: (1) generate n-ary tree through training set; (2) analyze the path generation rules of n-tree generated; (3) predict or classify new data according to the generated rule set. After processing, n decision trees are generated, and a single random forest is collected to form multiple random forests. Input the image a to be segmented and output the segmentation result of image a of each random forest classifier. In the experiment, n different random forest classifiers are used to get the segmentation results of N graphs a. After getting n different segmentation results, FCM clustering algorithm is used for processing. The steps of FCM clustering algorithm are as follows: (1) The gray values of N pixels with the same coordinates in the segmentation results are extracted, and the X * y samples with sample size n are finally obtained (2) According to the obtained x * y samples of N, the probability of the points expressed as nanoparticles in each sample s is calculated. Let n ða, bÞ be the number of points labeled as nanoparticles in row a and column B of N segmentation results, and P ða, bÞ is the probability of points labeled as nanoparticles in column A and column B in n segmentation results (3) By calculating the probability p of nanoparticles for all the sample data, we can construct the probability map of the base film obtained by N results (4) FCM clustering is performed on the calculated probability graph (5) Through the above four steps, after completing the classification of X * y samples, the postprocessing of N segmentation results is completed. After constructing the probability map of nanoparticles, the structure of nanoparticles was extracted by FCM clustering, and the segmentation results with high accuracy were obtained after optimization

Analysis of Experimental Results
4.1. Evaluation of Image Segmentation Accuracy. In this paper, the segmentation results are compared with the    The distance value Di between query block  and 6 domain block  D1  D2  D3  D4  D5  D6   4  38  65  295  85  125  315  2  59  315  65  326  106  178  1  79  48  71  35  105  299   6 Journal of Nanomaterials manual segmentation golden standard image, and the Jaccard index is used to evaluate the segmentation results. Jaccard index is a geometric similarity measure function. The larger the Jaccard value, the better the segmentation performance. The formula is as follows: In the formula, a and B are the results of manual segmentation and automatic segmentation, respectively, and the overlap rate of nanoparticle regions between the two results is calculated. The similarity coefficient is between [0,1]. The Jaccard value is 1 when the manually segmented nanoparticle region completely overlaps with the auto segmented basement membrane region, and 0 when there is no overlap term. The closer to 1, the higher the similarity, the better the segmentation effect.
In this paper, we use multiple random forest algorithm, watershed segmentation method, and maximum entropy threshold segmentation to detect TEM images of 800 groups of nanoparticles. Jaccard similarity coefficient of three different methods is shown in Table 3.
As can be seen from Figure 1, the minimum Jaccard coefficient obtained by the multiple random forest algorithm is 89%, and the highest is 95%. The lowest and highest Jaccard coefficients are 86% and 92%, respectively. The lowest and highest Jaccard coefficients are 45% and 58%, respectively. For the same group of images, from left to right is    Figure 3: The influence of sample number on segmentation results. 7 Journal of Nanomaterials corresponding to the multirandom forest algorithm, watershed segmentation method, and maximum entropy threshold segmentation Jaccard coefficient.

The Size of Sample Block Affects the Segmentation Result.
In the initialization process, the size of sample block directly affects the accuracy of segmentation results. In this experiment, eight groups of images are selected to calculate the influence of sample block size on the segmentation results of each group, as shown in Figure 2.
As can be seen from Figure 2, when the size of the sample block is less than 5 * 5, the segmentation accuracy does not change much; when the size of the sample block is greater than 5 * 5, the segmentation accuracy begins to decline. Considering the segmentation results and computational complexity, the computational complexity of 5 * 5 size is less than 3 * 3 size in the case of low image accuracy. Therefore, the size of the sample block is suggested to be 5 * 5.

The Influence of the Number of Evenly Distributed
Samples on Segmentation Results. In the process of image block matching, the number of evenly distributed samples directly affects the result of image segmentation. In this experiment, we selected 8 groups of images to calculate the effect of sample size on the segmentation effect of each group of images, as shown in Figure 3.
The smaller the number of samples, the worse the segmentation effect. This is mainly because the sample block contains too little information, resulting in poor matching effect and resulting in poor segmentation effect. When the number of samples is more than 7500, the accuracy of segmentation has little change. Considering the segmentation results and computational complexity, this paper suggests that 7500 is the most suitable sample size.

The Influence of the Number of Random Forests on
Segmentation Results. In the process of multirandom forest algorithm segmentation, the number of constructed forests has a direct impact on the image segmentation results. In this experiment, eight groups of images are selected, and the influence of the number of forests on the segmentation effect is calculated.
It can be seen from Figure 4 that the segmentation effect is gradually enhanced with the increase of the number of selected forests (n ≤ 35). This is mainly because the information of gray distribution is too little, which will lead to poor matching effect and poor segmentation effect. When the number of random forests is 15, the segmentation accuracy of 8 groups of images is very different. The main reason is that when building multiple random forests, some images will choose the training images with similar gray levels, so the segmentation accuracy is higher than other images. With the increase of the number of random forests, the segmentation accuracy of 8 groups of images is gradually improved. When the number of trees is more than 35, the segmentation accuracy changes little. Considering the segmentation results and computational complexity, the number of forests should be set to 35.
The experimental results show that in terms of image segmentation accuracy, the Jaccard coefficient obtained by the multiple random forest algorithm is significantly better than watershed segmentation method and maximum entropy threshold segmentation and is more suitable for the segmentation of nanoparticles. Multiforest algorithm uses multiple random forest classification. When the number of forests is large enough, there will always be one or more training images whose gray value is close to the gray value of the segmented image. It overcomes the problem of low image accuracy caused by gray difference between different images and improves the segmentation accuracy of nanoparticles. When the size of the sample block is less than 5 * 5, the segmentation accuracy does not change much when the size of the sample block is less than 5 * 5; when the size of the sample block is greater than 5 * 5, the segmentation accuracy begins to decline. It is suggested that the size of the sample block should be 5 * 5. When the number of samples is more than 7500, the accuracy of segmentation does not change much. With the increase of the number of selected forests (n ≤ 35), the segmentation effect is  Journal of Nanomaterials gradually enhanced. When the number of trees is more than 35, the segmentation accuracy changes little. When the multiple random forest algorithm is used, the best result is when the number of forests is set to 35.

Conclusion
With the development of materials science, nanoparticles have large specific surface area, small particle size, high surface energy, and unique nanoeffect. The morphology of nanoparticles is a key factor affecting the properties of materials.
In this paper, we mainly study the image recognition of TEM nanoparticles. We mainly introduce transmission electron microscopy, image edge segmentation, and random forest algorithm. In this paper, based on the random forest algorithm, a multirandom forest algorithm is proposed. Due to the different gray levels of images referenced by the multirandom forest algorithm, the segmentation results are processed by FCM clustering algorithm. This paper improves the imaging quality of TEM for weak phase bulk materials and biological samples, builds a multielectrode TEM in situ electrical platform based on microchips, realizes pollution-free etching with atomic precision, prepares nanodots, and observes coulombs. The blocking phenomenon was observed, the nanowire-induced fracture process was observed, and the nanowire fracture mechanism was studied. The minimum and maximum Jaccard coefficients obtained by multiple random forest algorithm are 89% and 95%, respectively. The lowest and highest Jaccard coefficients are 86% and 92%, respectively. The lowest and highest Jaccard coefficients are 45% and 58%, respectively. The Jaccard coefficient of the proposed algorithm is higher than that of watershed segmentation and maximum entropy threshold segmentation. In the aspect of automatic image segmentation of nanoparticles, the image segmentation accuracy is the highest when the sample block size and the number of sample blocks selected in the multiple random forest algorithm are 5 * 5, 7500, and 35, respectively. As the feature size of CMOS shrinks to the nanometer scale, the electromigration of metal interconnects seriously affects the reliability of microelectronic devices. After the metal nanowires are prepared on the microchip, the microscopic dynamic changes in the metal electromigration can be directly observed by using the TEM in situ electrical technology, and the metal electromigration mechanism can be further studied, thereby providing a guarantee for increasing the reliability of electronic devices. Using TEM in situ electrical technology to study the working mechanism of new memory devices, new memory devices such as resistive memory and phase change memory have attracted much attention because of their fast speed and high storage density. Uniformity is an urgent problem to be solved in the large-scale application of these new memory devices. After the new memory device is fabricated on the microchip, the working process of the device is directly observed by TEM in situ electrical technology, and the working mechanism of the device is analyzed, thereby reducing the uniformity problem of the new memory device.
In this paper, the multirandom forest algorithm is proposed because of the randomness of the automatic segmentation method of nanoparticle image. The next step is how to improve the speed of automatic segmentation of nanoparticle image and ensure the accuracy of image segmentation.

Data Availability
No data were used to support this study.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this article.