Deep learning methods for many medical image segmentation task encounter challenges like smaller datasets and class imbalance. This study proposes a variant SegNet (vSegNet) designed to deliver significantly accurate and reliable segmentation results on such datasets. The novelty lies in designing encoder and decoder blocks with an appropriate number of convolution layers and using the Dice score and Hausdorff distance (HD) as compound loss function in learning. This study used public datasets consisting of chest X-rays, axial CT slices, foot ulcer images, and subset of SPIDER dataset to benchmark segmentation task of the proposed neural network model with other popular networks like U-Net, SegNet, DeepLabv3+, VGG16, MobileNetV2, and fully convolutional network (FCN). For the segmentation of lungs in chest X-rays, vertebral body in CT, augmented data for the previous case, foot ulcer dataset, and segmentation of vertebrae, intervertebral disks and spinal canal in SPIDER dataset (MRI dataset) respectively, the proposed vSegNet performed with a Dice score of 0.96 ± 0.01, 0.90 ± 0.20, 0.95 ± 0.02, 0.86 ± 0.07, and 0.95 ± 0.01 and the HD of 14.33 ± 7.74, 8.45 ± 7.08, 7.99 ± 6.05, 29.32 ± 25.64, and 8.45 ± 2.81 with respect to the ground truth on the test dataset. These results highlight the effectiveness of the proposed model in delivering both higher segmentation accuracy and improved boundary delineation. The proposed network, vSegNet has demonstrated as an effective model for semantic segmentation on class-imbalanced smaller datasets, surpassing all other networks considered in this study in terms of mIoU, BF score, Dice score, HD, accuracy, precision, recall and F1 score on a variety of anatomical regions and medical imaging modalities.