Specular highlight detection and removal,with the primary objective of accurately identifying highlight regions exhibiting mirror-like reflection characteristics and precisely recovering the underlying pixel information,constitute a fundamental research topic in computer vision and image processing. This technology demonstrates considerable practical value across various visual applications,including object detection,medical image analysis,industrial defect identification,and 3D imaging. From an optical perspective,the specular highlight phenomenon originates from the directional reflection behavior of incident light on smooth non-Lambertian surfaces,and its physical mechanism is theoretically describable through Fresnel equations. Traditional highlight removal methods typically rely on strict physical assumptions,which primarily encompass three classical approaches: 1) chromaticity space analysis-based techniques,2) illumination estimation-based algorithms,and 3) polarization information-utilizing solutions. However,these methods exhibit limited adaptability to complex and variable highlight removal requirements in real-world scenarios because of their constraints regarding specific scenes or object types. By contrast,deep learning-based highlight detection and removal techniques adopt a data-driven approach to automatically learn the complex nonlinear mapping relationships between highlight reflections and scene content,thereby effectively circumventing the dependency on prior assumptions inherent in traditional methods. The shifted window attention mechanism demonstrates unique advantages in highlight removal tasks and effectively addresses issues,such as texture information loss and color distortion,caused by specular highlights. This mechanism integrates local window partitioning with cross-window interaction,thus reducing computational complexity while maintaining global modeling capability. Building upon the exceptional modeling capability demonstrated by the shifted window attention mechanism during the feature extraction stage,this study proposes a two-stage mask-guided highlight removal network architecture. The proposed framework employs the shifted window attention mechanism to extract multiscale cross-channel features and utilizes highlight masks as prior knowledge to guide subsequent pixel recovery in highlight regions,thereby achieving highlight localization and removal. Notably,existing deep learning methods face challenges regarding insufficient training data. Current publicly available highlight datasets predominantly employ synthetic generation or laboratory-controlled lighting acquisition methods,failing to meet the requirements of real-world applications. To address this limitation,this study additionally constructs an in-situ automotive highlight dataset captured under multiple illumination conditions. This dataset has the following characteristics: 1) coverage of diverse natural illumination conditions,2) inclusion of complex background interference,and 3) precise pixel-level annotations,thereby providing a data foundation for enhancing model generalization performance in real-world scenarios.
In this study,we construct a real highlight dataset with cars as the main object,which is based on common cars in daily life with different highlight regions and intensities. Each pair of highlight images has its corresponding real highlight mask image. For highlight detection and removal,we propose a mask-guided two-stage highlight removal network (MG-TransUNet). This network explicitly divides the highlight detection and removal task into two phases. In the first phase,we train with a lightweight U-Net architecture to extract the highlight regions in the highlight images and generate the highlight mask map. In the second phase,a shifted window attention Transformer network that is based on the U-Net architecture is designed to recover the diffuse images of highlight regions by using the predicted highlight mask map as an a priori guide. Our experimental dataset is selected from three major public datasets (i.e.,paired specular-diffuse image dataset(PSD),specular highlight image quadruples(SHIQ) and synthetic specular highlight removal dataset(SSHR)) with our proposed automotive dataset. Among the four datasets,only SHIQ and automobile datasets provide highlight masks. To make our method trainable on the PSD and SSHR datasets,we subtract and threshold the highlight images and the corresponding specular no-highlight images from the two datasets to obtain the highlight mask for each pair of images. The highlight detection network is trained with the highlight images and masks at the first stage,and the obtained highlight masks are used as a priori information to guide the highlight removal task at the second stage. Our mask-guided highlight removal network is implemented by the Pytorch toolbox. The input images and ground truth maps are resized to 256 × 256 for training,the momentum parameter is set to 0.99,and the initial learning rate is set to 2 ×
Experiments are conducted on the proposed automotive dataset and three publicly available datasets to compare eight state-of-the-art methods. The quantitative evaluation metrics include the structural similarity index measure and peak signal-to-noise ratio (PSNR). Experimental results show that the PSNR value ranks second on the PSD dataset. It is improved by 1.11 compared with that in the model with second-best performance on the SHIQ dataset and by 0.38 compared with that in the model with the second-best performance on the SSHR dataset. Comparative experiments are also performed on automotive datasets to validate the effectiveness of the proposed dataset.
We propose a car highlight dataset for real scenarios and a mask-guided network incorporating a window-shift attention mechanism to perform the highlight removal task. The experimental results show that our highlight removal network can accurately recognize highlight regions and remove highlight images. The code link: https://github.com/chenWULUQI/MG-Trans_Unet.
| 科 Family | 属数 Number of genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) | 属 Genus | 种数 Number of species | 占总种数比例 Percentage of total species (%) |
|---|---|---|---|---|---|---|
| 鹅膏菌科Amanitaceae | 2 | 11 | 5.26 | 鹅膏菌属 Amanita | 10 | 4.78 |
| 小菇科 Mycenaceae | 2 | 12 | 5.74 | 丝盖伞属 Inocybe | 5 | 2.39 |
| 多孔菌科 Polyporaceae | 8 | 14 | 6.70 | 蜡蘑属 Laccaria | 5 | 2.39 |
| 红菇科 Russulaceae | 3 | 23 | 11.00 | 小皮伞属 Marasmius | 6 | 2.87 |
| 小菇属 Mycena | 11 | 5.26 | ||||
| 光柄菇属 Pluteus | 5 | 2.39 | ||||
| 红菇属 Russula | 17 | 8.13 | ||||
| 栓菌属 Trametes | 5 | 2.39 |