# Fast 3D Reconstruction of UAV Images Based on Neural Radiance Field
## 2 Methodology  
Neural radiance fields represent a 3D scene as a function with a 5D vector as its input. This function can be modeled using a neural network, allowing any scene in space to be represented by learning the parameters of the neural network. This approach enables scene reconstruction. Given a set of UAV images I = I1,..., In, the corresponding camera pose P = (R1! t1,...,Rn! tn), camera internal parameters K = k1,..., kn in the pixel plane, a and sampling point (u, v), a ray is generated from the camera optical center o-(u, v), a series of three-dimensional points x = (x, y, z) is sampled on the ray, and the direction vector of all points is d = (\(\theta\), \(\varphi\)). In Figure 0(a), a depiction of points sampled along the camera ray is presented. Each individual point is characterized by a five-dimensional vector. Progressing to Figure 0(b), this five-dimensional vector is utilized as input within a neural network framework. The resultant outcomes encompass both RGB values and volume density, denoted as \(\sigma\). Figure 0(c) elucidates the transformation of these derived values into images, employing the methodology of volume rendering [13]. Ultimately, as demonstrated in Figure 0(d), the rendered image and the original image are juxtaposed to compute a loss value. Subsequently, this loss value serves to iteratively refine the neural network's parameters. Since the neural network is a fully connected network (MLP), it faces limitations in simultaneously capturing both low-frequency and high-frequency information within the scene. The low-frequency information is converted into high-frequency information via Fourier transform [21] using position coding. The mapping function \(\gamma(\mathbf{p})\) is expressed as follows:  
\[\gamma(\mathbf{p})=(\sin(2^{0}\pi\mathbf{p}),\cos(2^{0}\pi\mathbf{p}),\;\ldots, \;\sin(2^{L-1}\pi\mathbf{p}),\cos(2^{L-1}\pi\mathbf{p})) \tag{1}\]  
In Formula (1), \(\mathbf{p}\) represents the vectors that need to be input into the neural network. \(\Gamma(\cdot)\) is applied to each coordinate vector of \(\mathbf{x}\) and each direction vector value of \(\mathbf{d}\). The hyperparameter \(\mathrm{L}\) is determined using experimental analysis. The optimal value for the hyperparameter \(\gamma(\mathbf{x})\) is found to be 10 when \(\gamma(\mathbf{d})\) is set to 4, resulting in vectors of dimensions 60 and 24 for \(\gamma(\mathbf{x})\) and \(\gamma(\mathbf{d})\), respectively. The following Figure 2 is the structure of the neural network:  
In Figure 2, the process begins with the input location vector (\(\gamma(\mathbf{x})\)), which undergoes a sequence of transformations through 8 successive fully connected Rectified Linear Unit (ReLU) layers. Each of these layers comprises 256 channels, contributing to the extraction of complex spatial features. Subsequently, an extra layer serves a dual purpose: it produces the volume density parameter (\(\sigma\)), which is subjected to rectification via a ReLU activation to guarantee its non-negativity while concurrently generating a 256-dimensional feature vector. This feature vector is fused with the input viewing direction vector (\(\gamma(\mathbf{d})\)) and processed through an additional fully connected ReLU layer with 128 channels. This amalgamation enriches the model's capacity to capture nuanced correlations between features and viewing angles. The ultimate step involves a sigmoid-activated layer that produces the emitted RGB radiance at position \(\mathbf{x}\), as observed from a ray directed along \(\mathbf{d}\). The color value \(\mathrm{C}=\) (r,g,b) and the volume density \(\sigma\) obtained from the neural network's output are utilized in the process of volume rendering to derive the final pixel value. The loss between the volume rendering result and the original image is calculated and used as feedback to continuously optimize the reconstruction outcome. Figure 1: An overview of neural radiance field scene reconstruction.