Page 44 - AJWEP-v22i3
P. 44

Umaha, et al.

                   ReLU activation and two additional residual blocks   Pandasa were used due to their efficiency in handling
                   with  256  filters.  Downsample  2: A  512-filter  3  ×   large  datasets  for numerical  computations  and  data
                   3 convolution with stride 2, followed by BN and   manipulation and analysis. Matplotlib was employed for
                   ReLU activation                                  data visualization, while OpenCV was used for image
                (v)  Upsample Layers: Upsample 1: Upsampling by a   manipulation. TensorBoard was used to monitor training
                   factor  of  two,  followed  by  a  256-filter  separable   metrics in real-time. In addition, the development and
                   convolution, BN, and ReLU activation. Upsample   training processes were carried out on Google Colab, a
                   2: Upsampling by a factor of two, followed by a   free cloud-based environment by Google for executing
                   128-filter  separable  convolution,  BN,  and  ReLU   Python code.
                   activation
                (vi) Final convolution layer (conv2): A 1×1 convolution   3.4. Computational resources
                   with the number of filters equal to the number of   The model was trained on an NVIDIA Tesla T4 GPU
                   classes (five), followed by a softmax activation to   available on Google Colab, with up to 12 GB of random
                   produce the final output segmentation map.       access memory.  The  Python environment  was set up
                  The training process and parameter settings involved   with Python 3.7, and all required libraries were installed
                the following:                                      through pip. Google Drive was used for storing datasets,
                (i)  Data  augmentation:  Techniques such as random   checkpoints,  and logs, ensuring  seamless  access  and
                   resizing, horizontal/vertical flipping, and cropping   management  of training data.  Figure  2 presents the
                   were applied to enhance the training dataset.    residual  block,  while  Figure  3A and  B illustrate  the
                (ii)  Loss function: Categorical cross-entropy was used   architecture of the proposed SpillNet model.
                   as the loss function, as expressed by Equation I:
                                                                    3.5. Algorithm for the training process
                                 ( )
                           N                                        Input:  SAR images  I  and  ground  truth  annotations
                                  
                L (y, ˆ = −y )  ∑ i  o lg y 1                 (I)   G, batch size B = 8, epochs E = 100, learning rate α = 1
                             y
                           = i  1
                                                                    × 10 , seed S.
                                                                        −4
                  where y represents the ground truth label,  ˆ y is the   1.  Load data: I and G into memory.

                predicted probability, and N is the number of classes.  2.  Initialize parameters:
                (iii) Optimizer: The Adam optimizer  was selected  for     S←random seed value
                   its  efficiency  and  adaptability  in  handling  sparse   B←8
                   gradients.                                              E←100
                (iv) Learning  rate:  The learning  rate was set to 1 ×         α  ←1×10 −4
                   10 , with  potential  adjustments  based on model   3.  Split data: (I train , G train ), (I , G )←split I and G into
                      -4
                                                                                              val
                                                                                                  val
                   convergence during training.                         training and validation sets.
                (v)  Batch size: A batch size of eight was used to balance   4.  For each epoch e from 1 to E:
                   memory constraints and training efficiency.             Shuffle (I train , G train ) using seed S
                (vi) Epochs:  The  model  was trained  for 100 epochs,         Set steps_per_epoch←[len (I train /B)]
                   with early stopping if the validation accuracy did         Set validation_steps←[len (I /B)]
                                                                                                     val
                   not improve for 20 consecutive epochs.                  For each mini-batch b from 1 to steps_per_epoch:
                (vii) Callbacks:  Various callbacks were employed,         (I , G )←Get a mini-batch of size B from (I train ,
                                                                             b
                                                                                b
                   including  EarlyStopping, ReduceLROnPlateau,            G train )
                   ModelCheckpoint, CSVLogger, and TensorBoard,            Data   augmentation:  I   ←Apply  random
                                                                                                 b
                   to monitor and adjust the training process.             resizing, flipping and cropping to I
                (viii) Training steps: The number of steps per epoch was   Preprocessing: I ←Normalize and resize I  to
                                                                                          b
                                                                                                                  b
                   calculated  based  on  the  size  of  the  training  and   224 × 224 pixels
                   validation datasets, ensuring all data were utilized.        Forward pass: ←SpillNet (I )
                                                                                                    b
                                                                           Compute loss: L←Categorical  Cross-Entropy
                3.3. Implementation tools and frameworks                   Loss (G ,)
                                                                                  b
                The development and training of the proposed model          Backpropagation  and update weights: Update
                were carried out using the TensorFlow framework and        SpillNet weights using
                Keras  library.  For data  pre-processing,  NumPy and         Adam optimizer and learning rate α.




                Volume 22 Issue 3 (2025)                        38                                 doi: 10.36922/ajwep.8282
   39   40   41   42   43   44   45   46   47   48   49