*3.2. Implementation Details*

We implement HANet using the popular PyTorch 1.2.0 library in Python. We apply Adam optimization with learning rate of 0.001, which is reduced by a factor of 2 if no improvement is observed in the validation performance over five consecutive epochs. The NJUD dataset [31] containing more than 2000 images and the NLPR dataset [32] containing 1000 images corresponding pixel-level ground truths are used to evaluate the proposed HANet. We follow the datasets splitting scheme proposed in [18,21], 80% are used for training and the remaining 20% for test. All the images are resized to 224 × 224 pixels. The network is trained over 100 epochs with early stopping, and a minibatch of 2 images is used at every training iteration. In this study, HANet was trained on a computer equipped with an Intel i7- 7750H CPU at 2.21 GHz and an NVIDIA GeForce GTX TITAN Xp GPU.
