## 2 Materials and Methods
### The Dataset  
The traditional metrology method based on optical microscopy utilizes only the focal plane image, and the nonfocal plane images are discarded as useless information. For geometric dimensions extracted from the focal plane image, the measurement accuracy is limited by the optical resolution and focal depth of the microscope. The light intensity information out of the focal plane is also related to the sample shape, and reflects the geometric characteristics on some level. Figure 3 shows the process to construct a TSOM image. The TSOM setup captures a series of images as the sample scans through the focus of the microscope along the optical axis. The image sequence consists of an in-focus image and a series of defocused images of the sample. The acquired optical images are stacked at their corresponding scan positions, and there is a slight difference between any two adjacent images. The optical intensities in a vertical plane passing through the trench on the target can be easily extracted to construct a TSOM image. The X axes, Y axes, and grayscale represent the spatial position, the focus position, and the optical intensity, respectively. Figure 4 shows the SEM images of trench sections with different widths and depths. The insets are the corresponding TSOM images, which show obvious differences in intensity distribution. The width and depth can be extracted by establishing the one-to-one  
Figure 1: (**a**) Schematic and (**b**) photograph of TSOM setup. CCD, charge-coupled device; PZT, Piezoelectric Transducer.  
Figure 2: MEMS trench section diagram and its geometric parameters. W, width; D, depth.  
correspondence between geometric characteristics and TSOM images. Therefore, TSOM can break the limits of the optical resolution and focal depth.  
For the samples, each trench is 5 mm long. When collecting the TSOM image, 10 positions are randomly selected over each trench, as shown in Figure 5, and the part of the trench that is contaminated or close to the ends should be avoided. Each position is scanned through-focus to obtain a series of images. The scanning range is 250 \(\upmu\)m with a step of 2 \(\upmu\)m. Multiple lines are selected over each image with equal space, and we construct multiple TSOM images.  
For the HAR trench etch, the reactive-ion etch lag leads to differences in trench depths with different trench widths [6]. For example, the depths of 2 \(\upmu\)m, 10 \(\upmu\)m, and 30 \(\upmu\)m wide trenches etched simultaneously are 169 \(\upmu\)m, 321 \(\upmu\)m, and 443 \(\upmu\)m, respectively. It is difficult to obtain trenches of the same depth with different widths in a large range (e.g., 2 \(\upmu\)m\(\sim\)30 \(\upmu\)m). To alleviate the impact of the depth difference, the trench sets for width prediction consist of 4 trenches with widths around 2 \(\upmu\)m, 10 \(\upmu\)m, and 30 \(\upmu\)m, respectively, and the corresponding depths are approximately 169 \(\upmu\)m, 321 \(\upmu\)m, and 443 \(\upmu\)m. The depth prediction trench sets consist of 5 trenches with widths of 1.93 \(\upmu\)m, 10.3 \(\upmu\)m, and 30.3 \(\upmu\)m, respectively. The corresponding depth ranges are from 24 \(\upmu\)m to 169 \(\upmu\)m, 34 \(\upmu\)m to 321 \(\upmu\)m, and 37 \(\upmu\)m to 443 \(\upmu\)m. The highest aspect ratios are approximately 88:1, 31:1, and 15:1, respectively.  
Figure 4: SEM images of MEMS HAR trench sections with width and depth of (**a**) 1.98 \(\upmu\)m and 169 \(\upmu\)m, (**b**) 10.3 \(\upmu\)m and 321 \(\upmu\)m, (**c**) 30.3 \(\upmu\)m and 443 \(\upmu\)m, (**d**) 30.3 \(\upmu\)m and 37.3 \(\upmu\)m, (**e**) 30.3\(\upmu\)m and 131 \(\upmu\)m, (**f**) 30.3 \(\upmu\)m and 443 \(\upmu\)m (inset: corresponding TSOM images).  
Figure 3: Process to construct a TSOM image.