Computer Science ›› 2026, Vol. 53 ›› Issue (5): 207-217.doi: 10.11896/jsjkx.251100057

• Computer Graphics & Multimedia • Previous Articles     Next Articles

uHairDet:Method for Synthetic Hair Image Generation and Detection in Androgenetic AlopeciaDiagnosis

CHEN Qi1,2, CHEN Xingkai1,2, ZHANG Huihuang1,2, SU Yiping3, HU Haigen1,2   

  1. 1 School of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China
    2 Zhejiang Key Laboratory of Visual Information Intelligent Processing, Zhejiang University of Technology, Hangzhou 310023, China
    3 Department of Dermatology, The First People’s Hospital of Lin’an District, Hangzhou 311300, China
  • Received:2025-11-12 Revised:2026-02-11 Published:2026-05-08
  • About author:CHEN Qi,born in 1977,Ph.D.His main research interests include machine learning and intelligent information systems.
    HU Haigen,born in 1977,Ph.D,professor.His main research interests include computer vision,machine learning and medical image processing.
  • Supported by:
    National Natural Science Foundation of China(62373324) and Zhejiang Province Leading Geese Plan(2025C02160,2026C02A1221).

Abstract: The clinical diagnosis of Androgenetic Alopecia(AGA) relies heavily on manual hair counting,a process that is time-consuming,subjective,and limits diagnostic efficiency.While automated hair recognition technology holds great promise,it faces challenges due to fine hair structures and a lack of pixel-level annotated data.To address this,this paper proposes uHairDet,a novel framework that minimizes dependency on manual annotations by leveraging synthetically generated data.The proposed approach consists of three key components:1)a hair synthesis with built-in annotations data generator(HBDG) for creating structurally plausible hair images with pixel-level labels;2)a structure-stable style-transfer GAN(BS-GAN) incorporating a semantic-aware adaptive error correction loss(HEE Loss) to enhance structural consistency;3)an FCOS+PSC detection model based on a Mean-Teacher framework,trained with a new oriented bounding box(OBB) annotation paradigm tailored for hairs to preserve critical information.Results demonstrate that the proposed method,requiring no manual labels,achieves a 56.9% AP,significantly outperforming baseline models and establishing a new paradigm for intelligent assisted diagnosis in hair-related disorders.

Key words: Hair detection and counting, Rotation detection, Domain adaptation, Hair synthesis, Loss function

CLC Number: 

  • TP391
[1]KIM M,KANG S,LEE B D.Evaluation of automated measurement of hair density using deep neural networks[J].Sensors,2022,22(2):650.
[2]KIM J H,KWON S,FU J,et al.Hair follicle classification and hair loss severity estimation using mask R-CNN[J].Journal of Imaging,2022,8(10):283.
[3]WANG Y F,HSU M H,WANG M Y F.Comparative analysis of automatic hair count estimation methods[J].Archives of Dermatological Research,2025,317(1):361.
[4]CHEN M C,CHANG W J,XIAO Y X,et al.A hair volumeanalysis system using deep learning and image processing technologies[C]//2021 IEEE International Conference on Consumer Electronics-Taiwan(ICCE-TW).IEEE,2021:1-2.
[5]BOCHKOVSKIY A,WANG C Y,LIAO H Y M.Yolov4:Opti-mal speed and accuracy of object detection[J].arXiv:2004.10934,2020.
[6]ZHU J Y,PARK T,ISOLA P,et al.Unpaired image-to-imagetranslation using cycle-consistent adversarial networks[C]//Proceedings of the IEEE International Conference on Computer Vision.2017:2223-2232.
[7]WANG X,YU J.Learning to cartoonize using white-box cartoon representations[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2020:8090-8099.
[8]CHOI Y,UH Y,YOO J,et al.v2:Diverse image synthesis for multiple domains.In 2020 IEEE[C]//CVF Conference on Computer Vision and Pattern Recognition(CVPR).2020:8185-8194.
[9]PARK T,EFROS A A,ZHANG R,et al.Contrastive learning for unpaired image-to-image translation[C]//European Confe-rence on Computer Vision.Cham:Springer,2020:319-345.
[10]YI R,LIU Y J,LAI Y K,et al.Unpaired portrait drawing generation via asymmetric cycle mapping[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2020:8217-8225.
[11]TARVAINEN A,VALPOLA H.Mean teachers are better role models:Weight-averaged consistency targets improve semi-supervised deep learning results[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems.2017:1195-1204.
[12]SHIH H C.An unsupervised hair segmentation and countingsystem in microscopy images[J].IEEE Sensors Journal,2014,15(6):3565-3572.
[13]JÄHNE B.Digital image processing[M].Berlin:Springer,2005.
[14]SHIH H C,LIU E R.Adaptive region merging approach formorphological color image segmentation[C]//Proceedings of the ACCV.2014:1-14.
[15]OTSU N.A threshold selection method from gray-level histograms[J].Automatica,1975,11(285-296):23-27.
[16]ZHANG Q,EUN S J.Design and implementation of an automatic hair counting system[J].Journal of Digital Art Enginee-ring and Multimedia,2014,1(2):75.
[17]HOUGH P V C,POWELL B W.A method for faster analysis of bubble chamber photographs[J].Il Nuovo Cimento(1955-1965),1960,18(6):1184-1191.
[18]KIM W,KIM H,REW J,et al.A hair density measuring scheme using smartphone[C]//Annual Conference of KIPS.Korea Information Processing Society,2015:1416-1419.
[19]GATYS L A,ECKER A S,BETHGE M.A neural algorithm of artistic style[J].arXiv:1508.06576,2015.
[20]HUANG X,BELONGIE S.Arbitrary style transfer inreal-time with adaptive instance normalization[C]//Proceedings of the IEEE International Conference on Computer Vision.2017:1501-1510.
[21]GOODFELLOW I J,POUGET-ABADIE J,MIRZA M,et al.Generative adversarial nets[C]//Proceedings of the 28st International Conference on Neural Information Processing Systems.2014.
[22]CHO H,LEE J,CHANG S,et al.One-shot structure-awarestylized image synthesis[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2024:8302-8311.
[23]WANG Z,ZHAO L,XING W.Stylediffusion:Controllable disentangled style transfer via diffusion models[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2023:7677-7689.
[24]EVERAERT M N,BOCCHIO M,ARPA S,et al.Diffusion instyle[C]//Proceedings of the IEEE/CVF International Confe-rence on Computer Vision.2023:2251-2261.
[25]YANG S,HWANG H,YE J C.Zero-shot contrastive loss fortext-guided diffusion image style transfer[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2023:22873-22882.
[26]KWON G,YE J C.Diffusion-based image translation using disentangled style and content representation[J].arXiv:2209.15264,2022.
[27]ZHANG Y,HUANG N,TANG F,et al.Inversion-based creativity transfer with diffusion models[J].arXiv:2211.13203,2022.
[28]ZHANG Y,DONG W,TANG F,et al.Prospect:Expanded conditioning for the personalization of attribute-aware image gene-ration[C]//CoRR.2023.
[29]MOU C,WANG X,XIE L,et al.T2i-adapter:Learning adapters to dig out more controllable ability for text-to-image diffusion models[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:4296-4304.
[30]ZHANG Z,ZHANG Q,XING W,et al.Artbank:Artistic style transfer with pre-trained diffusion model and implicit style prompt bank[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:7396-7404.
[31]DALAL N,TRIGGS B.Histograms of oriented gradients forhuman detection[C]//2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition(CVPR’05).IEEE,2005:886-893.
[32]LOWE D G.Distinctive image features from scale-invariant keypoints[J].International Journal of Computer Vision,2004,60(2):91-110.
[33]MA J,SHAO W,YE H,et al.Arbitrary-oriented scene text detection via rotation proposals[J].IEEE Transactions on Multimedia,2018,20(11):3111-3122.
[34]YANG X,ZHOU Y,ZHANG G,et al.The KFIoU loss for rotated object detection[J].arXiv:2201.12558,2022.
[35]TIAN Z,SHEN C,CHEN H,et al.FCOS:A simple and strong anchor-free object detector[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2020,44(4):1922-1933.
[36]YU Y,DA F.Phase-shifting coder:Predicting accurate orientation in oriented object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:13354-13363.
[37]GANIN Y,USTINOVA E,AJAKAN H,et al.Domain-adversarial training of neural networks[J].Journal of Machine Lear-ning Research,2016,17(59):1-35.
[38]GANIN Y,LEMPITSKY V.Unsupervised domain adaptation by backpropagation[C]//International Conference on Machine Learning.PMLR,2015:1180-1189.
[39]ZHANG W,OUYANG W,LI W,et al.Collaborative and adversarial network for unsupervised domain adaptation[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:3801-3809.
[40]PEI Z,CAO Z,LONG M,et al.Multi-adversarial domain adaptation[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2018.
[41]TZENG E,HOFFMAN J,ZHANG N,et al.Deep domain confusion:Maximizing for domain invariance[J].arXiv:1412.3474,2014.
[42]LONG M,CAO Y,WANG J,et al.Learning transferable fea-tures with deep adaptation networks[C]//International Confe-rence on Machine Learning.PMLR,2015:97-105.
[43]LONG M,ZHU H,WANG J,et al.Unsupervised domain adaptation with residual transfer networks[C]//Proceedings of the 30st International Conference on Neural Information Processing Systems.2016:136-144.
[44]LONG M,ZHU H,WANG J,et al.Deep transfer learning with joint adaptation networks[C]//International Conference on Machine Learning.PMLR,2017:2208-2217.
[45]GHIFARY M,KLEIJN W B,ZHANG M,et al.Deep recon-struction-classification networks for unsupervised domain adaptation[C]//European Conference on Computer Vision.Cham:Springer,2016:597-613.
[46]BOUSMALIS K,TRIGEORGIS G,SILBERMAN N,et al.Domain separation networks[C]//NIPS 2016.2016.
[47]LI Y J,DAI X,MA C Y,et al.Cross-domain adaptive teacher for object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2022:7581-7590.
[48]KENNERLEY M,WANG J G,VEERAVALLI B,et al.2pcnet:Two-phase consistency training for day-to-night unsupervised domain adaptive object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:11484-11493.
[49]LIN T Y,GOYAL P,GIRSHICK R,et al.Focal loss for dense object detection[C]//Proceedings of the IEEE International Conference on Computer Vision.2017:2980-2988.
[50]YANG Z,LIU S,HU H,et al.Reppoints:Point set representation for object detection[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2019:9657-9666.
[51]LI W,CHEN Y,HU K,et al.Oriented reppoints for aerial object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2022:1829-1838.
[52]HOU L,LU K,XUE J,et al.Shape-adaptive selection and mea-surement for oriented object detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2022:923-932.
[53]WEN L,GAO C,ZOU C.CAP-VSTNet:Content affinity preserved versatile style transfer[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:18300-18309.
[54]ZHOU Y,YANG X,ZHANG G,et al.Mmrotate:A rotated object detection benchmark using pytorch[C]//Proceedings of the 30th ACM International Conference on Multimedia.2022:7331-7334.
[55]XIA G S,BAI X,DING J,et al.DOTA:A large-scale dataset for object detection in aerial images[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:3974-3983.
[56]ZHANG R,ISOLA P,EFROS A A,et al.The unreasonable effectiveness of deep features as a perceptual metric[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:586-595.
[57]HEUSEL M,RAMSAUER H,UNTERTHINER T,et al.GANs trained by a two time-scale update rule converge to a local nash equilibrium[C]//NIPS 2017.2017.
[58]BROOKS T,HOLYNSKI A,EFROS A A.Instructpix2pix:Learning to follow image editing instructions[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:18392-18402.
[59]XU Z.SkinDualGen:Prompt-Driven Diffusion for Simultaneous Image-Mask Generation in Skin Lesions[J].arXiv:2507.19970,2025.
[60]CAO S,JOSHI D,GUI L Y,et al.Contrastive mean teacher for domain adaptive object detectors[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:23839-23848.
[61]TRANHEDEN W,OLSSON V,PINTO J,et al.Dacs:Domainadaptation via cross-domain mixed sampling[C]//Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision.2021:1379-1389.
[1] LI Zequn, DING Fei. Fatigue Driving Detection Based on Dual-branch Fusion and Segmented Domain AdaptationTransfer Learning [J]. Computer Science, 2026, 53(3): 78-87.
[2] WU Jiahao, PENG Li, YANG Jielong. Partial Domain Adaptation Based on Machine Unlearning [J]. Computer Science, 2026, 53(3): 173-180.
[3] ZHU Feng, YE Zongguo, LI Peng, XU He. Transformer-based Domain Adaptation Method for IoT Traffic Intrusion Detection [J]. Computer Science, 2026, 53(3): 443-452.
[4] HAN Lei, SHANG Haoyu, QIAN Xiaoyan, GU Yan, LIU Qingsong, WANG Chuang. Constrained Multi-loss Video Anomaly Detection with Dual-branch Feature Fusion [J]. Computer Science, 2026, 53(2): 236-244.
[5] CHEN Xiu, ZHANG Xinyun, CHENG Yuting, CHEN Wei, HUANG Zhengxing, LIU Zhenyu, ZHANG Yuanpeng. Research Progress on Multi-domain Adaptation Problems in Clinical Data Modeling [J]. Computer Science, 2025, 52(9): 25-36.
[6] SU Shiyu, YU Jiong, LI Shu, JIU Shicheng. Cross-domain Graph Anomaly Detection Via Dual Classification and Reconstruction [J]. Computer Science, 2025, 52(8): 374-384.
[7] ZHANG Taotao, XIE Jun, QIAO Pingjuan. Specific Emitter Identification Based on Progressive Self-training Open Set Domain Adaptation [J]. Computer Science, 2025, 52(7): 279-286.
[8] HUANG Bocheng, WANG Xiaolong, AN Guocheng, ZHANG Tao. Transmission Line Fault Identification Method Based on Transfer Learning and Improved YOLOv8s [J]. Computer Science, 2025, 52(6A): 240800044-8.
[9] ZHENG Xiubao, LI Jing, ZHU Ming, NING Yingying. Selection Method for Cloud Manufacturing Industrial Services Based on Generative AdversarialNetworks [J]. Computer Science, 2025, 52(4): 54-63.
[10] HU Huijuan, QIN Yifeng, XU Heand LI Peng. An Improved YOLOv8 Object Detection Algorithm for UAV Aerial Images [J]. Computer Science, 2025, 52(4): 202-211.
[11] TIAN Qing, KANG Lulu, ZHOU Liangyu. Class-incremental Source-free Domain Adaptation Based on Multi-prototype Replay andAlignment [J]. Computer Science, 2025, 52(3): 206-213.
[12] TIAN Qing, LIU Xiang, WANG Bin, YU Jiangsen, SHEN Jiashuo. Multi-source-free Domain Adaptation Based on Source Model Contribution Quantization [J]. Computer Science, 2025, 52(2): 116-124.
[13] HU Peng, XIA Xiaohua, ZHONG Yuquan. Road Crack Detection Method for Embedded Applications [J]. Computer Science, 2025, 52(12): 175-188.
[14] WANG Hongqiang, ZHAO Hui, JIA Zhenhong. Cotton Disease Detection Based on Feature Enhancement and Group Mix Attention [J]. Computer Science, 2025, 52(11A): 250200043-7.
[15] LI Sihui, CAI Guoyong, JIANG Hang, WEN Yimin. Novel Discrete Diffusion Text Generation Model with Convex Loss Function [J]. Computer Science, 2025, 52(10): 231-238.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!