# On-the-Fly Machine Learning for Improving Image Resolution in Tomography
## 3 Method
### Machine Learning
The differences between the input and target grids are summarized in the first three columns of Table 1.  
The input and target voxel grids \(\widetilde{\mathbf{x}}^{\text{input}}\) and \(\widetilde{\mathbf{x}}^{\text{target}}\) serve to train the convolutional neural network. The voxel grids \(\widetilde{\mathbf{x}}^{\text{input}}\) and \(\widetilde{\mathbf{x}}^{\text{target}}\) are divided into slices \(\widetilde{\mathbf{x}}^{\text{input}}_{i},\widetilde{\mathbf{x}}^{\text{ target}}_{i},i=1,\dots,N\) as illustrated in Figure 4. In this article, \(\mathbf{x}_{i}\) denotes both a single voxel at position \(i\) and a horizontal slice \(i\) of a voxel grid \(\mathbf{x}\). The surrounding text always distinguishes between a voxel and a slice. The input slices are combined into slabs \(\left[\widetilde{\mathbf{x}}^{\text{input}}_{j}\right]_{j=i-s^{*}}^{i+s}\), \(i=s+1,\dots,N-s\), containing the input slice and the \(s\) slices above and below. The target slices are not combined into slabs. The training procedure now minimizes  
\[L_{s}(\varphi)=\frac{1}{N}\sum_{i=s+1}^{N-s}\left\|\text{Net}_{2s+1,\varphi} \left(\left[\widetilde{\mathbf{x}}^{\text{input}}_{j}\right]_{j=i-s}^{i+s} \right)-\widetilde{\mathbf{x}}^{\text{target}}_{i}\right\|_{2}^{2}, \tag{18}\]  
which yields the set of parameters, \(\phi\). Other norms, such as the L1 norm, could also be used. Multiple deep network architectures can be used to improve the quality of reconstructions [30; 31; 32; 33]. One of these is the mixed-scale dense (MS-D) network, which is a neural network architecture specifically developed for scientific settings. The mixed-scale dense network has several properties that make it well-suited for our method. The MS-D network has relatively few parameters compared to other neural network structures, making it easier to train and less likely to overfit. This is especially useful if a small training set is available, and no part of the training set is sacrificed to serve as a validation set, as is the case in this paper. Another advantage is that the MS-D network maximally reuses the intermediate images in each layer, thus requiring fewer intermediate images compared to other deep convolutional neural network architectures. Therefore, the MS-D network can transform large images  
Figure 4: Two voxel grids at different resolution. The low-resolution grid on the left can be up-sampled (\(\mathbf{U}_{k}\)) to a high-resolution grid. This transforms a _slice_ (in red, left) into a _slab_ (in green, right), which consists of multiple slices. The down-sampling operation (\(\mathbf{D}_{k}\)) performs the reverse transformation. Here, the up-sampling and down-sampling are performed with magnification factor \(k=4\), which increases or decreases the number of voxels in each dimension by a factor of \(k\). using less memory and computation time compared to other popular convolutional neural network architectures [33]. Finally, the network has shown good results for removing noise and other artifacts from tomographic images when a large training set of similar objects scanned at high dose is available. This is described in [34], where the network was applied to tomographic images reconstructed from a dataset of parallel beam projections, rather than cone beam projections.