Thin vessel segmentation is an active research problem, with an emphasis on finding a universal approach for different types of fundus datasets. Enhancement of the thin vessels is the first and foremost task for proper segmentation, which is proposed to be done with the total variation (TV) decomposition method with layer-selective enhancement and illumination correction. The vessel segmentation task is carried out on two fronts. For thin vessels, we propose the attention UNet backbone, and for thick vessels, the modified Frangi method is used. The method is trained and tested on HRF, CHASE_DB1, and DRIVE datasets with accuracy of 96.73%, 96.38%, and 94.97%, and sensitivity of 92.66%, 81.05%, and 87.56%, respectively. The method was cross-validated on the STARE dataset with an accuracy of 96.30% and a sensitivity of 93.69%. The sensitivity performance surpasses the state of the art.