# Enhanced Localisation and Handwritten Digit Recognition Using ConvCARU
## 3 Proposed Method
### Feature Extraction from Frame Sequences  
The original GAN model presents several challenges in practical applications, including exploding and vanishing gradients. These issues make direct implementation problematic. The DCGAN framework has been rigorously tested and proven to be a versatile and effective solution to these issues, and is often cited in real-world applications. Its architecture is based on convolutional operations in the generator and transposed convolutional operations in the discriminator, creating a mirror-symmetric structure between the two components. A key benefit of the DCGAN framework is its ability to stabilise training and improve feature learning. Incorporating deep convolutional layers has been shown to enhance the quality of generated images while mitigating issues typically associated with standard GANs. Additionally, techniques such as batch normalisation and eliminating fully connected (FC) layers have been shown to contribute to improved convergence and performance [56]. In DCGAN architecture, traditional pooling layers in generative models are replaced by transposed convolutions with a stride mechanism, and those in discriminative models are replaced by stride convolutions to reduce spatial resolution. These design choices pave the way for more stable training processes, establishing the DCGAN as a fundamental model for many generative tasks. This strategic shift enables improved feature preservation and more controlled transformations. The mathematical underpinnings of these operations are governed by the following equations:  
\[X^{\prime} =\frac{X-K+2P}{b}+1 \tag{1}\] \[X =b\big{(}X^{\prime}-1\big{)}-2P+F \tag{2}\]  
The kernel employed in transposed convolutions is represented as \(F\times F\), and the stride \(b\) in both equations aligns with the standard formulas for convolutions and transposed CNNs, reinforcing this interpretation. Thereby, this kernel is represented as \(K\times K\). \(X\times X\) denotes the image dimensions. The rationale behind these equations is that FC networks often introduce an excessive number of parameters, which increases the likelihood ofoverfitting. \(P\) denotes the padding used in both operations and encapsulates the step parameter common to convolutional processes.  
The FC layer is replaced by average pooling layers within these formulations to enhance the stability of neural network models. An effective method of accelerating convergence is to establish direct connections between the generator input and the features extracted from the convolutional layers. Meanwhile, the discriminator output is linked to the feature maps derived from the same convolutional structures. To further improve performance, adaptive learning rate strategies can be employed to minimise oscillations during optimisation. Therefore, the careful selection of regularisation techniques improves generalisation and avoids issues associated with high variance in complex network architectures. In practice, applying normalisation techniques throughout the architecture alleviates the issue of excessive bias arising from a large number of network layers. The activation function used by the intermediate hidden layers within the gradient generation is the Leaky Softplus function, which optimises gradient flow and prevents neuron inactivity [57]. Meanwhile, the output layer uses the Sigmoid activation function to ensure smooth transitions in the produced data. In contrast, the discriminator uniformly applies the Maxout activation function across all layers to enhance model expressiveness and adaptability [58]. This refined approach provides superior spatial manipulation, allowing more precise control over feature distribution and mitigating the distortions typical of conventional downsampling methods.