Add Batch 8ed7da13-ab3b-4544-ac21-96d10f0a42db data
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+16
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_content_list.jsonAdded+1589
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_model.jsonAdded+2288
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_origin.pdfAdded+3
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/full.mdAdded+318
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/images.zipAdded+3
- 2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/layout.jsonAdded
- 2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_content_list.jsonAdded+2560
- 2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_model.jsonAdded
- 2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_origin.pdfAdded+3
- 2023/Zero-Shot Model Diagnosis/full.mdAdded+467
- 2023/Zero-Shot Model Diagnosis/images.zipAdded+3
- 2023/Zero-Shot Model Diagnosis/layout.jsonAdded
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_content_list.jsonAdded+1645
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_model.jsonAdded+1991
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_origin.pdfAdded+3
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/full.mdAdded+304
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/images.zipAdded+3
- 2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/layout.jsonAdded
- 2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_content_list.jsonAdded+1692
- 2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_model.jsonAdded+2332
- 2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_origin.pdfAdded+3
- 2023/Zero-Shot Object Counting/full.mdAdded+329
- 2023/Zero-Shot Object Counting/images.zipAdded+3
- 2023/Zero-Shot Object Counting/layout.jsonAdded
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_content_list.jsonAdded+1730
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_model.jsonAdded
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_origin.pdfAdded+3
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/full.mdAdded+345
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/images.zipAdded+3
- 2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/layout.jsonAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_content_list.jsonAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_model.jsonAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_origin.pdfAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/full.mdAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/images.zipAdded
- 2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/layout.jsonAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_content_list.jsonAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_model.jsonAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_origin.pdfAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/full.mdAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/images.zipAdded
- 2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/layout.jsonAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_content_list.jsonAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_model.jsonAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_origin.pdfAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/full.mdAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/images.zipAdded
- 2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/layout.jsonAdded
- 2023/gSDF_ Geometry-Driven Signed Distance Functions for 3D Hand-Object Reconstruction/ab15db8d-1011-4beb-9528-c9481ccf45d6_content_list.jsonAdded
7974 unmodified lines7975797679777974 unmodified lines2023/ZegCLIP_[[:space:]]Towards[[:space:]]Adapting[[:space:]]CLIP[[:space:]]for[[:space:]]Zero-Shot[[:space:]]Semantic[[:space:]]Segmentation/5aa3c465-5800-4cf0-842d-3ff527e740db_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Dual-Lens[[:space:]]Super-Resolution/e5623582-a7e1-46ef-8ecf-c8f00837c751_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Everything[[:space:]]Sketch-Based[[:space:]]Image[[:space:]]Retrieval,[[:space:]]and[[:space:]]in[[:space:]]Explainable[[:space:]]Style/225245ce-4b02-4bed-a89c-519460e55a67_origin.pdf filter=lfs diff=lfs merge=lfs -text7974 unmodified lines79757976797779787979798079817982798379847985798679877988798979907991799279937974 unmodified lines2023/ZegCLIP_[[:space:]]Towards[[:space:]]Adapting[[:space:]]CLIP[[:space:]]for[[:space:]]Zero-Shot[[:space:]]Semantic[[:space:]]Segmentation/5aa3c465-5800-4cf0-842d-3ff527e740db_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Dual-Lens[[:space:]]Super-Resolution/e5623582-a7e1-46ef-8ecf-c8f00837c751_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Everything[[:space:]]Sketch-Based[[:space:]]Image[[:space:]]Retrieval,[[:space:]]and[[:space:]]in[[:space:]]Explainable[[:space:]]Style/225245ce-4b02-4bed-a89c-519460e55a67_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Generative[[:space:]]Model[[:space:]]Adaptation[[:space:]]via[[:space:]]Image-Specific[[:space:]]Prompt[[:space:]]Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Model[[:space:]]Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Noise2Noise_[[:space:]]Efficient[[:space:]]Image[[:space:]]Denoising[[:space:]]Without[[:space:]]Any[[:space:]]Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Object[[:space:]]Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Pose[[:space:]]Transfer[[:space:]]for[[:space:]]Unrigged[[:space:]]Stylized[[:space:]]3D[[:space:]]Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Referring[[:space:]]Image[[:space:]]Segmentation[[:space:]]With[[:space:]]Global-Local[[:space:]]Context[[:space:]]Features/d944ca48-5a24-4209-88df-55a9c1e47851_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/Zero-Shot[[:space:]]Text-to-Parameter[[:space:]]Translation[[:space:]]for[[:space:]]Game[[:space:]]Character[[:space:]]Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/expOSE_[[:space:]]Accurate[[:space:]]Initialization-Free[[:space:]]Projective[[:space:]]Factorization[[:space:]]Using[[:space:]]Exponential[[:space:]]Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/gSDF_[[:space:]]Geometry-Driven[[:space:]]Signed[[:space:]]Distance[[:space:]]Functions[[:space:]]for[[:space:]]3D[[:space:]]Hand-Object[[:space:]]Reconstruction/ab15db8d-1011-4beb-9528-c9481ccf45d6_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/iCLIP_[[:space:]]Bridging[[:space:]]Image[[:space:]]Classification[[:space:]]and[[:space:]]Contrastive[[:space:]]Language-Image[[:space:]]Pre-Training[[:space:]]for[[:space:]]Visual[[:space:]]Recognition/3b34aaa2-686f-4539-b795-03e3193c1a2b_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/iDisc_[[:space:]]Internal[[:space:]]Discretization[[:space:]]for[[:space:]]Monocular[[:space:]]Depth[[:space:]]Estimation/f111aba4-6ed5-4778-a051-8ab6247508d3_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/iQuery_[[:space:]]Instruments[[:space:]]As[[:space:]]Queries[[:space:]]for[[:space:]]Audio-Visual[[:space:]]Sound[[:space:]]Separation/79c43f28-c9f8-4b22-8dca-1b2b47c85f07_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/itKD_[[:space:]]Interchange[[:space:]]Transfer-Based[[:space:]]Knowledge[[:space:]]Distillation[[:space:]]for[[:space:]]3D[[:space:]]Object[[:space:]]Detection/0c6f9efe-676e-4d3a-914a-2dc77bae5a75_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/pCON_[[:space:]]Polarimetric[[:space:]]Coordinate[[:space:]]Networks[[:space:]]for[[:space:]]Neural[[:space:]]Scene[[:space:]]Representations/762a8e4d-373c-4bab-83f9-f1ad8a1ae928_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/sRGB[[:space:]]Real[[:space:]]Noise[[:space:]]Synthesizing[[:space:]]With[[:space:]]Neighboring[[:space:]]Correlation-Aware[[:space:]]Noise[[:space:]]Model/4d3b606f-ee7b-460f-b2bf-d38a08fa5304_origin.pdf filter=lfs diff=lfs merge=lfs -text2023/vMAP_[[:space:]]Vectorised[[:space:]]Object[[:space:]]Mapping[[:space:]]for[[:space:]]Neural[[:space:]]Field[[:space:]]SLAM/ff44bc7e-edea-45f5-9989-5020c0b824b0_origin.pdf filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589[ { "type": "text", "text": "Zero-shot Generative Model Adaptation via Image-specific Prompt Learning", "text_level": 1, "bbox": [ 98, 130, 872, 155 ], "page_idx": 0 }, { "type": "text", "text": "Jiayi Guo $^{1*}$ Chaofei Wang $^{1*}$ You Wu $^{2}$ Eric Zhang $^{3}$ Kai Wang $^{3}$ Xingqian Xu $^{3}$ Shiji Song $^{1}$ Humphrey Shi $^{3,4\\dagger}$ Gao Huang $^{1\\dagger}$", "bbox": [ 99, 178, 854, 215 ], "page_idx": 0 }, { "type": "text", "text": "$^{1}$ Tsinghua University, BNRist $^{2}$ UCAS $^{3}$ SHI Labs @ Oregon & UIUC $^{4}$ Picsart AI Research (PAIR) https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation", "bbox": [ 125, 217, 839, 252 ], "page_idx": 0 }, { "type": "image", "img_path": "images/d738b2a13791d5c547a3216529ad819d26214393a5987c93bbfd8295911f861c.jpg", "image_caption": [ "Figure 1. The mode collapse issue. For NADA [21] and our method, the same generator pre-trained on the source domain of \"Photo\" is adapted to the unseen target domains of \"Disney\", \"Anime painting\", \"Wall painting\" and \"Ukiyo-e\" only with the domain labels. The images above the dotted line are some examples from the internet. The generated images of NADA exhibit some similar unseen patterns (yellow box areas) which are undesired in terms of quality and diversity. This issue is largely addressed by our method." ], "image_footnote": [], "bbox": [ 89, 263, 885, 568 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 233, 650, 313, 666 ], "page_idx": 0 }, { "type": "text", "text": "Recently, CLIP-guided image synthesis has shown appealing performance on adapting a pre-trained source-domain generator to an unseen target domain. It does not require any target-domain samples but only the textual domain labels. The training is highly efficient, e.g., a few minutes. However, existing methods still have some limitations in the quality of generated images and may suffer from the mode collapse issue. A key reason is that a fixed adaptation direction is applied for all cross-domain image pairs, which leads to identical supervision signals. To address this issue, we propose an Image-specific Prompt Learning (IPL) method, which learns specific prompt vec", "bbox": [ 73, 683, 470, 864 ], "page_idx": 0 }, { "type": "text", "text": "tors for each source-domain image. This produces a more precise adaptation direction for every cross-domain image pair, endowing the target-domain generator with greatly enhanced flexibility. Qualitative and quantitative evaluations on various domains demonstrate that IPL effectively improves the quality and diversity of synthesized images and alleviates the mode collapse. Moreover, IPL is independent of the structure of the generative model, such as generative adversarial networks or diffusion models. Code is available at https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation.", "bbox": [ 500, 652, 890, 818 ], "page_idx": 0 }, { "type": "text", "text": "1. Introduction", "text_level": 1, "bbox": [ 500, 845, 630, 861 ], "page_idx": 0 }, { "type": "text", "text": "In recent years, image synthesis using generative adversarial networks (GANs) [11] has been rapidly developed.", "bbox": [ 500, 871, 890, 902 ], "page_idx": 0 }, { "type": "header", "text": "CVF", "bbox": [ 106, 2, 181, 42 ], "page_idx": 0 }, { "type": "header", "text": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore.", "bbox": [ 236, 0, 810, 46 ], "page_idx": 0 }, { "type": "page_footnote", "text": "*Equal contribution.", "bbox": [ 94, 876, 204, 888 ], "page_idx": 0 }, { "type": "page_footnote", "text": "† Corresponding authors.", "bbox": [ 96, 888, 225, 901 ], "page_idx": 0 }, { "type": "page_number", "text": "11494", "bbox": [ 480, 944, 517, 955 ], "page_idx": 0 }, { "type": "text", "text": "The state-of-the-art methods can generate images that are hard to be distinguished from real data [14, 20, 21, 46, 50]. However, the GAN-based methods heavily rely on vast quantities of training examples, and adopt a cumbersome adversarial training scheme which generally costs many hours of training time. Unfortunately, in many real-world scenarios, data acquisition is difficult or expensive. For example, in the artistic domains, it is impossible to have artists make thousands of creations. The high training cost is also unacceptable on some embedded devices, e.g., cellphones.", "bbox": [ 75, 90, 472, 243 ], "page_idx": 1 }, { "type": "text", "text": "To address these issues, researchers begin to focus on the generative model adaptation. The goal of this task is to adapt a pre-trained source-domain generator to a target domain with limited data. Many few-shot GAN-based methods are proposed, such as TGAN [48], FreezeD [30], MinGAN [47], ADA [18], DiffAug [53], IDC [33] and RSSA [49], etc. However, these methods still require some training images of the target domain and follow the adversarial training scheme. As a pioneer work, StyleGAN-NADA [8] (NADA for short) proposes a zero-shot adaptation method, which only requires textual domain labels and discards the cumbersome adversarial training scheme by introducing a pre-trained CLIP model. Although efficient, it still has obvious deficiencies, i.e., the limited quality and mode collapse of generated images. As shown in Fig.1, we adapt a pretrained generator of \"Photo\" domain to \"Disney\", \"Anime painting\", \"Wall painting\" and \"Ukiyo-e\" domains. For the results of NADA [8], we notice that the generated images of the same target domain always show some homogeneous patterns which degrade the image quality and diversity, such as deep nasolabial folds in \"Disney\", squinting eyes in \"Anime painting\", red cheeks in \"Wall painting\" and blue eyebrows in \"Ukiyo-e\" (yellow box areas).", "bbox": [ 75, 244, 472, 592 ], "page_idx": 1 }, { "type": "text", "text": "By exploring the factors behind this phenomenon, we find that the key factor is the fixed adaptation direction produced by manually designed prompts. Sharing the direction for all cross-domain image pairs leads to identical supervision signals for the model adaptation. Consider the example, adapting a generator of \"Human\" domain to \"Tolkien elf\" domain as shown in Fig.2. The previous works [8, 22] adopt manually designed prompts (e.g., \"A photo of a\") plus the domain label to produce a fixed adaptation direction, which is shared by all cross-domain image pairs (Fig.2 (a)) in the adaptation process. We argue that the constraint is too restrictive and suppresses the image-specific features, leading to homogeneous generated patterns.", "bbox": [ 75, 595, 468, 792 ], "page_idx": 1 }, { "type": "text", "text": "In this paper, we propose an Image-specific Prompt Learning (IPL) method to address the above issue. The motivation is setting more precise and diversified adaptation directions by customizing more image-specific prompts, for instance \"Asian girl\", \"Curly hair lady\" and \"Elder glass man\" (Fig.2 (b)). These adaptation directions endow the target-domain generator with high flexibility to synthesize", "bbox": [ 75, 795, 470, 902 ], "page_idx": 1 }, { "type": "image", "img_path": "images/7d3df592624051881c753925364c9354fc57843906aafa0d6691c58435607553.jpg", "image_caption": [ "Figure 2. An illustration of our motivation. The previous methods adopt manual prompts to compute a fixed adaptation direction for all cross-domain image pairs, while our method learns image-specific prompts for producing more precise and diversified adaptation directions." ], "image_footnote": [], "bbox": [ 501, 90, 890, 327 ], "page_idx": 1 }, { "type": "text", "text": "more diversified images. The proposed IPL is a two-stage method. In Stage 1, a latent mapper is trained to produce an image-specific set of prompt vectors conditioned on each source-domain image by a contrastive training scheme. The learned prompt vectors contain more specific and diversified features of the source-domain images than the fixed prompt vectors. We further propose a domain regularization loss to ensure that the learned prompt vectors are compatible with the target domain. In Stage 2, we compute more precise and diversified adaptation directions for each cross-domain image pair, and train the target-domain generator with an adaptive directional CLIP loss, which can be viewed as an improved version of the Directional CLIP Loss [8]. As shown in Fig.1, our method alleviates the mode collapse issue well. Extensive experiments across a wide range of domains demonstrate that the proposed IPL effectively improves the quality of synthesized images and overcomes the mode collapse issue. User studies and ablation studies are also conducted to validate the effectiveness of our method.", "bbox": [ 496, 422, 890, 709 ], "page_idx": 1 }, { "type": "text", "text": "It is worth noting that our proposed IPL method is independent of the structure of the generative model, and can be applied to the recent diffusion models [13,27,31,35,41-43, 51]. Thus we also combine IPL with diffusion models and get a more robust and stronger generative capacity, especially on complex images, which shows the high effectiveness and adaptability of our approach.", "bbox": [ 496, 709, 890, 816 ], "page_idx": 1 }, { "type": "text", "text": "2. Related Work", "text_level": 1, "bbox": [ 500, 829, 640, 845 ], "page_idx": 1 }, { "type": "text", "text": "Generative model adaptation. Generative model adaptation is the task of adapting a generative model trained on a large-scale source domain to a data-limited target domain.", "bbox": [ 496, 854, 890, 900 ], "page_idx": 1 }, { "type": "page_number", "text": "11495", "bbox": [ 480, 944, 517, 955 ], "page_idx": 1 }, { "type": "text", "text": "According to the size of the training dataset of the target domain, it can be directly divided into two main categories: few-shot generative model adaptation and zero-shot generative model adaptation. For the few-shot generative model adaptation task, the most natural approach is to fine-tune a pre-trained GAN [2, 4, 26, 48]. However, fine-tuning the entire network weights used to result in overfitting. Subsequently, many methods were proposed to alleviate the overfitting issue. They either imposed strong regularization [52, 54], or modified the network parameters with a slight perturbation [30, 32, 37, 47], or preserved some important information by cross-domain alignment [33, 49], or performed data augmentation [45, 53, 55].", "bbox": [ 75, 90, 472, 287 ], "page_idx": 2 }, { "type": "text", "text": "For the zero-shot generative model adaptation task, NADA [8] first proposed to introduce a pre-trained CLIP model for supplying necessary prior knowledge. It only required textual domain labels, and encoded the domain gap as a text-guided adaptation direction in CLIP space. To enhance the identity-preserving capability of real-world image translation, Kim et al. further proposed DiffusionCLIP [22] which utilized diffusion models [42] instead of StyleGANs [18-21] in NADA. Nevertheless, these existing works all adopt a fixed adaptation direction which only contains the basic domain knowledge but no image-specific features. In this paper, we argue that this shared fixed adaptation direction may lead to the mode collapse issue. To produce more accurate and adaptive adaptation directions, we propose to learn diverse and specific prompt vectors for each image.", "bbox": [ 75, 292, 472, 520 ], "page_idx": 2 }, { "type": "text", "text": "Prompt learning. Prompt engineering is first introduced as a knowledge probing approach [34]. Given cloze-style prompts, it induces pre-trained language models to generate the corresponding answers. However, manually designed prompts may be sub-optimal and provide imprecise guidance. To tackle this issue, prompt learning [9, 16, 23, 25, 28, 40, 56] has been widely studied in natural language processing to automatically explore the optimal set of prompts. With the unprecedented development of vision-language models [15, 36] in recent years, researchers begin to apply prompt learning to computer vision tasks [7, 10, 17, 24, 57, 58]. In specific, Zhou et al. [57, 58] first adopted context optimization in image classification tasks by modeling context words with continuous vectors in the word embedding space. Subsequently, many downstream tasks in computer vision were also explored, e.g., object detection [7], visual grounding [24], video understanding [17] and transfer learning [10]. As far as we know, this is the first work to propose an adaptive prompt learning scheme for generative model adaptation. Different from previous prompt learning schemes, our method introduces a latent mapper to learn a specific set of prompt vectors for each image. When training the target-domain generator, the learned image-specific prompt vectors could produce more precise adaptation directions to provide better supervision signals.", "bbox": [ 75, 523, 472, 902 ], "page_idx": 2 }, { "type": "text", "text": "3. Methodology", "text_level": 1, "bbox": [ 498, 89, 635, 108 ], "page_idx": 2 }, { "type": "text", "text": "The goal of zero-shot generative model adaptation is to adapt a pre-trained source-domain generator $G_{\\mathrm{s}}$ to an unseen target domain, and get the target-domain generator $G_{\\mathrm{t}}$ . The source domain with the domain label $\\mathrm{Y_s}$ , e.g., \"Human\", can obtain plentiful high-quality images by $G_{\\mathrm{s}}$ . The target domain is described only through the domain label $\\mathrm{Y_t}$ , e.g., \"Tolkien elf\", with no images. Following [8, 22], a pre-trained CLIP model [36] including an image encoder $E_{\\mathrm{I}}$ and a text encoder $E_{\\mathrm{T}}$ is introduced.", "bbox": [ 496, 114, 893, 250 ], "page_idx": 2 }, { "type": "text", "text": "We propose a two-stage method named Image-specific Prompt Learning (IPL). Its framework is shown in Fig.3. In Stage 1, a latent mapper $F$ is trained to produce a set of image-specific prompt vectors $\\{[\\mathbf{V}]_1^i, [\\mathbf{V}]_2^i, \\dots, [\\mathbf{V}]_m^i\\}$ for each latent code $w^i$ of a source-domain image. Each prompt vector has the same dimension with word embeddings in CLIP space. The training loss consists of a contrastive learning loss $\\mathcal{L}_{\\mathrm{contr}}$ and a domain regularization loss $\\mathcal{L}_{\\mathrm{domain}}$ . The former aims to preserve the image-specific features of each source domain image in the learned prompt vectors. The latter constrains the image-specific features to be suitable to the target domain, which means the learned features should not conflict with the target domain. For example, the features of prompts like \"round ear\" should not be contained in the ideal prompt vectors if the target domain is \"Tolkien elf\". In Stage 2, the trained latent mapper $F$ is plugged into the training process of the target-domain generator $G_{\\mathrm{t}}$ , and produces more precise and diversified adaptation directions for cross-domain image pairs. This training stage follows [8] except that learned prompt vectors produced by the latent mapper $F$ replace the fixed prompt vectors. The final textual supervision information includes shared learned prompt vectors and respective embeddings of the original domain labels.", "bbox": [ 496, 251, 893, 613 ], "page_idx": 2 }, { "type": "text", "text": "3.1. Image-specific prompt learning", "text_level": 1, "bbox": [ 498, 622, 777, 638 ], "page_idx": 2 }, { "type": "text", "text": "General prompts. The previous methods [8, 22] compute a fixed adaptation direction produced by two embeddings of manually designed prompts, e.g., \"a photo of a human\" and \"a photo of a Tolkien elf\", then constrain the directions of all cross-domain pairs to be parallel with the adaptation direction. In contrast to manually designed prompts, prompt learning [58] aims to find the optimal set of prompt vectors for a domain by directly tuning the embeddings of prompts. Formally, we define a general prompt matrix $\\mathrm{M_d}$ to represent a given domain d. $\\mathrm{M_d}$ consists of the prompt vectors $[\\mathbf{V}]_1, [\\mathbf{V}]_2, \\dots, [\\mathbf{V}]_m$ and the embedding of the domain label $[\\mathrm{Y_d}]$ as below:", "bbox": [ 496, 646, 893, 827 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\mathrm {M} _ {\\mathrm {d}} = [ \\mathbf {V} ] _ {1} [ \\mathbf {V} ] _ {2} \\dots [ \\mathbf {V} ] _ {m} [ \\mathrm {Y} _ {\\mathrm {d}} ], \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 596, 832, 890, 849 ], "page_idx": 2 }, { "type": "text", "text": "where $m$ is the number of prompts. Suppose the dimension of each embedding is $k$ . Then the dimension of $\\mathbf{M}_{\\mathrm{d}}$ should be $(m + 1) \\times k$ . In [8, 22], the prompt vectors", "bbox": [ 496, 854, 893, 902 ], "page_idx": 2 }, { "type": "page_number", "text": "11496", "bbox": [ 478, 944, 519, 957 ], "page_idx": 2 }, { "type": "image", "img_path": "images/fff8e843236ad10f7f82005b31182998855786026da78fc0b4f6652c2ce03917.jpg", "image_caption": [ "Stage 1: Training latent mapper for prompt learning" ], "image_footnote": [], "bbox": [ 127, 104, 823, 292 ], "page_idx": 3 }, { "type": "image", "img_path": "images/8d9c252ea1b985f5bf7a741110cdaaa4f4d7a769b1958bd4678937ff495d9bd4.jpg", "image_caption": [ "Stage 2: Training generator for image synthesis", "Figure 3. The framework of our method. In Stage 1, a latent mapper $F$ is trained for prompt learning by a contrastive learning loss $\\mathcal{L}_{\\mathrm{contr}}$ and a domain regularization loss $\\mathcal{L}_{\\mathrm{domain}}$ . The image encoder $E_{\\mathrm{I}}$ and the text encoder $E_{\\mathrm{T}}$ are from the CLIP model [36]. In Stage 2, the target-domain generator $G_{\\mathrm{t}}$ is trained for image synthesis by the improved Directional CLIP Loss $\\mathcal{L}_{\\mathrm{adapt}}$ in which the adaptive prompts produced by the latent mapper are applied. In two stages, the locked modules are fixed while the unlocked modules are trained. For simplicity, we replace $E_{\\mathrm{I}}(G_{\\mathrm{s}}(w^{i}))$ and $E_{\\mathrm{T}}(\\mathrm{M}_{\\mathrm{s}}^{i})$ with $\\Gamma^i$ and $\\mathrm{T_s}^i$ , respectively." ], "image_footnote": [], "bbox": [ 153, 310, 751, 439 ], "page_idx": 3 }, { "type": "text", "text": "$[\\mathbf{V}]_1, [\\mathbf{V}]_2, \\dots, [\\mathbf{V}]_m$ are fixed embeddings of manually designed prompts. For prompt learning [58], the prompt vectors are learned by encoding each training image of the domain $d$ with $E_{\\mathrm{I}}$ and the prompt matrix $\\mathrm{M_d}$ with $E_{\\mathrm{T}}$ , and then maximizing the cosine similarity between them.", "bbox": [ 75, 539, 468, 614 ], "page_idx": 3 }, { "type": "text", "text": "Inspired by prompt learning, in the zero-shot generative model adaptation task, a natural idea is to learn an optimal set of prompt vectors instead of the manually designed prompts in NADA [8]. Although the adaptation direction calculated by the learned prompt vectors seems to be more reasonable than that of the manually designed prompts, it is still fixed and shared for all cross-domain image pairs. These fixed learned prompt vectors can not solve the mode collapse issue (Experimental validations can be seen in Sec. 4.4). To obtain more flexible and diversified adaptation directions, we further propose to learn a set of image-specific prompt vectors for each image, which can be regarded as an improved version of prompt learning.", "bbox": [ 75, 621, 468, 819 ], "page_idx": 3 }, { "type": "text", "text": "Image-specific prompts. Utilizing the source-domain generator $G_{\\mathrm{s}}$ , we train a latent mapper $F$ as shown in Fig.3 (Stage 1). Through the mapper, each image of the source domain can be matched to an optimal set of prompt vectors. Formally, given a latent code $w^{i}$ , corresponding to", "bbox": [ 75, 825, 468, 902 ], "page_idx": 3 }, { "type": "text", "text": "the $i^{\\mathrm{th}}$ image in the source domain, the image-specific set of prompt vectors $\\{[\\mathbf{V}]_1^i,[\\mathbf{V}]_2^i,\\dots ,[\\mathbf{V}]_m^i\\}$ can be obtained by $F(w^{i},\\theta)$ , where $\\theta$ denotes the parameters of the latent mapper $F$ . Following the definition of the prompt matrix in Eq.(1), we define an image-specific prompt matrix of the $i^{\\mathrm{th}}$ source-domain image as:", "bbox": [ 496, 539, 890, 630 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathrm {M} _ {\\mathrm {s}} ^ {i} = F \\left(w ^ {i}, \\theta\\right) \\left[ \\mathrm {Y} _ {\\mathrm {s}} \\right] = \\left[ \\mathrm {V} \\right] _ {1} ^ {i} \\left[ \\mathrm {V} \\right] _ {2} ^ {i} \\dots \\left[ \\mathrm {V} \\right] _ {m} ^ {i} \\left[ \\mathrm {Y} _ {\\mathrm {s}} \\right]. \\tag {2}\n$$\n", "text_format": "latex", "bbox": [ 544, 637, 890, 655 ], "page_idx": 3 }, { "type": "text", "text": "In this paper, $F$ is a common four-layer fully-connected network. Next, we show how to train it.", "bbox": [ 496, 661, 890, 690 ], "page_idx": 3 }, { "type": "text", "text": "Contrastive training scheme. Given a batch of latent codes $\\{w^1, w^2, \\dots, w^n\\}$ , we can produce a batch of sets of prompt matrices $\\{\\mathrm{M_s^1}, \\mathrm{M_s^2}, \\dots, \\mathrm{M_s^n}\\}$ by $F$ and a batch of images $\\{G_{\\mathrm{s}}(w^{1}), G_{\\mathrm{s}}(w^{2}), \\dots, G_{\\mathrm{s}}(w^{n})\\}$ by $G_{\\mathrm{s}}$ . Then $n \\times n$ pairs $< G_{\\mathrm{s}}(w^{i}), \\mathrm{M}_{\\mathrm{s}}^{j} >$ , $i, j \\in \\{1, 2, \\dots, n\\}$ have been obtained. Then, we take the pairs of $i = j$ as positive samples, and the pairs of $i \\neq j$ as negative samples for contrastive training. Specifically, we compute the similarity between embeddings of the $i^{\\text{th}}$ image and the $j^{\\text{th}}$ prompt matrix in CLIP space as:", "bbox": [ 496, 691, 890, 843 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\operatorname {S i m} _ {i j} = \\operatorname {C o s} \\left(\\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {s}} \\left(w ^ {i}\\right)\\right)\\right), \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {s}} ^ {j}\\right)\\right)\\right), \\tag {3}\n$$\n", "text_format": "latex", "bbox": [ 519, 847, 890, 864 ], "page_idx": 3 }, { "type": "text", "text": "where $\\mathrm{Norm}(\\cdot)$ and $\\mathrm{Cos}(\\cdot)$ represent $L_{2}$ normalization and the cosine function, respectively. The similarities of pos", "bbox": [ 496, 869, 890, 901 ], "page_idx": 3 }, { "type": "page_number", "text": "11497", "bbox": [ 478, 944, 517, 955 ], "page_idx": 3 }, { "type": "text", "text": "itive samples are maximized while the similarities of negative samples are minimized. The contrastive loss is expressed as:", "bbox": [ 75, 90, 468, 135 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\text {c o n t r}} = \\mathbb {E} _ {w \\in \\mathcal {W}} \\left(\\sum_ {i \\neq j} \\left(\\operatorname {S i m} _ {i j}\\right) - \\sum_ {i = j} \\left(\\operatorname {S i m} _ {i j}\\right)\\right). \\tag {4}\n$$\n", "text_format": "latex", "bbox": [ 122, 137, 468, 169 ], "page_idx": 4 }, { "type": "text", "text": "Domain regularization loss. For the target domain without any prior knowledge except the domain label $\\mathrm{Y_t}$ , we can simply share the learned prompt vectors between the source and target domains following [8]. However, the shared prompt vectors may lead to the risk of generating unrealistic images for the target domain, because some learned prompt vectors may contain strongly relevant features to the source domain, leading to conflict with the target domain. For example, an image of \"Human\" domain is matched to prompt vectors of \"round ear\", but a corresponding image of \"Tolkien elf\" domain should not contain the features of \"round ear\". Sharing these prompt vectors is harmful to the target-domain image generation. Therefore, we further propose a domain regularization loss. Specifically, we constrain the angles between the embeddings of the image-specific prompt matrix $\\mathbf{M}_{\\mathrm{t}}^{i}$ and the target-domain label $\\mathrm{Y_t}$ in CLIP space to be small, to avoid the learned prompt vectors conflicting with the target domain. Formally, the domain regularization loss is described as:", "bbox": [ 75, 171, 472, 458 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\text {d o m a i n}} = - \\mathbb {E} _ {w ^ {i} \\in \\mathcal {W}} \\sum_ {i = 1} ^ {n} \\left(\\operatorname {C o s} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {t}} ^ {i}\\right), E _ {\\mathrm {T}} \\left(\\mathrm {Y} _ {\\mathrm {t}}\\right)\\right)\\right), \\tag {5}\n$$\n", "text_format": "latex", "bbox": [ 91, 465, 468, 503 ], "page_idx": 4 }, { "type": "text", "text": "where $\\mathrm{M}_{\\mathrm{t}}^{i}$ is calculated by Eq.(2) except replacing the domain label, $\\mathrm{Cos}(\\cdot)$ represents the cosine similarity.", "bbox": [ 76, 511, 468, 542 ], "page_idx": 4 }, { "type": "text", "text": "As a summary, the whole training loss function of the latent mapper $F$ is:", "bbox": [ 76, 542, 468, 571 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} = \\mathcal {L} _ {\\text {c o n s t r}} + \\lambda \\mathcal {L} _ {\\text {d o m a i n}}, \\tag {6}\n$$\n", "text_format": "latex", "bbox": [ 186, 580, 468, 595 ], "page_idx": 4 }, { "type": "text", "text": "where $\\lambda$ is the ratio parameter. Optimized by $\\mathcal{L}$ , the learned prompt vectors can not only reflect the features of the source-domain images, but also adapt to the target domain.", "bbox": [ 76, 603, 468, 650 ], "page_idx": 4 }, { "type": "text", "text": "3.2. Latent mapper guided generator training", "text_level": 1, "bbox": [ 76, 657, 431, 672 ], "page_idx": 4 }, { "type": "text", "text": "After training the latent mapper $F$ , we conduct the second stage: training the target-domain generator $G_{\\mathrm{t}}$ as shown in Fig.3 (Stage 2). In specific, we plug in the trained latent mapper, and train $G_{\\mathrm{t}}$ with an improved Directional CLIP Loss $\\mathcal{L}_{\\mathrm{adapt}}$ . Its main difference with [8] is using the image-specific prompt vectors that are produced on-the-fly by $F$ instead of the fixed ones of manually designed prompts. Formally, given a latent code $w^{i}$ , we calculate the direction of the $i^{\\mathrm{th}}$ source and target image pair as below:", "bbox": [ 75, 680, 468, 815 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\Delta \\mathrm {I} _ {i} = \\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {t}} \\left(w ^ {i}\\right)\\right) - \\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {s}} \\left(w ^ {i}\\right)\\right), \\right. \\right. \\tag {7}\n$$\n", "text_format": "latex", "bbox": [ 99, 821, 468, 840 ], "page_idx": 4 }, { "type": "text", "text": "where $\\mathrm{Norm}(\\cdot)$ represents $L_{2}$ normalization. The image-specific adaptation direction is calculated as below:", "bbox": [ 76, 847, 468, 876 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\Delta \\mathrm {T} _ {i} = \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {t}} ^ {i}\\right)\\right) - \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {s}} ^ {i}\\right)\\right). \\tag {8}\n$$\n", "text_format": "latex", "bbox": [ 122, 883, 468, 902 ], "page_idx": 4 }, { "type": "text", "text": "The improved Directional CLIP Loss $\\mathcal{L}_{\\mathrm{adapt}}$ is:", "bbox": [ 500, 90, 815, 107 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\mathrm {a d a p t}} = \\mathbb {E} _ {w ^ {i} \\in \\mathcal {W}} \\sum_ {i = 1} ^ {n} \\left(1 - \\frac {\\Delta \\mathrm {I} _ {i} \\cdot \\Delta \\mathrm {T} _ {i}}{| \\Delta \\mathrm {I} _ {i} | | \\Delta \\mathrm {T} _ {i} |}\\right), \\tag {9}\n$$\n", "text_format": "latex", "bbox": [ 560, 117, 890, 156 ], "page_idx": 4 }, { "type": "text", "text": "where $n$ is the batch size of latent codes. $\\mathcal{L}_{\\mathrm{adapt}}$ constrains the direction of each image pair $\\Delta \\mathrm{I}_i$ with an image-specific adaptation direction $\\Delta \\mathrm{T}_i$ .", "bbox": [ 498, 165, 890, 210 ], "page_idx": 4 }, { "type": "text", "text": "4. Experiments", "text_level": 1, "bbox": [ 500, 224, 633, 239 ], "page_idx": 4 }, { "type": "text", "text": "In this section, we evaluate our method qualitatively and quantitatively. The experimental setup is firstly presented in Sec. 4.1. Then we show image synthesis results across various domains in Sec. 4.2. Utilizing a GAN inversion model and diffusion models, results of real-world image translation are provided in Sec. 4.3. Finally, we carefully conduct ablation studies on prompt designing schemes and loss term ratios in Sec. 4.4.", "bbox": [ 498, 250, 890, 368 ], "page_idx": 4 }, { "type": "text", "text": "4.1. Experimental setup", "text_level": 1, "bbox": [ 500, 378, 687, 395 ], "page_idx": 4 }, { "type": "text", "text": "Baselines and settings. Two strong methods are chosen as our competitors. For zero-shot image synthesis, NADA [8] is the state-of-the-art method. Following NADA [8], we adapt the pre-trained StyleGANv2 [21] generators on (i) Flickr-Faces-HQ (FFHQ) [8] and (ii) Animal FacesHQ (AFHQ) [3], utilize the same pre-trained CLIP [36] built on ViT-B/32 [6]. For zero-shot real-world image translation, we utilize Restyle [1] with e4e [44] encoder to invert a real image into the latent space $\\mathcal{W}$ for StyleGANs. DiffusionCLIP (Diff-CLIP for short) [22] is the state-of-the-art method. We follow the setting of [22] except replacing denoising diffusion implicit models (DDIM) [42] with diffusion autoencoders [35]. The training process includes 300 iterations for prompt learning and 300 iterations for generator adaptation using a single NVIDIA RTX 3090 GPU. The batch size is set to 32 for prompt learning and 2 for generator adaptation. The number of learned prompt vectors $m$ is set to 4. For each domain, the ratio parameter $\\lambda$ in Eq.(6) is selected among [1, 10], according to the best Inception Score [38] of adapted generators. The whole training process requires about $10\\sim 20$ minutes. More implementation details can be seen in supplementary materials.", "bbox": [ 498, 402, 890, 733 ], "page_idx": 4 }, { "type": "text", "text": "Evaluation metrics. The ideal generated images should have: 1) high quality and diversity, 2) correct target-domain style, and 3) necessary source-domain information preservation (e.g., structure or identity). For a comprehensive evaluation, we utilize the popular Inception Score (IS) [38] to evaluate the image quality and diversity, the Single Image Fréchet Inception Distance (SIFID) [39] to evaluate the target-domain style, the Structural Consistency Score (SCS) [49] to evaluate the structure preservation, the identity similarity (ID) [5, 12] to evaluate the identity preservation. More details can be seen in supplementary materials.", "bbox": [ 496, 734, 890, 900 ], "page_idx": 4 }, { "type": "page_number", "text": "11498", "bbox": [ 480, 944, 517, 955 ], "page_idx": 4 }, { "type": "image", "img_path": "images/29fb6b7f34be5303901b7120fd27c50add553887e1983dc4e092eba95845498f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 89, 92, 346, 309 ], "page_idx": 5 }, { "type": "image", "img_path": "images/08418b9a6f0b65e8dec972b97a56e626c27bc7f5e4dc21961dfc895d8a67c363.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 352, 93, 607, 308 ], "page_idx": 5 }, { "type": "image", "img_path": "images/d74e7911721bc05f5b888638160c73bd8faa6ecd3bda79ab6cc2324278edb17d.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 614, 93, 870, 309 ], "page_idx": 5 }, { "type": "image", "img_path": "images/2dc87c38b88cb36faeb6cd7945f5e3b66de331822eba924bd546c0e624226e44.jpg", "image_caption": [ "Figure 4. Image synthesis comparison results. For FFHQ [21], the source domain is \"Human\" and the target domains are \"Pixar character\", \"Tolkien elf\", and \"Werewolf\". For AFHQ-Dog [3], the source domain is \"Photo\" and the target domains are \"Cartoon\", \"Pointillism\", and \"Cubism\". The yellow box areas show the mode collapse problem of NADA [8]." ], "image_footnote": [], "bbox": [ 89, 321, 344, 523 ], "page_idx": 5 }, { "type": "image", "img_path": "images/d6df7d3195dc9f738872649e3d2812238e7b48f155c54a226759d7ccd9a05f95.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 352, 321, 609, 523 ], "page_idx": 5 }, { "type": "image", "img_path": "images/ed555e54f9be07325dd42f45c54854a4745e971370d6a0517d61066e98e8ce7a.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 614, 321, 870, 523 ], "page_idx": 5 }, { "type": "table", "img_path": "images/697dd8ceb06d0b29c8fb6f2e43ffa527abdeb6f8c975d2daf907724941da19c6.jpg", "table_caption": [ "Table 1. Quantitative evaluation results. US denotes user study. The best results are bold." ], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"3\">Dataset</td><td rowspan=\"3\">Source→Target</td><td colspan=\"2\">IS [38] (↑)</td><td colspan=\"2\">SCS [49] (↑)</td><td colspan=\"2\">ID [5,12] (↑)</td><td colspan=\"6\">SIFID [39] (↓)</td><td rowspan=\"3\">US (↑)</td></tr><tr><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td colspan=\"4\">NADA</td><td colspan=\"2\">IPL</td></tr><tr><td>R1</td><td>R2</td><td>R3</td><td>R1</td><td>R2</td><td>R3</td></tr><tr><td rowspan=\"7\">FFHQ [8]</td><td>Photo→Disney</td><td>2.721</td><td>3.089</td><td>0.407</td><td>0.448</td><td>0.782</td><td>0.801</td><td>2.776</td><td>3.136</td><td>3.670</td><td>2.517</td><td>2.930</td><td>3.497</td><td>82.6%</td></tr><tr><td>Photo→Anime painting</td><td>2.450</td><td>3.051</td><td>0.324</td><td>0.518</td><td>0.666</td><td>0.776</td><td>2.956</td><td>1.811</td><td>1.242</td><td>2.845</td><td>1.595</td><td>1.021</td><td>79.3%</td></tr><tr><td>Photo→Wall painting</td><td>2.183</td><td>2.676</td><td>0.439</td><td>0.487</td><td>0.594</td><td>0.637</td><td>1.944</td><td>1.220</td><td>1.331</td><td>1.930</td><td>1.183</td><td>1.274</td><td>80.9%</td></tr><tr><td>Photo→Ukiyo-e</td><td>2.205</td><td>2.974</td><td>0.420</td><td>0.506</td><td>0.775</td><td>0.632</td><td>1.954</td><td>1.990</td><td>1.326</td><td>1.165</td><td>1.255</td><td>0.878</td><td>85.9%</td></tr><tr><td>Human→Pixar character</td><td>2.703</td><td>2.785</td><td>0.379</td><td>0.461</td><td>0.757</td><td>0.853</td><td>0.793</td><td>0.932</td><td>0.865</td><td>0.638</td><td>0.821</td><td>1.092</td><td>86.7%</td></tr><tr><td>Human→Tolkien elf</td><td>2.479</td><td>2.778</td><td>0.416</td><td>0.491</td><td>0.711</td><td>0.772</td><td>0.632</td><td>1.495</td><td>1.452</td><td>0.690</td><td>0.637</td><td>0.701</td><td>76.8%</td></tr><tr><td>Human→Werewolf</td><td>2.619</td><td>2.809</td><td>0.399</td><td>0.417</td><td>0.642</td><td>0.747</td><td>1.969</td><td>1.846</td><td>1.967</td><td>1.734</td><td>1.688</td><td>1.911</td><td>72.7%</td></tr><tr><td rowspan=\"3\">AFHQ [3]</td><td>Photo→Cartoon</td><td>6.505</td><td>8.658</td><td>0.407</td><td>0.563</td><td>0.925</td><td>0.941</td><td>2.708</td><td>2.672</td><td>3.870</td><td>2.517</td><td>2.477</td><td>3.278</td><td>87.6%</td></tr><tr><td>Photo→Pointillism</td><td>5.419</td><td>6.913</td><td>0.224</td><td>0.542</td><td>0.775</td><td>0.881</td><td>7.081</td><td>5.288</td><td>7.142</td><td>4.818</td><td>3.089</td><td>4.074</td><td>78.5%</td></tr><tr><td>Photo→Cubism</td><td>4.165</td><td>6.450</td><td>0.386</td><td>0.463</td><td>0.934</td><td>0.943</td><td>2.779</td><td>2.938</td><td>3.199</td><td>2.431</td><td>2.956</td><td>2.284</td><td>74.3%</td></tr></table>", "bbox": [ 78, 597, 897, 765 ], "page_idx": 5 }, { "type": "text", "text": "4.2. Generative model adaptation", "text_level": 1, "bbox": [ 76, 777, 338, 792 ], "page_idx": 5 }, { "type": "text", "text": "Qualitative comparison. In addition to Fig.1, we conduct extensive experiments across a wide range of domains as shown in Fig.4. All results indicate that our proposed approach outperforms NADA consistently. The yellow box areas in the figures denote the main different features between NADA and our IPL. From the quality of the gener", "bbox": [ 75, 810, 470, 902 ], "page_idx": 5 }, { "type": "text", "text": "ated images, the results of NADA have more incorrect features and noise, such as green mussy noise on hairs (Tolkien elf), ruined noses (Werewolf) and unshaped necks (Pointillism), while the results of IPL are more clear and correct. From the mode collapse perspective of the generated images, NADA is prone to collapse to some similar facial features for different images, such as depressed emotions (Pixar character), folded ears (Cartoon) and blue noses (Cu", "bbox": [ 496, 777, 890, 898 ], "page_idx": 5 }, { "type": "page_number", "text": "11499", "bbox": [ 478, 944, 517, 955 ], "page_idx": 5 }, { "type": "text", "text": "\"Photo\" $\\rightarrow$ \"Wall painting\"", "bbox": [ 411, 92, 557, 104 ], "page_idx": 6 }, { "type": "image", "img_path": "images/0268edaa23f642103bd1f705e64ee50c57d5519fc6cbf5a435497c24df1f5acd.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 84, 104, 173, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/70ae5f6ce32ee7b7a22ca816cecd35cef0f9b1fd65ad245e20525bb713fea231.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 176, 104, 264, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/269fc30244248f9c7014d3a679e18bd2ad6f633c4ebe0d4a4847ebd42467e94a.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 264, 104, 349, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/dadb6e2a11a8a7cd0a9aeca2c8fa601789afb8b890b353e11e32e2601826a1c5.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 349, 104, 437, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/4687422010a3419ad8aa9635ccde0f89c1a9bdfe3517bd6651caa42d74798c4b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 437, 104, 527, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/fabe97722fa861eaa5d6afd08724ae22e7fb11443d4695cd3bb126ae86b5446d.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 527, 104, 614, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/e7af42432eb1da68e9e7d6b1894a86454d2c738c0ec1b4d399de583cf7332101.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 617, 104, 705, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/79042054a2ae262e18ffe0fc1d954021da116f3308a780ba49b49623567cc96f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 705, 104, 792, 238 ], "page_idx": 6 }, { "type": "image", "img_path": "images/cd443fa96b2fde1eed83d4bfb736c84c63d44686ba3fa96b3cd7f41101a7129f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 792, 104, 877, 238 ], "page_idx": 6 }, { "type": "text", "text": "\"Human\" $\\rightarrow$ \"Tolkien elf\"", "bbox": [ 415, 239, 552, 250 ], "page_idx": 6 }, { "type": "image", "img_path": "images/25c38f9cca72c89ddbb5ffad71a66b9291ff39396201b148a82ba074a5b641ee.jpg", "image_caption": [ "Real Images", "Figure 5. Real-world image translation comparison results. Baselines are NADA [8], Diff-CLIP [22] and Diff-CLIP+ (an improved version of Diff-CLIP). Recon1, Recon2 and Recon3 refer to inversion results via Restyle [1], DDIM and diffusion autoencoders, respectively. GAN-IPL and Diff-IPL denote integrating IPL with NADA and Diff-CLIP+, respectively. Real images are from CelebA-HQ dataset [29] and translated into two styles of images, \"Wall painting\" and \"Tolkien elf\". The yellow boxes show the key observation areas." ], "image_footnote": [], "bbox": [ 84, 250, 173, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/3554ec76e38e70f52b8788d4d92390f422f2f746cc296883976998f13ded151b.jpg", "image_caption": [ "Recon1" ], "image_footnote": [], "bbox": [ 176, 250, 264, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/1a3fcd2901d98d2b5a9334bce46342c1e92c6ca58ebd207841b67e6cb52b34b3.jpg", "image_caption": [ "NADA" ], "image_footnote": [], "bbox": [ 264, 250, 349, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/f5b419a0a98122ff4b831e60890433270dd62a07fed5fc62bae54df243de7bbb.jpg", "image_caption": [ "GAN-IPL" ], "image_footnote": [], "bbox": [ 349, 250, 437, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/fd02d4ef7fcca9b1bff27811a8aec50c12890e34cd577549341714e42c83056a.jpg", "image_caption": [ "Recon2" ], "image_footnote": [], "bbox": [ 439, 250, 527, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/520fd4a0ab9340aa229fd044e9cfd1ee7b585aab42909b89c04c0361f58f73bc.jpg", "image_caption": [ "Diff-CLIP" ], "image_footnote": [], "bbox": [ 527, 250, 614, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/37386bea78b0c8edf5a9d57d86167dae92e5f7e3622d12f72063ae790a8bbaf6.jpg", "image_caption": [ "Recon3" ], "image_footnote": [], "bbox": [ 617, 250, 705, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/716b93708d5f65e373def0309008655580349ad226402db625a51cac6be3c994.jpg", "image_caption": [ "Diff-CLIP+" ], "image_footnote": [], "bbox": [ 705, 250, 792, 383 ], "page_idx": 6 }, { "type": "image", "img_path": "images/78f9acc720855cb593279202034e32f89e677c92a2db8a81fdba192bdde14f2a.jpg", "image_caption": [ "Diff-IPL" ], "image_footnote": [], "bbox": [ 792, 250, 877, 383 ], "page_idx": 6 }, { "type": "text", "text": "bism), while IPL presents consistently higher diversity and solve the mode collapse issue well. Our advantages mainly come from the fact that the latent mapper preserves sufficient image-specific and target-domain friendly features from the source-domain images. The produced prompt vectors provide more precise and diversified adaptation directions for the target-domain generator adaptation.", "bbox": [ 75, 462, 468, 568 ], "page_idx": 6 }, { "type": "text", "text": "Quantitative comparison. To quantify the performance improvement of IPL compared to NADA [8], IS, SCS, ID and SIFID are evaluated. As reported in Tab.1, for IS, IPL outperforms NADA on all 10 settings, indicating our method achieves better image quality and diversity. For SCS and ID, IPL outperforms NADA on most of the 10 settings except \"Human $\\rightarrow$ Ukiyo-e\". It is mainly because that \"Ukiyo-e\" naturally favors humans with narrow eyes and pale skin, which encourages identity changes during training. For SIFID, we collect 3 reference images $(\\mathbb{R}_1,\\mathbb{R}_2,$ and $\\mathbb{R}_3)$ on the internet for each target domain. Tab.1 shows that IPL outperforms NADA in most cases, indicating our superiority in generating precise target-domain styles.", "bbox": [ 75, 568, 468, 763 ], "page_idx": 6 }, { "type": "text", "text": "User studies. For each target domain, 32 images generated by NADA and our method are provided to human observers, together with their corresponding source images and textual labels of target domains. Human observers are required to choose better synthesized images which are semantically more consistent with the target domain labels and preserve the useful source-domain information better. We collect 1210 responses from 121 people using a survey platform. As reported in the last column of Tab.1, $80.5\\%$ of", "bbox": [ 75, 765, 468, 900 ], "page_idx": 6 }, { "type": "text", "text": "users prefer our approach to NADA on average.", "bbox": [ 500, 463, 813, 478 ], "page_idx": 6 }, { "type": "text", "text": "4.3. Real-world image translation", "text_level": 1, "bbox": [ 500, 484, 759, 500 ], "page_idx": 6 }, { "type": "text", "text": "This task first inverts a real-world image to the latent code by a pre-trained inversion model and then feeds it to the trained target-domain generator to get the translated target-domain image. For GAN-based generators, we compare our method (GAN-IPL) with NADA by connecting the inversion model Restyle [1]. For diffusion model generators, we compare our method (Diff-IPL) with Diff-CLIP [22] and Diff-CLIP+ which is an improved version of Diff-CLIP [22] by replacing the original DDIM [42] with a diffusion autoencoder [35]. For these diffusion models, a deterministic inversion process is naturally provided.", "bbox": [ 496, 508, 890, 674 ], "page_idx": 6 }, { "type": "text", "text": "As shown in Fig.5, comparing the results of NADA and GAN-IPL, IPL's superiority of alleviating mode collapse over NADA can still be observed. Comparing the results of Recon1, Recon2 and Recon3, diffusion models (Recon2 and Recon3) consistently perform better identity preservation than Restyle (Recon1) for real image inversion, especially for some uncommon stuffs in a human face photo, e.g., the hats, hands and tattoos in Fig.5. However, this property is not well inherited in the target domain generators with a fixed adaptation direction (see the results of Diff-CLIP and Diff-CLIP+). Our proposed IPL could help preserve the details in source images better and present the target-domain styles correctly (see the results of Diff-IPL). Quantitative evaluation results of Diff-CLIP, Diff-CLIP+ and Diff-IPL can be seen in supplementary materials.", "bbox": [ 496, 674, 890, 900 ], "page_idx": 6 }, { "type": "page_number", "text": "11500", "bbox": [ 480, 944, 517, 955 ], "page_idx": 6 }, { "type": "image", "img_path": "images/32128f89966999a701937ed1a444c461eece8cf86d9b70eedbb719c0633a1b18.jpg", "image_caption": [ "Figure 6. Ablation results of prompt designing schemes." ], "image_footnote": [], "bbox": [ 86, 93, 454, 364 ], "page_idx": 7 }, { "type": "text", "text": "4.4. Ablation studies", "text_level": 1, "bbox": [ 76, 393, 238, 407 ], "page_idx": 7 }, { "type": "text", "text": "Prompt designing schemes. We investigate four different prompt designing schemes: 1) manually fixed prompts (NADA), 2) learned fixed prompts, 3) random prompts and 4) adaptive prompts (Ours). Manually fixed prompts mean simply utilizing the manually designed prompts as NADA [8]. Learned fixed prompts denote unified prompt vectors produced by common prompt learning strategy [58] and shared for all images. Random prompts refer to prompt vectors produced by a randomly initialized latent mapper. Adaptive prompts denote the learned image-specific prompt vectors produced by our IPL method.", "bbox": [ 75, 417, 468, 582 ], "page_idx": 7 }, { "type": "text", "text": "As illustrated in Fig.6, synthesized images with manually fixed prompts and learned fixed prompts show some similar mode collapse issues, e.g., blue eyebrows (Ukiyo-e) and depressed emotions (Pixar character). They both produce a fixed adaptation direction, which leads to identical supervision signals for all image pairs. Synthesized images with random prompts present more photo-realistic results but lack the desired target-domain style. A possible reason is that the random prompts contain some features conflicting with the target domain and impede the learning of the target domain style. Our adaptive prompts perform best since the prompts contain more image-specific and target-domain friendly features from the source-domain images.", "bbox": [ 75, 584, 468, 779 ], "page_idx": 7 }, { "type": "text", "text": "Loss term ratios. We compare different values of the ratio parameter $\\lambda$ in Eq.(6), which is used to adjust the intensity of the domain regularization loss. Visual results are shown in Fig.7. In specific, when we set $\\lambda$ to a small value ( $\\lambda = 0$ as an extreme case), there is almost no constraint from the target domain. The learned prompts would excessively preserve the source-domain features. Thus the synthesized images are similar to their corresponding source", "bbox": [ 75, 780, 470, 901 ], "page_idx": 7 }, { "type": "image", "img_path": "images/047ec3af94a9ec2da033b34d28cf97a94320a17fb212f632782bbafa48bb1f72.jpg", "image_caption": [ "Figure 7. Ablation results of loss term ratios." ], "image_footnote": [], "bbox": [ 511, 93, 883, 353 ], "page_idx": 7 }, { "type": "text", "text": "images. In contrast, if $\\lambda$ is set to a large value ( $\\lambda = 20$ as an example), a strong target-domain constraint will limit the diversity of the learned prompts. As a result, the synthesized images would slightly show some similar undesired patterns as images generated via fixed prompts. Therefore, in practical applications, $\\lambda$ should be a trade-off value (i.e., between 1 and 10).", "bbox": [ 496, 397, 890, 502 ], "page_idx": 7 }, { "type": "text", "text": "5. Conclusion", "text_level": 1, "bbox": [ 500, 513, 617, 527 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we have proposed a novel zero-shot generative model adaptation approach called Image-specific Prompt Learning (IPL). In specific, we build a projection from latent codes to image-specific sets of prompt vectors via a latent mapper. With a contrastive learning scheme and a domain regularization constraint, the learned prompt vectors represent image-specific but target-domain-friendly features, producing more precise and diversified adaptation directions for target domain generator training. Compared with the state-of-the-art approaches, IPL consistently improves the quality of synthesized images and alleviates the mode collapse issue. Furthermore, IPL is independent of the type of generator and works well with both GANs and diffusion models, which exhibits good universality and adaptability. In the future, we will try to apply the proposed image-specific prompt learning strategy in other downstream tasks, such as unsupervised image captioning.", "bbox": [ 496, 535, 890, 792 ], "page_idx": 7 }, { "type": "text", "text": "Acknowledgements", "text_level": 1, "bbox": [ 500, 803, 666, 819 ], "page_idx": 7 }, { "type": "text", "text": "This work is supported in part by the National Key R&D Program of China (2019YFC1408703), the National Natural Science Foundation of China (62022048, 62276150), Guoqiang Institute of Tsinghua University and Beijing Academy of Artificial Intelligence.", "bbox": [ 496, 825, 890, 900 ], "page_idx": 7 }, { "type": "page_number", "text": "11501", "bbox": [ 480, 944, 517, 955 ], "page_idx": 7 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 78, 89, 174, 104 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[1] Yuval Alaluf, Or Patashnik, and Daniel Cohen-Or. ReStyle: A residual-based StyleGAN encoder via iterative refinement. In ICCV, 2021. 5, 7", "[2] Sergey Bartunov and Dmitry Vetrov. Few-shot generative modelling with generative matching networks. In AISTATS, 2018. 3", "[3] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. StarGAN v2: Diverse image synthesis for multiple domains. In CVPR, 2020. 5, 6", "[4] Louis Clouatre and Marc Demers. FIGR: Few-shot image generation with reptile. arXiv preprint arXiv:1901.02199, 2019.3", "[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. ArcFace: Additive angular margin loss for deep face recognition. In CVPR, 2019. 5, 6", "[6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020. 5", "[7] Yu Du, Fangyun Wei, Zihe Zhang, Miaojing Shi, Yue Gao, and Guoqi Li. Learning to prompt for open-vocabulary object detection with vision-language model. In CVPR, 2022. 3", "[8] Rinon Gal, Or Patashnik, Haggai Maron, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. StyleGAN-NADA: CLIP-guided domain adaptation of image generators. In SIGGRAPH, 2022. 2, 3, 4, 5, 6, 7, 8", "[9] Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. In ACL/IJCNLP, 2021. 3", "[10] Chunjiang Ge, Rui Huang, Mixue Xie, Zihang Lai, Shiji Song, Shuang Li, and Gao Huang. Domain adaptation via prompt learning. arXiv preprint arXiv:2202.06687, 2022. 3", "[11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 1", "[12] Ju He, Jie-Neng Chen, Shuai Liu, Adam Kortylewski, Cheng Yang, Yutong Bai, and Changhu Wang. TransFG: A transformer architecture for fine-grained recognition. In AAAI, 2022. 5, 6", "[13] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020. 2", "[14] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 2", "[15] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021. 3", "[16] Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? TACL, 2020. 3" ], "bbox": [ 78, 114, 467, 898 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[17] Chen Ju, Tengda Han, Kunhao Zheng, Ya Zhang, and Weidi Xie. Prompting visual-language models for efficient video understanding. In ECCV, 2021. 3", "[18] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In NeurIPS, 2020. 2, 3", "[19] Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. In NeurIPS, 2021. 3", "[20] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 2, 3", "[21] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In CVPR, 2020. 1, 2, 3, 5, 6", "[22] Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. DiffusionCLIP: Text-guided diffusion models for robust image manipulation. In CVPR, 2022. 2, 3, 5, 7", "[23] Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In EMNLP, 2021. 3", "[24] Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, Kai-Wei Chang, and Jianfeng Gao. Grounded language-image pre-training. In CVPR, 2022. 3", "[25] Xiang Lisa Li and Percy Liang. Prefix-Tuning: Optimizing continuous prompts for generation. In ACL/JCNLP, 2021. 3", "[26] Weixin Liang, Zixuan Liu, and Can Liu. DAWSON: A domain adaptive few shot generation framework. arXiv preprint arXiv:2001.00576, 2020.3", "[27] Xihui Liu, Dong Huk Park, Samaneh Azadi, Gong Zhang, Arman Chopikyan, Yuxiao Hu, Humphrey Shi, Anna Rohrbach, and Trevor Darrell. More control for free! image synthesis with semantic diffusion guidance. In WACV, 2023. 2", "[28] Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. GPT understands, too. arXiv preprint arXiv:2103.10385, 2021. 3", "[29] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 7", "[30] Sangwoo Mo, Minsu Cho, and Jinwoo Shin. Freeze the discriminator: a simple baseline for fine-tuning GANs. In CVPR Workshops, 2020. 2, 3", "[31] Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. In ICML, 2021. 2", "[32] Atsuhiro Noguchi and Tatsuya Harada. Image generation from small datasets via batch statistics adaptation. In ICCV, 2019. 3", "[33] Utkarsh Ojha, Yijun Li, Jingwan Lu, Alexei A Efros, Yong Jae Lee, Eli Shechtman, and Richard Zhang. Few-shot image generation via cross-domain correspondence. In CVPR, 2021. 2, 3", "[34] Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian" ], "bbox": [ 501, 92, 890, 898 ], "page_idx": 8 }, { "type": "page_number", "text": "11502", "bbox": [ 478, 944, 519, 955 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Riedel. Language models as knowledge bases? In EMNLP-IJCNLP, 2019. 3", "[35] Konpat Preechakul, Nattanat Chathee, Suttisak Wizadwongsa, and Supasorn Suwajanakorn. Diffusion Autoencoders: Toward a meaningful and decodable representation. In CVPR, 2022. 2, 5, 7", "[36] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 3, 4, 5", "[37] Esther Robb, Wen-Sheng Chu, Abhishek Kumar, and Jia-Bin Huang. Few-shot adaptation of generative adversarial networks. arXiv preprint arXiv:2010.11943, 2020. 3", "[38] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NeurIPS, 2016. 5, 6", "[39] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. SinGAN: Learning a generative model from a single natural image. In ICCV, 2019. 5, 6", "[40] Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In EMNLP, 2020. 3", "[41] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In ICML, 2015. 2", "[42] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In ICLR, 2020. 2, 3, 5, 7", "[43] Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. NeurIPS, 2019. 2", "[44] Omer Tov, Yuval Alaluf, Yotam Nitzan, Or Patashnik, and Daniel Cohen-Or. Designing an encoder for StyleGAN image manipulation. TOG, 2021. 5", "[45] Ngoc-Trung Tran, Viet-Hung Tran, Ngoc-Bao Nguyen, Trung-Kien Nguyen, and Ngai-Man Cheung. On data augmentation for GAN training. TIP, 2021. 3", "[46] Steven Walton, Ali Hassani, Xingqian Xu, Zhangyang Wang, and Humphrey Shi. StyleNAT: Giving each head a new perspective. arXiv preprint arXiv:2211.05770, 2022. 2", "[47] Yaxing Wang, Abel Gonzalez-Garcia, David Berga, Luis Herranz, Fahad Shahbaz Khan, and Joost van de Weijer. MineGAN: effective knowledge transfer from GANs to target domains with few images. In CVPR, 2020. 2, 3", "[48] Yaxing Wang, Chenshen Wu, Luis Herranz, Joost van de Weijer, Abel Gonzalez-Garcia, and Bogdan Raducanu. Transferring GANs: generating images from limited data. In ECCV, 2018. 2, 3", "[49] Jiayu Xiao, Liang Li, Chaofei Wang, Zheng-Jun Zha, and Qingming Huang. Few shot generative model adaption via relaxed spatial structural alignment. In CVPR, 2022. 2, 3, 5, 6", "[50] Xingqian Xu, Shant Navasardyan, Vahram Tadevosyan, Andranik Sargsyan, Yadong Mu, and Humphrey Shi. Image completion with heterogeneously filtered spectral hints. In WACV, 2023. 2" ], "bbox": [ 78, 90, 468, 898 ], "page_idx": 9 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[51] Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, and Humphrey Shi. Versatile Diffusion: Text, images and variations all in one diffusion model. arXiv preprint arXiv:2211.08332, 2022. 2", "[52] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In ICLR, 2019. 3", "[53] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient GAN training. In NeurIPS, 2020. 2, 3", "[54] Zhengli Zhao, Sameer Singh, Honglak Lee, Zizhao Zhang, Augustus Odena, and Han Zhang. Improved consistency regularization for GANs. In AAAI, 2021. 3", "[55] Zhengli Zhao, Zizhao Zhang, Ting Chen, Sameer Singh, and Han Zhang. Image augmentations for GAN training. arXiv preprint arXiv:2006.02595, 2020. 3", "[56] Zexuan Zhong, Dan Friedman, and Danqi Chen. Factual probing is [MASK]: Learning vs. learning to recall. In NAACL-HLT, 2021. 3", "[57] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Zwei Liu. Conditional prompt learning for vision-language models. In CVPR, 2022. 3", "[58] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. IJCV, 2022. 3, 4, 8" ], "bbox": [ 501, 92, 890, 445 ], "page_idx": 9 }, { "type": "page_number", "text": "11503", "bbox": [ 480, 944, 517, 955 ], "page_idx": 9 }]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288[ [ { "type": "header", "bbox": [ 0.107, 0.003, 0.182, 0.043 ], "angle": 0, "content": "CVF" }, { "type": "header", "bbox": [ 0.237, 0.0, 0.812, 0.047 ], "angle": 0, "content": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore." }, { "type": "title", "bbox": [ 0.099, 0.131, 0.873, 0.156 ], "angle": 0, "content": "Zero-shot Generative Model Adaptation via Image-specific Prompt Learning" }, { "type": "text", "bbox": [ 0.101, 0.179, 0.856, 0.217 ], "angle": 0, "content": "Jiayi Guo\\(^{1*}\\) Chaofei Wang\\(^{1*}\\) You Wu\\(^{2}\\) Eric Zhang\\(^{3}\\) Kai Wang\\(^{3}\\) Xingqian Xu\\(^{3}\\) Shiji Song\\(^{1}\\) Humphrey Shi\\(^{3,4\\dagger}\\) Gao Huang\\(^{1\\dagger}\\)" }, { "type": "text", "bbox": [ 0.126, 0.218, 0.84, 0.253 ], "angle": 0, "content": "\\(^{1}\\)Tsinghua University, BNRist \\(^{2}\\)UCAS \\(^{3}\\)SHI Labs @ Oregon & UIUC \\(^{4}\\)Picsart AI Research (PAIR) https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation" }, { "type": "image", "bbox": [ 0.09, 0.264, 0.887, 0.569 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.076, 0.575, 0.893, 0.632 ], "angle": 0, "content": "Figure 1. The mode collapse issue. For NADA [21] and our method, the same generator pre-trained on the source domain of \"Photo\" is adapted to the unseen target domains of \"Disney\", \"Anime painting\", \"Wall painting\" and \"Ukiyo-e\" only with the domain labels. The images above the dotted line are some examples from the internet. The generated images of NADA exhibit some similar unseen patterns (yellow box areas) which are undesired in terms of quality and diversity. This issue is largely addressed by our method." }, { "type": "title", "bbox": [ 0.235, 0.651, 0.314, 0.667 ], "angle": 0, "content": "Abstract" }, { "type": "text", "bbox": [ 0.075, 0.684, 0.471, 0.866 ], "angle": 0, "content": "Recently, CLIP-guided image synthesis has shown appealing performance on adapting a pre-trained source-domain generator to an unseen target domain. It does not require any target-domain samples but only the textual domain labels. The training is highly efficient, e.g., a few minutes. However, existing methods still have some limitations in the quality of generated images and may suffer from the mode collapse issue. A key reason is that a fixed adaptation direction is applied for all cross-domain image pairs, which leads to identical supervision signals. To address this issue, we propose an Image-specific Prompt Learning (IPL) method, which learns specific prompt vec" }, { "type": "text", "bbox": [ 0.5, 0.653, 0.892, 0.819 ], "angle": 0, "content": "tors for each source-domain image. This produces a more precise adaptation direction for every cross-domain image pair, endowing the target-domain generator with greatly enhanced flexibility. Qualitative and quantitative evaluations on various domains demonstrate that IPL effectively improves the quality and diversity of synthesized images and alleviates the mode collapse. Moreover, IPL is independent of the structure of the generative model, such as generative adversarial networks or diffusion models. Code is available at https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation." }, { "type": "title", "bbox": [ 0.501, 0.847, 0.631, 0.862 ], "angle": 0, "content": "1. Introduction" }, { "type": "text", "bbox": [ 0.5, 0.872, 0.892, 0.903 ], "angle": 0, "content": "In recent years, image synthesis using generative adversarial networks (GANs) [11] has been rapidly developed." }, { "type": "page_footnote", "bbox": [ 0.096, 0.877, 0.205, 0.889 ], "angle": 0, "content": "*Equal contribution." }, { "type": "page_footnote", "bbox": [ 0.097, 0.889, 0.227, 0.902 ], "angle": 0, "content": "† Corresponding authors." }, { "type": "list", "bbox": [ 0.096, 0.877, 0.227, 0.902 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11494" } ], [ { "type": "text", "bbox": [ 0.076, 0.092, 0.473, 0.244 ], "angle": 0, "content": "The state-of-the-art methods can generate images that are hard to be distinguished from real data [14, 20, 21, 46, 50]. However, the GAN-based methods heavily rely on vast quantities of training examples, and adopt a cumbersome adversarial training scheme which generally costs many hours of training time. Unfortunately, in many real-world scenarios, data acquisition is difficult or expensive. For example, in the artistic domains, it is impossible to have artists make thousands of creations. The high training cost is also unacceptable on some embedded devices, e.g., cellphones." }, { "type": "text", "bbox": [ 0.076, 0.246, 0.473, 0.593 ], "angle": 0, "content": "To address these issues, researchers begin to focus on the generative model adaptation. The goal of this task is to adapt a pre-trained source-domain generator to a target domain with limited data. Many few-shot GAN-based methods are proposed, such as TGAN [48], FreezeD [30], MinGAN [47], ADA [18], DiffAug [53], IDC [33] and RSSA [49], etc. However, these methods still require some training images of the target domain and follow the adversarial training scheme. As a pioneer work, StyleGAN-NADA [8] (NADA for short) proposes a zero-shot adaptation method, which only requires textual domain labels and discards the cumbersome adversarial training scheme by introducing a pre-trained CLIP model. Although efficient, it still has obvious deficiencies, i.e., the limited quality and mode collapse of generated images. As shown in Fig.1, we adapt a pretrained generator of \"Photo\" domain to \"Disney\", \"Anime painting\", \"Wall painting\" and \"Ukiyo-e\" domains. For the results of NADA [8], we notice that the generated images of the same target domain always show some homogeneous patterns which degrade the image quality and diversity, such as deep nasolabial folds in \"Disney\", squinting eyes in \"Anime painting\", red cheeks in \"Wall painting\" and blue eyebrows in \"Ukiyo-e\" (yellow box areas)." }, { "type": "text", "bbox": [ 0.076, 0.596, 0.47, 0.793 ], "angle": 0, "content": "By exploring the factors behind this phenomenon, we find that the key factor is the fixed adaptation direction produced by manually designed prompts. Sharing the direction for all cross-domain image pairs leads to identical supervision signals for the model adaptation. Consider the example, adapting a generator of \"Human\" domain to \"Tolkien elf\" domain as shown in Fig.2. The previous works [8, 22] adopt manually designed prompts (e.g., \"A photo of a\") plus the domain label to produce a fixed adaptation direction, which is shared by all cross-domain image pairs (Fig.2 (a)) in the adaptation process. We argue that the constraint is too restrictive and suppresses the image-specific features, leading to homogeneous generated patterns." }, { "type": "text", "bbox": [ 0.076, 0.796, 0.471, 0.903 ], "angle": 0, "content": "In this paper, we propose an Image-specific Prompt Learning (IPL) method to address the above issue. The motivation is setting more precise and diversified adaptation directions by customizing more image-specific prompts, for instance \"Asian girl\", \"Curly hair lady\" and \"Elder glass man\" (Fig.2 (b)). These adaptation directions endow the target-domain generator with high flexibility to synthesize" }, { "type": "image", "bbox": [ 0.503, 0.092, 0.892, 0.328 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.498, 0.341, 0.895, 0.41 ], "angle": 0, "content": "Figure 2. An illustration of our motivation. The previous methods adopt manual prompts to compute a fixed adaptation direction for all cross-domain image pairs, while our method learns image-specific prompts for producing more precise and diversified adaptation directions." }, { "type": "text", "bbox": [ 0.498, 0.423, 0.892, 0.71 ], "angle": 0, "content": "more diversified images. The proposed IPL is a two-stage method. In Stage 1, a latent mapper is trained to produce an image-specific set of prompt vectors conditioned on each source-domain image by a contrastive training scheme. The learned prompt vectors contain more specific and diversified features of the source-domain images than the fixed prompt vectors. We further propose a domain regularization loss to ensure that the learned prompt vectors are compatible with the target domain. In Stage 2, we compute more precise and diversified adaptation directions for each cross-domain image pair, and train the target-domain generator with an adaptive directional CLIP loss, which can be viewed as an improved version of the Directional CLIP Loss [8]. As shown in Fig.1, our method alleviates the mode collapse issue well. Extensive experiments across a wide range of domains demonstrate that the proposed IPL effectively improves the quality of synthesized images and overcomes the mode collapse issue. User studies and ablation studies are also conducted to validate the effectiveness of our method." }, { "type": "text", "bbox": [ 0.498, 0.71, 0.892, 0.817 ], "angle": 0, "content": "It is worth noting that our proposed IPL method is independent of the structure of the generative model, and can be applied to the recent diffusion models [13,27,31,35,41-43, 51]. Thus we also combine IPL with diffusion models and get a more robust and stronger generative capacity, especially on complex images, which shows the high effectiveness and adaptability of our approach." }, { "type": "title", "bbox": [ 0.5, 0.83, 0.642, 0.847 ], "angle": 0, "content": "2. Related Work" }, { "type": "text", "bbox": [ 0.498, 0.856, 0.892, 0.901 ], "angle": 0, "content": "Generative model adaptation. Generative model adaptation is the task of adapting a generative model trained on a large-scale source domain to a data-limited target domain." }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11495" } ], [ { "type": "text", "bbox": [ 0.076, 0.092, 0.473, 0.289 ], "angle": 0, "content": "According to the size of the training dataset of the target domain, it can be directly divided into two main categories: few-shot generative model adaptation and zero-shot generative model adaptation. For the few-shot generative model adaptation task, the most natural approach is to fine-tune a pre-trained GAN [2, 4, 26, 48]. However, fine-tuning the entire network weights used to result in overfitting. Subsequently, many methods were proposed to alleviate the overfitting issue. They either imposed strong regularization [52, 54], or modified the network parameters with a slight perturbation [30, 32, 37, 47], or preserved some important information by cross-domain alignment [33, 49], or performed data augmentation [45, 53, 55]." }, { "type": "text", "bbox": [ 0.076, 0.293, 0.473, 0.521 ], "angle": 0, "content": "For the zero-shot generative model adaptation task, NADA [8] first proposed to introduce a pre-trained CLIP model for supplying necessary prior knowledge. It only required textual domain labels, and encoded the domain gap as a text-guided adaptation direction in CLIP space. To enhance the identity-preserving capability of real-world image translation, Kim et al. further proposed DiffusionCLIP [22] which utilized diffusion models [42] instead of StyleGANs [18-21] in NADA. Nevertheless, these existing works all adopt a fixed adaptation direction which only contains the basic domain knowledge but no image-specific features. In this paper, we argue that this shared fixed adaptation direction may lead to the mode collapse issue. To produce more accurate and adaptive adaptation directions, we propose to learn diverse and specific prompt vectors for each image." }, { "type": "text", "bbox": [ 0.076, 0.524, 0.473, 0.903 ], "angle": 0, "content": "Prompt learning. Prompt engineering is first introduced as a knowledge probing approach [34]. Given cloze-style prompts, it induces pre-trained language models to generate the corresponding answers. However, manually designed prompts may be sub-optimal and provide imprecise guidance. To tackle this issue, prompt learning [9, 16, 23, 25, 28, 40, 56] has been widely studied in natural language processing to automatically explore the optimal set of prompts. With the unprecedented development of vision-language models [15, 36] in recent years, researchers begin to apply prompt learning to computer vision tasks [7, 10, 17, 24, 57, 58]. In specific, Zhou et al. [57, 58] first adopted context optimization in image classification tasks by modeling context words with continuous vectors in the word embedding space. Subsequently, many downstream tasks in computer vision were also explored, e.g., object detection [7], visual grounding [24], video understanding [17] and transfer learning [10]. As far as we know, this is the first work to propose an adaptive prompt learning scheme for generative model adaptation. Different from previous prompt learning schemes, our method introduces a latent mapper to learn a specific set of prompt vectors for each image. When training the target-domain generator, the learned image-specific prompt vectors could produce more precise adaptation directions to provide better supervision signals." }, { "type": "title", "bbox": [ 0.499, 0.09, 0.637, 0.109 ], "angle": 0, "content": "3. Methodology" }, { "type": "text", "bbox": [ 0.498, 0.115, 0.895, 0.251 ], "angle": 0, "content": "The goal of zero-shot generative model adaptation is to adapt a pre-trained source-domain generator \\( G_{\\mathrm{s}} \\) to an unseen target domain, and get the target-domain generator \\( G_{\\mathrm{t}} \\). The source domain with the domain label \\( \\mathrm{Y_s} \\), e.g., \"Human\", can obtain plentiful high-quality images by \\( G_{\\mathrm{s}} \\). The target domain is described only through the domain label \\( \\mathrm{Y_t} \\), e.g., \"Tolkien elf\", with no images. Following [8, 22], a pre-trained CLIP model [36] including an image encoder \\( E_{\\mathrm{I}} \\) and a text encoder \\( E_{\\mathrm{T}} \\) is introduced." }, { "type": "text", "bbox": [ 0.498, 0.252, 0.895, 0.614 ], "angle": 0, "content": "We propose a two-stage method named Image-specific Prompt Learning (IPL). Its framework is shown in Fig.3. In Stage 1, a latent mapper \\( F \\) is trained to produce a set of image-specific prompt vectors \\( \\{[\\mathbf{V}]_1^i, [\\mathbf{V}]_2^i, \\dots, [\\mathbf{V}]_m^i\\} \\) for each latent code \\( w^i \\) of a source-domain image. Each prompt vector has the same dimension with word embeddings in CLIP space. The training loss consists of a contrastive learning loss \\( \\mathcal{L}_{\\mathrm{contr}} \\) and a domain regularization loss \\( \\mathcal{L}_{\\mathrm{domain}} \\). The former aims to preserve the image-specific features of each source domain image in the learned prompt vectors. The latter constrains the image-specific features to be suitable to the target domain, which means the learned features should not conflict with the target domain. For example, the features of prompts like \"round ear\" should not be contained in the ideal prompt vectors if the target domain is \"Tolkien elf\". In Stage 2, the trained latent mapper \\( F \\) is plugged into the training process of the target-domain generator \\( G_{\\mathrm{t}} \\), and produces more precise and diversified adaptation directions for cross-domain image pairs. This training stage follows [8] except that learned prompt vectors produced by the latent mapper \\( F \\) replace the fixed prompt vectors. The final textual supervision information includes shared learned prompt vectors and respective embeddings of the original domain labels." }, { "type": "title", "bbox": [ 0.499, 0.623, 0.779, 0.64 ], "angle": 0, "content": "3.1. Image-specific prompt learning" }, { "type": "text", "bbox": [ 0.498, 0.647, 0.895, 0.828 ], "angle": 0, "content": "General prompts. The previous methods [8, 22] compute a fixed adaptation direction produced by two embeddings of manually designed prompts, e.g., \"a photo of a human\" and \"a photo of a Tolkien elf\", then constrain the directions of all cross-domain pairs to be parallel with the adaptation direction. In contrast to manually designed prompts, prompt learning [58] aims to find the optimal set of prompt vectors for a domain by directly tuning the embeddings of prompts. Formally, we define a general prompt matrix \\(\\mathrm{M_d}\\) to represent a given domain d. \\(\\mathrm{M_d}\\) consists of the prompt vectors \\([\\mathbf{V}]_1, [\\mathbf{V}]_2, \\dots, [\\mathbf{V}]_m\\) and the embedding of the domain label \\([\\mathrm{Y_d}]\\) as below:" }, { "type": "equation", "bbox": [ 0.597, 0.833, 0.892, 0.851 ], "angle": 0, "content": "\\[\n\\mathrm {M} _ {\\mathrm {d}} = [ \\mathbf {V} ] _ {1} [ \\mathbf {V} ] _ {2} \\dots [ \\mathbf {V} ] _ {m} [ \\mathrm {Y} _ {\\mathrm {d}} ], \\tag {1}\n\\]" }, { "type": "text", "bbox": [ 0.498, 0.856, 0.895, 0.903 ], "angle": 0, "content": "where \\(m\\) is the number of prompts. Suppose the dimension of each embedding is \\(k\\). Then the dimension of \\(\\mathbf{M}_{\\mathrm{d}}\\) should be \\((m + 1) \\times k\\). In [8, 22], the prompt vectors" }, { "type": "page_number", "bbox": [ 0.48, 0.945, 0.521, 0.958 ], "angle": 0, "content": "11496" } ], [ { "type": "image_caption", "bbox": [ 0.131, 0.092, 0.411, 0.105 ], "angle": 0, "content": "Stage 1: Training latent mapper for prompt learning" }, { "type": "image", "bbox": [ 0.129, 0.106, 0.825, 0.293 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.137, 0.298, 0.388, 0.311 ], "angle": 0, "content": "Stage 2: Training generator for image synthesis" }, { "type": "image", "bbox": [ 0.154, 0.311, 0.753, 0.44 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.076, 0.451, 0.892, 0.522 ], "angle": 0, "content": "Figure 3. The framework of our method. In Stage 1, a latent mapper \\( F \\) is trained for prompt learning by a contrastive learning loss \\( \\mathcal{L}_{\\mathrm{contr}} \\) and a domain regularization loss \\( \\mathcal{L}_{\\mathrm{domain}} \\). The image encoder \\( E_{\\mathrm{I}} \\) and the text encoder \\( E_{\\mathrm{T}} \\) are from the CLIP model [36]. In Stage 2, the target-domain generator \\( G_{\\mathrm{t}} \\) is trained for image synthesis by the improved Directional CLIP Loss \\( \\mathcal{L}_{\\mathrm{adapt}} \\) in which the adaptive prompts produced by the latent mapper are applied. In two stages, the locked modules are fixed while the unlocked modules are trained. For simplicity, we replace \\( E_{\\mathrm{I}}(G_{\\mathrm{s}}(w^{i})) \\) and \\( E_{\\mathrm{T}}(\\mathrm{M}_{\\mathrm{s}}^{i}) \\) with \\( \\Gamma^i \\) and \\( \\mathrm{T_s}^i \\), respectively." }, { "type": "text", "bbox": [ 0.076, 0.54, 0.47, 0.616 ], "angle": 0, "content": "\\([\\mathbf{V}]_1, [\\mathbf{V}]_2, \\dots, [\\mathbf{V}]_m\\) are fixed embeddings of manually designed prompts. For prompt learning [58], the prompt vectors are learned by encoding each training image of the domain \\(d\\) with \\(E_{\\mathrm{I}}\\) and the prompt matrix \\(\\mathrm{M_d}\\) with \\(E_{\\mathrm{T}}\\), and then maximizing the cosine similarity between them." }, { "type": "text", "bbox": [ 0.076, 0.622, 0.47, 0.82 ], "angle": 0, "content": "Inspired by prompt learning, in the zero-shot generative model adaptation task, a natural idea is to learn an optimal set of prompt vectors instead of the manually designed prompts in NADA [8]. Although the adaptation direction calculated by the learned prompt vectors seems to be more reasonable than that of the manually designed prompts, it is still fixed and shared for all cross-domain image pairs. These fixed learned prompt vectors can not solve the mode collapse issue (Experimental validations can be seen in Sec. 4.4). To obtain more flexible and diversified adaptation directions, we further propose to learn a set of image-specific prompt vectors for each image, which can be regarded as an improved version of prompt learning." }, { "type": "text", "bbox": [ 0.076, 0.826, 0.47, 0.903 ], "angle": 0, "content": "Image-specific prompts. Utilizing the source-domain generator \\( G_{\\mathrm{s}} \\), we train a latent mapper \\( F \\) as shown in Fig.3 (Stage 1). Through the mapper, each image of the source domain can be matched to an optimal set of prompt vectors. Formally, given a latent code \\( w^{i} \\), corresponding to" }, { "type": "text", "bbox": [ 0.498, 0.54, 0.892, 0.631 ], "angle": 0, "content": "the \\(i^{\\mathrm{th}}\\) image in the source domain, the image-specific set of prompt vectors \\(\\{[\\mathbf{V}]_1^i,[\\mathbf{V}]_2^i,\\dots ,[\\mathbf{V}]_m^i\\}\\) can be obtained by \\(F(w^{i},\\theta)\\), where \\(\\theta\\) denotes the parameters of the latent mapper \\(F\\). Following the definition of the prompt matrix in Eq.(1), we define an image-specific prompt matrix of the \\(i^{\\mathrm{th}}\\) source-domain image as:" }, { "type": "equation", "bbox": [ 0.545, 0.638, 0.892, 0.656 ], "angle": 0, "content": "\\[\n\\mathrm {M} _ {\\mathrm {s}} ^ {i} = F \\left(w ^ {i}, \\theta\\right) \\left[ \\mathrm {Y} _ {\\mathrm {s}} \\right] = \\left[ \\mathrm {V} \\right] _ {1} ^ {i} \\left[ \\mathrm {V} \\right] _ {2} ^ {i} \\dots \\left[ \\mathrm {V} \\right] _ {m} ^ {i} \\left[ \\mathrm {Y} _ {\\mathrm {s}} \\right]. \\tag {2}\n\\]" }, { "type": "text", "bbox": [ 0.498, 0.662, 0.891, 0.691 ], "angle": 0, "content": "In this paper, \\( F \\) is a common four-layer fully-connected network. Next, we show how to train it." }, { "type": "text", "bbox": [ 0.498, 0.692, 0.892, 0.844 ], "angle": 0, "content": "Contrastive training scheme. Given a batch of latent codes \\(\\{w^1, w^2, \\dots, w^n\\}\\), we can produce a batch of sets of prompt matrices \\(\\{\\mathrm{M_s^1}, \\mathrm{M_s^2}, \\dots, \\mathrm{M_s^n}\\}\\) by \\(F\\) and a batch of images \\(\\{G_{\\mathrm{s}}(w^{1}), G_{\\mathrm{s}}(w^{2}), \\dots, G_{\\mathrm{s}}(w^{n})\\}\\) by \\(G_{\\mathrm{s}}\\). Then \\(n \\times n\\) pairs \\(< G_{\\mathrm{s}}(w^{i}), \\mathrm{M}_{\\mathrm{s}}^{j} >\\), \\(i, j \\in \\{1, 2, \\dots, n\\}\\) have been obtained. Then, we take the pairs of \\(i = j\\) as positive samples, and the pairs of \\(i \\neq j\\) as negative samples for contrastive training. Specifically, we compute the similarity between embeddings of the \\(i^{\\text{th}}\\) image and the \\(j^{\\text{th}}\\) prompt matrix in CLIP space as:" }, { "type": "equation", "bbox": [ 0.52, 0.848, 0.892, 0.866 ], "angle": 0, "content": "\\[\n\\operatorname {S i m} _ {i j} = \\operatorname {C o s} \\left(\\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {s}} \\left(w ^ {i}\\right)\\right)\\right), \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {s}} ^ {j}\\right)\\right)\\right), \\tag {3}\n\\]" }, { "type": "text", "bbox": [ 0.498, 0.871, 0.892, 0.902 ], "angle": 0, "content": "where \\(\\mathrm{Norm}(\\cdot)\\) and \\(\\mathrm{Cos}(\\cdot)\\) represent \\(L_{2}\\) normalization and the cosine function, respectively. The similarities of pos" }, { "type": "page_number", "bbox": [ 0.48, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11497" } ], [ { "type": "text", "bbox": [ 0.076, 0.092, 0.47, 0.136 ], "angle": 0, "content": "itive samples are maximized while the similarities of negative samples are minimized. The contrastive loss is expressed as:" }, { "type": "equation", "bbox": [ 0.124, 0.138, 0.469, 0.17 ], "angle": 0, "content": "\\[\n\\mathcal {L} _ {\\text {c o n t r}} = \\mathbb {E} _ {w \\in \\mathcal {W}} \\left(\\sum_ {i \\neq j} \\left(\\operatorname {S i m} _ {i j}\\right) - \\sum_ {i = j} \\left(\\operatorname {S i m} _ {i j}\\right)\\right). \\tag {4}\n\\]" }, { "type": "text", "bbox": [ 0.076, 0.172, 0.473, 0.459 ], "angle": 0, "content": "Domain regularization loss. For the target domain without any prior knowledge except the domain label \\( \\mathrm{Y_t} \\), we can simply share the learned prompt vectors between the source and target domains following [8]. However, the shared prompt vectors may lead to the risk of generating unrealistic images for the target domain, because some learned prompt vectors may contain strongly relevant features to the source domain, leading to conflict with the target domain. For example, an image of \"Human\" domain is matched to prompt vectors of \"round ear\", but a corresponding image of \"Tolkien elf\" domain should not contain the features of \"round ear\". Sharing these prompt vectors is harmful to the target-domain image generation. Therefore, we further propose a domain regularization loss. Specifically, we constrain the angles between the embeddings of the image-specific prompt matrix \\( \\mathbf{M}_{\\mathrm{t}}^{i} \\) and the target-domain label \\( \\mathrm{Y_t} \\) in CLIP space to be small, to avoid the learned prompt vectors conflicting with the target domain. Formally, the domain regularization loss is described as:" }, { "type": "equation", "bbox": [ 0.093, 0.466, 0.47, 0.505 ], "angle": 0, "content": "\\[\n\\mathcal {L} _ {\\text {d o m a i n}} = - \\mathbb {E} _ {w ^ {i} \\in \\mathcal {W}} \\sum_ {i = 1} ^ {n} \\left(\\operatorname {C o s} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {t}} ^ {i}\\right), E _ {\\mathrm {T}} \\left(\\mathrm {Y} _ {\\mathrm {t}}\\right)\\right)\\right), \\tag {5}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.512, 0.469, 0.543 ], "angle": 0, "content": "where \\(\\mathrm{M}_{\\mathrm{t}}^{i}\\) is calculated by Eq.(2) except replacing the domain label, \\(\\mathrm{Cos}(\\cdot)\\) represents the cosine similarity." }, { "type": "text", "bbox": [ 0.077, 0.543, 0.469, 0.573 ], "angle": 0, "content": "As a summary, the whole training loss function of the latent mapper \\(F\\) is:" }, { "type": "equation", "bbox": [ 0.187, 0.581, 0.469, 0.597 ], "angle": 0, "content": "\\[\n\\mathcal {L} = \\mathcal {L} _ {\\text {c o n s t r}} + \\lambda \\mathcal {L} _ {\\text {d o m a i n}}, \\tag {6}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.604, 0.469, 0.651 ], "angle": 0, "content": "where \\(\\lambda\\) is the ratio parameter. Optimized by \\(\\mathcal{L}\\), the learned prompt vectors can not only reflect the features of the source-domain images, but also adapt to the target domain." }, { "type": "title", "bbox": [ 0.077, 0.658, 0.433, 0.674 ], "angle": 0, "content": "3.2. Latent mapper guided generator training" }, { "type": "text", "bbox": [ 0.076, 0.681, 0.469, 0.816 ], "angle": 0, "content": "After training the latent mapper \\( F \\), we conduct the second stage: training the target-domain generator \\( G_{\\mathrm{t}} \\) as shown in Fig.3 (Stage 2). In specific, we plug in the trained latent mapper, and train \\( G_{\\mathrm{t}} \\) with an improved Directional CLIP Loss \\( \\mathcal{L}_{\\mathrm{adapt}} \\). Its main difference with [8] is using the image-specific prompt vectors that are produced on-the-fly by \\( F \\) instead of the fixed ones of manually designed prompts. Formally, given a latent code \\( w^{i} \\), we calculate the direction of the \\( i^{\\mathrm{th}} \\) source and target image pair as below:" }, { "type": "equation", "bbox": [ 0.1, 0.823, 0.469, 0.841 ], "angle": 0, "content": "\\[\n\\Delta \\mathrm {I} _ {i} = \\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {t}} \\left(w ^ {i}\\right)\\right) - \\operatorname {N o r m} \\left(E _ {\\mathrm {I}} \\left(G _ {\\mathrm {s}} \\left(w ^ {i}\\right)\\right), \\right. \\right. \\tag {7}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.848, 0.469, 0.877 ], "angle": 0, "content": "where \\(\\mathrm{Norm}(\\cdot)\\) represents \\(L_{2}\\) normalization. The image-specific adaptation direction is calculated as below:" }, { "type": "equation", "bbox": [ 0.124, 0.885, 0.469, 0.903 ], "angle": 0, "content": "\\[\n\\Delta \\mathrm {T} _ {i} = \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {t}} ^ {i}\\right)\\right) - \\operatorname {N o r m} \\left(E _ {\\mathrm {T}} \\left(\\mathrm {M} _ {\\mathrm {s}} ^ {i}\\right)\\right). \\tag {8}\n\\]" }, { "type": "text", "bbox": [ 0.5, 0.092, 0.816, 0.108 ], "angle": 0, "content": "The improved Directional CLIP Loss \\(\\mathcal{L}_{\\mathrm{adapt}}\\) is:" }, { "type": "equation", "bbox": [ 0.561, 0.118, 0.892, 0.157 ], "angle": 0, "content": "\\[\n\\mathcal {L} _ {\\mathrm {a d a p t}} = \\mathbb {E} _ {w ^ {i} \\in \\mathcal {W}} \\sum_ {i = 1} ^ {n} \\left(1 - \\frac {\\Delta \\mathrm {I} _ {i} \\cdot \\Delta \\mathrm {T} _ {i}}{| \\Delta \\mathrm {I} _ {i} | | \\Delta \\mathrm {T} _ {i} |}\\right), \\tag {9}\n\\]" }, { "type": "text", "bbox": [ 0.499, 0.166, 0.892, 0.212 ], "angle": 0, "content": "where \\( n \\) is the batch size of latent codes. \\( \\mathcal{L}_{\\mathrm{adapt}} \\) constrains the direction of each image pair \\( \\Delta \\mathrm{I}_i \\) with an image-specific adaptation direction \\( \\Delta \\mathrm{T}_i \\)." }, { "type": "title", "bbox": [ 0.5, 0.225, 0.634, 0.241 ], "angle": 0, "content": "4. Experiments" }, { "type": "text", "bbox": [ 0.499, 0.25, 0.892, 0.369 ], "angle": 0, "content": "In this section, we evaluate our method qualitatively and quantitatively. The experimental setup is firstly presented in Sec. 4.1. Then we show image synthesis results across various domains in Sec. 4.2. Utilizing a GAN inversion model and diffusion models, results of real-world image translation are provided in Sec. 4.3. Finally, we carefully conduct ablation studies on prompt designing schemes and loss term ratios in Sec. 4.4." }, { "type": "title", "bbox": [ 0.5, 0.38, 0.688, 0.396 ], "angle": 0, "content": "4.1. Experimental setup" }, { "type": "text", "bbox": [ 0.499, 0.403, 0.892, 0.734 ], "angle": 0, "content": "Baselines and settings. Two strong methods are chosen as our competitors. For zero-shot image synthesis, NADA [8] is the state-of-the-art method. Following NADA [8], we adapt the pre-trained StyleGANv2 [21] generators on (i) Flickr-Faces-HQ (FFHQ) [8] and (ii) Animal FacesHQ (AFHQ) [3], utilize the same pre-trained CLIP [36] built on ViT-B/32 [6]. For zero-shot real-world image translation, we utilize Restyle [1] with e4e [44] encoder to invert a real image into the latent space \\(\\mathcal{W}\\) for StyleGANs. DiffusionCLIP (Diff-CLIP for short) [22] is the state-of-the-art method. We follow the setting of [22] except replacing denoising diffusion implicit models (DDIM) [42] with diffusion autoencoders [35]. The training process includes 300 iterations for prompt learning and 300 iterations for generator adaptation using a single NVIDIA RTX 3090 GPU. The batch size is set to 32 for prompt learning and 2 for generator adaptation. The number of learned prompt vectors \\(m\\) is set to 4. For each domain, the ratio parameter \\(\\lambda\\) in Eq.(6) is selected among [1, 10], according to the best Inception Score [38] of adapted generators. The whole training process requires about \\(10\\sim 20\\) minutes. More implementation details can be seen in supplementary materials." }, { "type": "text", "bbox": [ 0.498, 0.735, 0.892, 0.901 ], "angle": 0, "content": "Evaluation metrics. The ideal generated images should have: 1) high quality and diversity, 2) correct target-domain style, and 3) necessary source-domain information preservation (e.g., structure or identity). For a comprehensive evaluation, we utilize the popular Inception Score (IS) [38] to evaluate the image quality and diversity, the Single Image Fréchet Inception Distance (SIFID) [39] to evaluate the target-domain style, the Structural Consistency Score (SCS) [49] to evaluate the structure preservation, the identity similarity (ID) [5, 12] to evaluate the identity preservation. More details can be seen in supplementary materials." }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11498" } ], [ { "type": "image", "bbox": [ 0.091, 0.093, 0.348, 0.31 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.354, 0.094, 0.609, 0.309 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.615, 0.094, 0.871, 0.31 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.091, 0.322, 0.346, 0.525 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.353, 0.322, 0.61, 0.525 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.616, 0.322, 0.871, 0.525 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.076, 0.528, 0.894, 0.571 ], "angle": 0, "content": "Figure 4. Image synthesis comparison results. For FFHQ [21], the source domain is \"Human\" and the target domains are \"Pixar character\", \"Tolkien elf\", and \"Werewolf\". For AFHQ-Dog [3], the source domain is \"Photo\" and the target domains are \"Cartoon\", \"Pointillism\", and \"Cubism\". The yellow box areas show the mode collapse problem of NADA [8]." }, { "type": "table_caption", "bbox": [ 0.219, 0.578, 0.748, 0.592 ], "angle": 0, "content": "Table 1. Quantitative evaluation results. US denotes user study. The best results are bold." }, { "type": "table", "bbox": [ 0.079, 0.598, 0.898, 0.766 ], "angle": 0, "content": "<table><tr><td rowspan=\"3\">Dataset</td><td rowspan=\"3\">Source→Target</td><td colspan=\"2\">IS [38] (↑)</td><td colspan=\"2\">SCS [49] (↑)</td><td colspan=\"2\">ID [5,12] (↑)</td><td colspan=\"6\">SIFID [39] (↓)</td><td rowspan=\"3\">US (↑)</td></tr><tr><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td rowspan=\"2\">NADA</td><td rowspan=\"2\">IPL</td><td colspan=\"4\">NADA</td><td colspan=\"2\">IPL</td></tr><tr><td>R1</td><td>R2</td><td>R3</td><td>R1</td><td>R2</td><td>R3</td></tr><tr><td rowspan=\"7\">FFHQ [8]</td><td>Photo→Disney</td><td>2.721</td><td>3.089</td><td>0.407</td><td>0.448</td><td>0.782</td><td>0.801</td><td>2.776</td><td>3.136</td><td>3.670</td><td>2.517</td><td>2.930</td><td>3.497</td><td>82.6%</td></tr><tr><td>Photo→Anime painting</td><td>2.450</td><td>3.051</td><td>0.324</td><td>0.518</td><td>0.666</td><td>0.776</td><td>2.956</td><td>1.811</td><td>1.242</td><td>2.845</td><td>1.595</td><td>1.021</td><td>79.3%</td></tr><tr><td>Photo→Wall painting</td><td>2.183</td><td>2.676</td><td>0.439</td><td>0.487</td><td>0.594</td><td>0.637</td><td>1.944</td><td>1.220</td><td>1.331</td><td>1.930</td><td>1.183</td><td>1.274</td><td>80.9%</td></tr><tr><td>Photo→Ukiyo-e</td><td>2.205</td><td>2.974</td><td>0.420</td><td>0.506</td><td>0.775</td><td>0.632</td><td>1.954</td><td>1.990</td><td>1.326</td><td>1.165</td><td>1.255</td><td>0.878</td><td>85.9%</td></tr><tr><td>Human→Pixar character</td><td>2.703</td><td>2.785</td><td>0.379</td><td>0.461</td><td>0.757</td><td>0.853</td><td>0.793</td><td>0.932</td><td>0.865</td><td>0.638</td><td>0.821</td><td>1.092</td><td>86.7%</td></tr><tr><td>Human→Tolkien elf</td><td>2.479</td><td>2.778</td><td>0.416</td><td>0.491</td><td>0.711</td><td>0.772</td><td>0.632</td><td>1.495</td><td>1.452</td><td>0.690</td><td>0.637</td><td>0.701</td><td>76.8%</td></tr><tr><td>Human→Werewolf</td><td>2.619</td><td>2.809</td><td>0.399</td><td>0.417</td><td>0.642</td><td>0.747</td><td>1.969</td><td>1.846</td><td>1.967</td><td>1.734</td><td>1.688</td><td>1.911</td><td>72.7%</td></tr><tr><td rowspan=\"3\">AFHQ [3]</td><td>Photo→Cartoon</td><td>6.505</td><td>8.658</td><td>0.407</td><td>0.563</td><td>0.925</td><td>0.941</td><td>2.708</td><td>2.672</td><td>3.870</td><td>2.517</td><td>2.477</td><td>3.278</td><td>87.6%</td></tr><tr><td>Photo→Pointillism</td><td>5.419</td><td>6.913</td><td>0.224</td><td>0.542</td><td>0.775</td><td>0.881</td><td>7.081</td><td>5.288</td><td>7.142</td><td>4.818</td><td>3.089</td><td>4.074</td><td>78.5%</td></tr><tr><td>Photo→Cubism</td><td>4.165</td><td>6.450</td><td>0.386</td><td>0.463</td><td>0.934</td><td>0.943</td><td>2.779</td><td>2.938</td><td>3.199</td><td>2.431</td><td>2.956</td><td>2.284</td><td>74.3%</td></tr></table>" }, { "type": "title", "bbox": [ 0.077, 0.778, 0.339, 0.794 ], "angle": 0, "content": "4.2. Generative model adaptation" }, { "type": "text", "bbox": [ 0.076, 0.811, 0.471, 0.903 ], "angle": 0, "content": "Qualitative comparison. In addition to Fig.1, we conduct extensive experiments across a wide range of domains as shown in Fig.4. All results indicate that our proposed approach outperforms NADA consistently. The yellow box areas in the figures denote the main different features between NADA and our IPL. From the quality of the gener" }, { "type": "text", "bbox": [ 0.498, 0.779, 0.892, 0.9 ], "angle": 0, "content": "ated images, the results of NADA have more incorrect features and noise, such as green mussy noise on hairs (Tolkien elf), ruined noses (Werewolf) and unshaped necks (Pointillism), while the results of IPL are more clear and correct. From the mode collapse perspective of the generated images, NADA is prone to collapse to some similar facial features for different images, such as depressed emotions (Pixar character), folded ears (Cartoon) and blue noses (Cu" }, { "type": "page_number", "bbox": [ 0.48, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11499" } ], [ { "type": "text", "bbox": [ 0.413, 0.093, 0.558, 0.106 ], "angle": 0, "content": "\"Photo\" \\(\\rightarrow\\) \"Wall painting\"" }, { "type": "image", "bbox": [ 0.086, 0.106, 0.174, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.178, 0.106, 0.265, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.265, 0.106, 0.351, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.351, 0.106, 0.438, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.439, 0.106, 0.528, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.528, 0.106, 0.616, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.618, 0.106, 0.706, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.706, 0.106, 0.793, 0.239 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.793, 0.106, 0.879, 0.239 ], "angle": 0, "content": null }, { "type": "text", "bbox": [ 0.416, 0.24, 0.553, 0.251 ], "angle": 0, "content": "\"Human\" \\(\\rightarrow\\) \"Tolkien elf\"" }, { "type": "image", "bbox": [ 0.086, 0.251, 0.174, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.097, 0.385, 0.162, 0.395 ], "angle": 0, "content": "Real Images" }, { "type": "image", "bbox": [ 0.178, 0.251, 0.265, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.202, 0.385, 0.241, 0.394 ], "angle": 0, "content": "Recon1" }, { "type": "image", "bbox": [ 0.265, 0.251, 0.351, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.29, 0.385, 0.327, 0.394 ], "angle": 0, "content": "NADA" }, { "type": "image", "bbox": [ 0.351, 0.251, 0.438, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.37, 0.385, 0.42, 0.394 ], "angle": 0, "content": "GAN-IPL" }, { "type": "image", "bbox": [ 0.44, 0.251, 0.528, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.462, 0.385, 0.502, 0.394 ], "angle": 0, "content": "Recon2" }, { "type": "image", "bbox": [ 0.528, 0.251, 0.616, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.545, 0.385, 0.601, 0.394 ], "angle": 0, "content": "Diff-CLIP" }, { "type": "image", "bbox": [ 0.619, 0.251, 0.706, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.642, 0.385, 0.682, 0.394 ], "angle": 0, "content": "Recon3" }, { "type": "image", "bbox": [ 0.706, 0.251, 0.793, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.72, 0.385, 0.781, 0.394 ], "angle": 0, "content": "Diff-CLIP+" }, { "type": "image", "bbox": [ 0.794, 0.251, 0.879, 0.384 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.815, 0.385, 0.86, 0.394 ], "angle": 0, "content": "Diff-IPL" }, { "type": "image_caption", "bbox": [ 0.076, 0.398, 0.892, 0.455 ], "angle": 0, "content": "Figure 5. Real-world image translation comparison results. Baselines are NADA [8], Diff-CLIP [22] and Diff-CLIP+ (an improved version of Diff-CLIP). Recon1, Recon2 and Recon3 refer to inversion results via Restyle [1], DDIM and diffusion autoencoders, respectively. GAN-IPL and Diff-IPL denote integrating IPL with NADA and Diff-CLIP+, respectively. Real images are from CelebA-HQ dataset [29] and translated into two styles of images, \"Wall painting\" and \"Tolkien elf\". The yellow boxes show the key observation areas." }, { "type": "text", "bbox": [ 0.076, 0.463, 0.469, 0.569 ], "angle": 0, "content": "bism), while IPL presents consistently higher diversity and solve the mode collapse issue well. Our advantages mainly come from the fact that the latent mapper preserves sufficient image-specific and target-domain friendly features from the source-domain images. The produced prompt vectors provide more precise and diversified adaptation directions for the target-domain generator adaptation." }, { "type": "text", "bbox": [ 0.076, 0.569, 0.469, 0.765 ], "angle": 0, "content": "Quantitative comparison. To quantify the performance improvement of IPL compared to NADA [8], IS, SCS, ID and SIFID are evaluated. As reported in Tab.1, for IS, IPL outperforms NADA on all 10 settings, indicating our method achieves better image quality and diversity. For SCS and ID, IPL outperforms NADA on most of the 10 settings except \"Human \\(\\rightarrow\\) Ukiyo-e\". It is mainly because that \"Ukiyo-e\" naturally favors humans with narrow eyes and pale skin, which encourages identity changes during training. For SIFID, we collect 3 reference images \\((\\mathbb{R}_1,\\mathbb{R}_2,\\) and \\(\\mathbb{R}_3)\\) on the internet for each target domain. Tab.1 shows that IPL outperforms NADA in most cases, indicating our superiority in generating precise target-domain styles." }, { "type": "text", "bbox": [ 0.076, 0.766, 0.469, 0.901 ], "angle": 0, "content": "User studies. For each target domain, 32 images generated by NADA and our method are provided to human observers, together with their corresponding source images and textual labels of target domains. Human observers are required to choose better synthesized images which are semantically more consistent with the target domain labels and preserve the useful source-domain information better. We collect 1210 responses from 121 people using a survey platform. As reported in the last column of Tab.1, \\(80.5\\%\\) of" }, { "type": "text", "bbox": [ 0.5, 0.464, 0.815, 0.479 ], "angle": 0, "content": "users prefer our approach to NADA on average." }, { "type": "title", "bbox": [ 0.5, 0.485, 0.761, 0.501 ], "angle": 0, "content": "4.3. Real-world image translation" }, { "type": "text", "bbox": [ 0.498, 0.509, 0.892, 0.675 ], "angle": 0, "content": "This task first inverts a real-world image to the latent code by a pre-trained inversion model and then feeds it to the trained target-domain generator to get the translated target-domain image. For GAN-based generators, we compare our method (GAN-IPL) with NADA by connecting the inversion model Restyle [1]. For diffusion model generators, we compare our method (Diff-IPL) with Diff-CLIP [22] and Diff-CLIP+ which is an improved version of Diff-CLIP [22] by replacing the original DDIM [42] with a diffusion autoencoder [35]. For these diffusion models, a deterministic inversion process is naturally provided." }, { "type": "text", "bbox": [ 0.498, 0.675, 0.892, 0.901 ], "angle": 0, "content": "As shown in Fig.5, comparing the results of NADA and GAN-IPL, IPL's superiority of alleviating mode collapse over NADA can still be observed. Comparing the results of Recon1, Recon2 and Recon3, diffusion models (Recon2 and Recon3) consistently perform better identity preservation than Restyle (Recon1) for real image inversion, especially for some uncommon stuffs in a human face photo, e.g., the hats, hands and tattoos in Fig.5. However, this property is not well inherited in the target domain generators with a fixed adaptation direction (see the results of Diff-CLIP and Diff-CLIP+). Our proposed IPL could help preserve the details in source images better and present the target-domain styles correctly (see the results of Diff-IPL). Quantitative evaluation results of Diff-CLIP, Diff-CLIP+ and Diff-IPL can be seen in supplementary materials." }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "11500" } ], [ { "type": "image", "bbox": [ 0.088, 0.094, 0.455, 0.366 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.105, 0.369, 0.441, 0.383 ], "angle": 0, "content": "Figure 6. Ablation results of prompt designing schemes." }, { "type": "title", "bbox": [ 0.077, 0.395, 0.239, 0.409 ], "angle": 0, "content": "4.4. Ablation studies" }, { "type": "text", "bbox": [ 0.076, 0.418, 0.47, 0.583 ], "angle": 0, "content": "Prompt designing schemes. We investigate four different prompt designing schemes: 1) manually fixed prompts (NADA), 2) learned fixed prompts, 3) random prompts and 4) adaptive prompts (Ours). Manually fixed prompts mean simply utilizing the manually designed prompts as NADA [8]. Learned fixed prompts denote unified prompt vectors produced by common prompt learning strategy [58] and shared for all images. Random prompts refer to prompt vectors produced by a randomly initialized latent mapper. Adaptive prompts denote the learned image-specific prompt vectors produced by our IPL method." }, { "type": "text", "bbox": [ 0.076, 0.585, 0.47, 0.78 ], "angle": 0, "content": "As illustrated in Fig.6, synthesized images with manually fixed prompts and learned fixed prompts show some similar mode collapse issues, e.g., blue eyebrows (Ukiyo-e) and depressed emotions (Pixar character). They both produce a fixed adaptation direction, which leads to identical supervision signals for all image pairs. Synthesized images with random prompts present more photo-realistic results but lack the desired target-domain style. A possible reason is that the random prompts contain some features conflicting with the target domain and impede the learning of the target domain style. Our adaptive prompts perform best since the prompts contain more image-specific and target-domain friendly features from the source-domain images." }, { "type": "text", "bbox": [ 0.076, 0.781, 0.471, 0.902 ], "angle": 0, "content": "Loss term ratios. We compare different values of the ratio parameter \\(\\lambda\\) in Eq.(6), which is used to adjust the intensity of the domain regularization loss. Visual results are shown in Fig.7. In specific, when we set \\(\\lambda\\) to a small value (\\(\\lambda = 0\\) as an extreme case), there is almost no constraint from the target domain. The learned prompts would excessively preserve the source-domain features. Thus the synthesized images are similar to their corresponding source" }, { "type": "image", "bbox": [ 0.513, 0.094, 0.885, 0.354 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.561, 0.371, 0.831, 0.385 ], "angle": 0, "content": "Figure 7. Ablation results of loss term ratios." }, { "type": "text", "bbox": [ 0.498, 0.398, 0.892, 0.503 ], "angle": 0, "content": "images. In contrast, if \\(\\lambda\\) is set to a large value (\\(\\lambda = 20\\) as an example), a strong target-domain constraint will limit the diversity of the learned prompts. As a result, the synthesized images would slightly show some similar undesired patterns as images generated via fixed prompts. Therefore, in practical applications, \\(\\lambda\\) should be a trade-off value (i.e., between 1 and 10)." }, { "type": "title", "bbox": [ 0.5, 0.514, 0.619, 0.529 ], "angle": 0, "content": "5. Conclusion" }, { "type": "text", "bbox": [ 0.498, 0.536, 0.892, 0.793 ], "angle": 0, "content": "In this paper, we have proposed a novel zero-shot generative model adaptation approach called Image-specific Prompt Learning (IPL). In specific, we build a projection from latent codes to image-specific sets of prompt vectors via a latent mapper. With a contrastive learning scheme and a domain regularization constraint, the learned prompt vectors represent image-specific but target-domain-friendly features, producing more precise and diversified adaptation directions for target domain generator training. Compared with the state-of-the-art approaches, IPL consistently improves the quality of synthesized images and alleviates the mode collapse issue. Furthermore, IPL is independent of the type of generator and works well with both GANs and diffusion models, which exhibits good universality and adaptability. In the future, we will try to apply the proposed image-specific prompt learning strategy in other downstream tasks, such as unsupervised image captioning." }, { "type": "title", "bbox": [ 0.5, 0.804, 0.667, 0.82 ], "angle": 0, "content": "Acknowledgements" }, { "type": "text", "bbox": [ 0.498, 0.826, 0.892, 0.901 ], "angle": 0, "content": "This work is supported in part by the National Key R&D Program of China (2019YFC1408703), the National Natural Science Foundation of China (62022048, 62276150), Guoqiang Institute of Tsinghua University and Beijing Academy of Artificial Intelligence." }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.518, 0.957 ], "angle": 0, "content": "11501" } ], [ { "type": "title", "bbox": [ 0.08, 0.09, 0.175, 0.106 ], "angle": 0, "content": "References" }, { "type": "ref_text", "bbox": [ 0.087, 0.116, 0.468, 0.156 ], "angle": 0, "content": "[1] Yuval Alaluf, Or Patashnik, and Daniel Cohen-Or. ReStyle: A residual-based StyleGAN encoder via iterative refinement. In ICCV, 2021. 5, 7" }, { "type": "ref_text", "bbox": [ 0.087, 0.159, 0.468, 0.199 ], "angle": 0, "content": "[2] Sergey Bartunov and Dmitry Vetrov. Few-shot generative modelling with generative matching networks. In AISTATS, 2018. 3" }, { "type": "ref_text", "bbox": [ 0.089, 0.203, 0.468, 0.242 ], "angle": 0, "content": "[3] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. StarGAN v2: Diverse image synthesis for multiple domains. In CVPR, 2020. 5, 6" }, { "type": "ref_text", "bbox": [ 0.088, 0.246, 0.468, 0.285 ], "angle": 0, "content": "[4] Louis Clouatre and Marc Demers. FIGR: Few-shot image generation with reptile. arXiv preprint arXiv:1901.02199, 2019.3" }, { "type": "ref_text", "bbox": [ 0.089, 0.289, 0.468, 0.329 ], "angle": 0, "content": "[5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. ArcFace: Additive angular margin loss for deep face recognition. In CVPR, 2019. 5, 6" }, { "type": "ref_text", "bbox": [ 0.089, 0.332, 0.468, 0.413 ], "angle": 0, "content": "[6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020. 5" }, { "type": "ref_text", "bbox": [ 0.089, 0.417, 0.468, 0.469 ], "angle": 0, "content": "[7] Yu Du, Fangyun Wei, Zihe Zhang, Miaojing Shi, Yue Gao, and Guoqi Li. Learning to prompt for open-vocabulary object detection with vision-language model. In CVPR, 2022. 3" }, { "type": "ref_text", "bbox": [ 0.089, 0.474, 0.468, 0.527 ], "angle": 0, "content": "[8] Rinon Gal, Or Patashnik, Haggai Maron, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. StyleGAN-NADA: CLIP-guided domain adaptation of image generators. In SIGGRAPH, 2022. 2, 3, 4, 5, 6, 7, 8" }, { "type": "ref_text", "bbox": [ 0.088, 0.531, 0.468, 0.57 ], "angle": 0, "content": "[9] Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. In ACL/IJCNLP, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.574, 0.468, 0.614 ], "angle": 0, "content": "[10] Chunjiang Ge, Rui Huang, Mixue Xie, Zihang Lai, Shiji Song, Shuang Li, and Gao Huang. Domain adaptation via prompt learning. arXiv preprint arXiv:2202.06687, 2022. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.617, 0.468, 0.67 ], "angle": 0, "content": "[11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 1" }, { "type": "ref_text", "bbox": [ 0.08, 0.674, 0.468, 0.727 ], "angle": 0, "content": "[12] Ju He, Jie-Neng Chen, Shuai Liu, Adam Kortylewski, Cheng Yang, Yutong Bai, and Changhu Wang. TransFG: A transformer architecture for fine-grained recognition. In AAAI, 2022. 5, 6" }, { "type": "ref_text", "bbox": [ 0.08, 0.731, 0.468, 0.757 ], "angle": 0, "content": "[13] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.76, 0.468, 0.8 ], "angle": 0, "content": "[14] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.803, 0.468, 0.857 ], "angle": 0, "content": "[15] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.86, 0.468, 0.899 ], "angle": 0, "content": "[16] Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? TACL, 2020. 3" }, { "type": "list", "bbox": [ 0.08, 0.116, 0.468, 0.899 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.503, 0.093, 0.892, 0.134 ], "angle": 0, "content": "[17] Chen Ju, Tengda Han, Kunhao Zheng, Ya Zhang, and Weidi Xie. Prompting visual-language models for efficient video understanding. In ECCV, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.137, 0.892, 0.175 ], "angle": 0, "content": "[18] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In NeurIPS, 2020. 2, 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.179, 0.892, 0.219 ], "angle": 0, "content": "[19] Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. In NeurIPS, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.222, 0.892, 0.261 ], "angle": 0, "content": "[20] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 2, 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.265, 0.892, 0.304 ], "angle": 0, "content": "[21] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In CVPR, 2020. 1, 2, 3, 5, 6" }, { "type": "ref_text", "bbox": [ 0.504, 0.307, 0.892, 0.347 ], "angle": 0, "content": "[22] Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. DiffusionCLIP: Text-guided diffusion models for robust image manipulation. In CVPR, 2022. 2, 3, 5, 7" }, { "type": "ref_text", "bbox": [ 0.504, 0.35, 0.892, 0.388 ], "angle": 0, "content": "[23] Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In EMNLP, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.392, 0.892, 0.459 ], "angle": 0, "content": "[24] Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, Kai-Wei Chang, and Jianfeng Gao. Grounded language-image pre-training. In CVPR, 2022. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.463, 0.892, 0.501 ], "angle": 0, "content": "[25] Xiang Lisa Li and Percy Liang. Prefix-Tuning: Optimizing continuous prompts for generation. In ACL/JCNLP, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.505, 0.892, 0.545 ], "angle": 0, "content": "[26] Weixin Liang, Zixuan Liu, and Can Liu. DAWSON: A domain adaptive few shot generation framework. arXiv preprint arXiv:2001.00576, 2020.3" }, { "type": "ref_text", "bbox": [ 0.504, 0.548, 0.892, 0.614 ], "angle": 0, "content": "[27] Xihui Liu, Dong Huk Park, Samaneh Azadi, Gong Zhang, Arman Chopikyan, Yuxiao Hu, Humphrey Shi, Anna Rohrbach, and Trevor Darrell. More control for free! image synthesis with semantic diffusion guidance. In WACV, 2023. 2" }, { "type": "ref_text", "bbox": [ 0.504, 0.618, 0.892, 0.658 ], "angle": 0, "content": "[28] Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. GPT understands, too. arXiv preprint arXiv:2103.10385, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.661, 0.892, 0.699 ], "angle": 0, "content": "[29] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 7" }, { "type": "ref_text", "bbox": [ 0.504, 0.704, 0.892, 0.743 ], "angle": 0, "content": "[30] Sangwoo Mo, Minsu Cho, and Jinwoo Shin. Freeze the discriminator: a simple baseline for fine-tuning GANs. In CVPR Workshops, 2020. 2, 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.747, 0.892, 0.772 ], "angle": 0, "content": "[31] Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. In ICML, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.504, 0.776, 0.892, 0.814 ], "angle": 0, "content": "[32] Atsuhiro Noguchi and Tatsuya Harada. Image generation from small datasets via batch statistics adaptation. In ICCV, 2019. 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.818, 0.892, 0.87 ], "angle": 0, "content": "[33] Utkarsh Ojha, Yijun Li, Jingwan Lu, Alexei A Efros, Yong Jae Lee, Eli Shechtman, and Richard Zhang. Few-shot image generation via cross-domain correspondence. In CVPR, 2021. 2, 3" }, { "type": "ref_text", "bbox": [ 0.504, 0.874, 0.892, 0.9 ], "angle": 0, "content": "[34] Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian" }, { "type": "list", "bbox": [ 0.503, 0.093, 0.892, 0.9 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.48, 0.945, 0.52, 0.957 ], "angle": 0, "content": "11502" } ], [ { "type": "ref_text", "bbox": [ 0.11, 0.092, 0.468, 0.119 ], "angle": 0, "content": "Riedel. Language models as knowledge bases? In EMNLP-IJCNLP, 2019. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.121, 0.469, 0.175 ], "angle": 0, "content": "[35] Konpat Preechakul, Nattanat Chathee, Suttisak Wizadwongsa, and Supasorn Suwajanakorn. Diffusion Autoencoders: Toward a meaningful and decodable representation. In CVPR, 2022. 2, 5, 7" }, { "type": "ref_text", "bbox": [ 0.08, 0.177, 0.469, 0.258 ], "angle": 0, "content": "[36] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 3, 4, 5" }, { "type": "ref_text", "bbox": [ 0.08, 0.26, 0.469, 0.3 ], "angle": 0, "content": "[37] Esther Robb, Wen-Sheng Chu, Abhishek Kumar, and Jia-Bin Huang. Few-shot adaptation of generative adversarial networks. arXiv preprint arXiv:2010.11943, 2020. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.302, 0.469, 0.342 ], "angle": 0, "content": "[38] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NeurIPS, 2016. 5, 6" }, { "type": "ref_text", "bbox": [ 0.08, 0.344, 0.469, 0.384 ], "angle": 0, "content": "[39] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. SinGAN: Learning a generative model from a single natural image. In ICCV, 2019. 5, 6" }, { "type": "ref_text", "bbox": [ 0.08, 0.386, 0.469, 0.44 ], "angle": 0, "content": "[40] Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In EMNLP, 2020. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.442, 0.469, 0.482 ], "angle": 0, "content": "[41] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In ICML, 2015. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.484, 0.469, 0.51 ], "angle": 0, "content": "[42] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In ICLR, 2020. 2, 3, 5, 7" }, { "type": "ref_text", "bbox": [ 0.08, 0.512, 0.469, 0.55 ], "angle": 0, "content": "[43] Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. NeurIPS, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.553, 0.469, 0.593 ], "angle": 0, "content": "[44] Omer Tov, Yuval Alaluf, Yotam Nitzan, Or Patashnik, and Daniel Cohen-Or. Designing an encoder for StyleGAN image manipulation. TOG, 2021. 5" }, { "type": "ref_text", "bbox": [ 0.08, 0.596, 0.469, 0.636 ], "angle": 0, "content": "[45] Ngoc-Trung Tran, Viet-Hung Tran, Ngoc-Bao Nguyen, Trung-Kien Nguyen, and Ngai-Man Cheung. On data augmentation for GAN training. TIP, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.638, 0.469, 0.677 ], "angle": 0, "content": "[46] Steven Walton, Ali Hassani, Xingqian Xu, Zhangyang Wang, and Humphrey Shi. StyleNAT: Giving each head a new perspective. arXiv preprint arXiv:2211.05770, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.679, 0.469, 0.733 ], "angle": 0, "content": "[47] Yaxing Wang, Abel Gonzalez-Garcia, David Berga, Luis Herranz, Fahad Shahbaz Khan, and Joost van de Weijer. MineGAN: effective knowledge transfer from GANs to target domains with few images. In CVPR, 2020. 2, 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.735, 0.469, 0.788 ], "angle": 0, "content": "[48] Yaxing Wang, Chenshen Wu, Luis Herranz, Joost van de Weijer, Abel Gonzalez-Garcia, and Bogdan Raducanu. Transferring GANs: generating images from limited data. In ECCV, 2018. 2, 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.79, 0.469, 0.842 ], "angle": 0, "content": "[49] Jiayu Xiao, Liang Li, Chaofei Wang, Zheng-Jun Zha, and Qingming Huang. Few shot generative model adaption via relaxed spatial structural alignment. In CVPR, 2022. 2, 3, 5, 6" }, { "type": "ref_text", "bbox": [ 0.08, 0.846, 0.469, 0.899 ], "angle": 0, "content": "[50] Xingqian Xu, Shant Navasardyan, Vahram Tadevosyan, Andranik Sargsyan, Yadong Mu, and Humphrey Shi. Image completion with heterogeneously filtered spectral hints. In WACV, 2023. 2" }, { "type": "list", "bbox": [ 0.08, 0.092, 0.469, 0.899 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.503, 0.093, 0.892, 0.146 ], "angle": 0, "content": "[51] Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, and Humphrey Shi. Versatile Diffusion: Text, images and variations all in one diffusion model. arXiv preprint arXiv:2211.08332, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.149, 0.892, 0.189 ], "angle": 0, "content": "[52] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In ICLR, 2019. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.192, 0.892, 0.233 ], "angle": 0, "content": "[53] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient GAN training. In NeurIPS, 2020. 2, 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.235, 0.892, 0.275 ], "angle": 0, "content": "[54] Zhengli Zhao, Sameer Singh, Honglak Lee, Zizhao Zhang, Augustus Odena, and Han Zhang. Improved consistency regularization for GANs. In AAAI, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.278, 0.892, 0.318 ], "angle": 0, "content": "[55] Zhengli Zhao, Zizhao Zhang, Ting Chen, Sameer Singh, and Han Zhang. Image augmentations for GAN training. arXiv preprint arXiv:2006.02595, 2020. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.321, 0.892, 0.36 ], "angle": 0, "content": "[56] Zexuan Zhong, Dan Friedman, and Danqi Chen. Factual probing is [MASK]: Learning vs. learning to recall. In NAACL-HLT, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.363, 0.892, 0.403 ], "angle": 0, "content": "[57] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Zwei Liu. Conditional prompt learning for vision-language models. In CVPR, 2022. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.406, 0.892, 0.446 ], "angle": 0, "content": "[58] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. IJCV, 2022. 3, 4, 8" }, { "type": "list", "bbox": [ 0.503, 0.093, 0.892, 0.446 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.956 ], "angle": 0, "content": "11503" } ]]123version https://git-lfs.github.com/spec/v1oid sha256:9275c2b0760155974976395f8fcee1bbbd708ca8ad2de5cb5265065460d32a4esize 4333540123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318# Zero-shot Generative Model Adaptation via Image-specific Prompt Learning
Jiayi Guo $^{1*}$ Chaofei Wang $^{1*}$ You Wu $^{2}$ Eric Zhang $^{3}$ Kai Wang $^{3}$ Xingqian Xu $^{3}$ Shiji Song $^{1}$ Humphrey Shi $^{3,4\dagger}$ Gao Huang $^{1\dagger}$
$^{1}$ Tsinghua University, BNRist $^{2}$ UCAS $^{3}$ SHI Labs @ Oregon & UIUC $^{4}$ Picsart AI Research (PAIR) https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation
 Figure 1. The mode collapse issue. For NADA [21] and our method, the same generator pre-trained on the source domain of "Photo" is adapted to the unseen target domains of "Disney", "Anime painting", "Wall painting" and "Ukiyo-e" only with the domain labels. The images above the dotted line are some examples from the internet. The generated images of NADA exhibit some similar unseen patterns (yellow box areas) which are undesired in terms of quality and diversity. This issue is largely addressed by our method.
# Abstract
Recently, CLIP-guided image synthesis has shown appealing performance on adapting a pre-trained source-domain generator to an unseen target domain. It does not require any target-domain samples but only the textual domain labels. The training is highly efficient, e.g., a few minutes. However, existing methods still have some limitations in the quality of generated images and may suffer from the mode collapse issue. A key reason is that a fixed adaptation direction is applied for all cross-domain image pairs, which leads to identical supervision signals. To address this issue, we propose an Image-specific Prompt Learning (IPL) method, which learns specific prompt vec
tors for each source-domain image. This produces a more precise adaptation direction for every cross-domain image pair, endowing the target-domain generator with greatly enhanced flexibility. Qualitative and quantitative evaluations on various domains demonstrate that IPL effectively improves the quality and diversity of synthesized images and alleviates the mode collapse. Moreover, IPL is independent of the structure of the generative model, such as generative adversarial networks or diffusion models. Code is available at https://github.com/Picsart-AI-Research/IPL-Zero-Shot-Generative-Model-Adaptation.
# 1. Introduction
In recent years, image synthesis using generative adversarial networks (GANs) [11] has been rapidly developed.
The state-of-the-art methods can generate images that are hard to be distinguished from real data [14, 20, 21, 46, 50]. However, the GAN-based methods heavily rely on vast quantities of training examples, and adopt a cumbersome adversarial training scheme which generally costs many hours of training time. Unfortunately, in many real-world scenarios, data acquisition is difficult or expensive. For example, in the artistic domains, it is impossible to have artists make thousands of creations. The high training cost is also unacceptable on some embedded devices, e.g., cellphones.
To address these issues, researchers begin to focus on the generative model adaptation. The goal of this task is to adapt a pre-trained source-domain generator to a target domain with limited data. Many few-shot GAN-based methods are proposed, such as TGAN [48], FreezeD [30], MinGAN [47], ADA [18], DiffAug [53], IDC [33] and RSSA [49], etc. However, these methods still require some training images of the target domain and follow the adversarial training scheme. As a pioneer work, StyleGAN-NADA [8] (NADA for short) proposes a zero-shot adaptation method, which only requires textual domain labels and discards the cumbersome adversarial training scheme by introducing a pre-trained CLIP model. Although efficient, it still has obvious deficiencies, i.e., the limited quality and mode collapse of generated images. As shown in Fig.1, we adapt a pretrained generator of "Photo" domain to "Disney", "Anime painting", "Wall painting" and "Ukiyo-e" domains. For the results of NADA [8], we notice that the generated images of the same target domain always show some homogeneous patterns which degrade the image quality and diversity, such as deep nasolabial folds in "Disney", squinting eyes in "Anime painting", red cheeks in "Wall painting" and blue eyebrows in "Ukiyo-e" (yellow box areas).
By exploring the factors behind this phenomenon, we find that the key factor is the fixed adaptation direction produced by manually designed prompts. Sharing the direction for all cross-domain image pairs leads to identical supervision signals for the model adaptation. Consider the example, adapting a generator of "Human" domain to "Tolkien elf" domain as shown in Fig.2. The previous works [8, 22] adopt manually designed prompts (e.g., "A photo of a") plus the domain label to produce a fixed adaptation direction, which is shared by all cross-domain image pairs (Fig.2 (a)) in the adaptation process. We argue that the constraint is too restrictive and suppresses the image-specific features, leading to homogeneous generated patterns.
In this paper, we propose an Image-specific Prompt Learning (IPL) method to address the above issue. The motivation is setting more precise and diversified adaptation directions by customizing more image-specific prompts, for instance "Asian girl", "Curly hair lady" and "Elder glass man" (Fig.2 (b)). These adaptation directions endow the target-domain generator with high flexibility to synthesize
 Figure 2. An illustration of our motivation. The previous methods adopt manual prompts to compute a fixed adaptation direction for all cross-domain image pairs, while our method learns image-specific prompts for producing more precise and diversified adaptation directions.
more diversified images. The proposed IPL is a two-stage method. In Stage 1, a latent mapper is trained to produce an image-specific set of prompt vectors conditioned on each source-domain image by a contrastive training scheme. The learned prompt vectors contain more specific and diversified features of the source-domain images than the fixed prompt vectors. We further propose a domain regularization loss to ensure that the learned prompt vectors are compatible with the target domain. In Stage 2, we compute more precise and diversified adaptation directions for each cross-domain image pair, and train the target-domain generator with an adaptive directional CLIP loss, which can be viewed as an improved version of the Directional CLIP Loss [8]. As shown in Fig.1, our method alleviates the mode collapse issue well. Extensive experiments across a wide range of domains demonstrate that the proposed IPL effectively improves the quality of synthesized images and overcomes the mode collapse issue. User studies and ablation studies are also conducted to validate the effectiveness of our method.
It is worth noting that our proposed IPL method is independent of the structure of the generative model, and can be applied to the recent diffusion models [13,27,31,35,41-43, 51]. Thus we also combine IPL with diffusion models and get a more robust and stronger generative capacity, especially on complex images, which shows the high effectiveness and adaptability of our approach.
# 2. Related Work
Generative model adaptation. Generative model adaptation is the task of adapting a generative model trained on a large-scale source domain to a data-limited target domain.
According to the size of the training dataset of the target domain, it can be directly divided into two main categories: few-shot generative model adaptation and zero-shot generative model adaptation. For the few-shot generative model adaptation task, the most natural approach is to fine-tune a pre-trained GAN [2, 4, 26, 48]. However, fine-tuning the entire network weights used to result in overfitting. Subsequently, many methods were proposed to alleviate the overfitting issue. They either imposed strong regularization [52, 54], or modified the network parameters with a slight perturbation [30, 32, 37, 47], or preserved some important information by cross-domain alignment [33, 49], or performed data augmentation [45, 53, 55].
For the zero-shot generative model adaptation task, NADA [8] first proposed to introduce a pre-trained CLIP model for supplying necessary prior knowledge. It only required textual domain labels, and encoded the domain gap as a text-guided adaptation direction in CLIP space. To enhance the identity-preserving capability of real-world image translation, Kim et al. further proposed DiffusionCLIP [22] which utilized diffusion models [42] instead of StyleGANs [18-21] in NADA. Nevertheless, these existing works all adopt a fixed adaptation direction which only contains the basic domain knowledge but no image-specific features. In this paper, we argue that this shared fixed adaptation direction may lead to the mode collapse issue. To produce more accurate and adaptive adaptation directions, we propose to learn diverse and specific prompt vectors for each image.
Prompt learning. Prompt engineering is first introduced as a knowledge probing approach [34]. Given cloze-style prompts, it induces pre-trained language models to generate the corresponding answers. However, manually designed prompts may be sub-optimal and provide imprecise guidance. To tackle this issue, prompt learning [9, 16, 23, 25, 28, 40, 56] has been widely studied in natural language processing to automatically explore the optimal set of prompts. With the unprecedented development of vision-language models [15, 36] in recent years, researchers begin to apply prompt learning to computer vision tasks [7, 10, 17, 24, 57, 58]. In specific, Zhou et al. [57, 58] first adopted context optimization in image classification tasks by modeling context words with continuous vectors in the word embedding space. Subsequently, many downstream tasks in computer vision were also explored, e.g., object detection [7], visual grounding [24], video understanding [17] and transfer learning [10]. As far as we know, this is the first work to propose an adaptive prompt learning scheme for generative model adaptation. Different from previous prompt learning schemes, our method introduces a latent mapper to learn a specific set of prompt vectors for each image. When training the target-domain generator, the learned image-specific prompt vectors could produce more precise adaptation directions to provide better supervision signals.
# 3. Methodology
The goal of zero-shot generative model adaptation is to adapt a pre-trained source-domain generator $G_{\mathrm{s}}$ to an unseen target domain, and get the target-domain generator $G_{\mathrm{t}}$ . The source domain with the domain label $\mathrm{Y_s}$ , e.g., "Human", can obtain plentiful high-quality images by $G_{\mathrm{s}}$ . The target domain is described only through the domain label $\mathrm{Y_t}$ , e.g., "Tolkien elf", with no images. Following [8, 22], a pre-trained CLIP model [36] including an image encoder $E_{\mathrm{I}}$ and a text encoder $E_{\mathrm{T}}$ is introduced.
We propose a two-stage method named Image-specific Prompt Learning (IPL). Its framework is shown in Fig.3. In Stage 1, a latent mapper $F$ is trained to produce a set of image-specific prompt vectors $\{[\mathbf{V}]_1^i, [\mathbf{V}]_2^i, \dots, [\mathbf{V}]_m^i\}$ for each latent code $w^i$ of a source-domain image. Each prompt vector has the same dimension with word embeddings in CLIP space. The training loss consists of a contrastive learning loss $\mathcal{L}_{\mathrm{contr}}$ and a domain regularization loss $\mathcal{L}_{\mathrm{domain}}$ . The former aims to preserve the image-specific features of each source domain image in the learned prompt vectors. The latter constrains the image-specific features to be suitable to the target domain, which means the learned features should not conflict with the target domain. For example, the features of prompts like "round ear" should not be contained in the ideal prompt vectors if the target domain is "Tolkien elf". In Stage 2, the trained latent mapper $F$ is plugged into the training process of the target-domain generator $G_{\mathrm{t}}$ , and produces more precise and diversified adaptation directions for cross-domain image pairs. This training stage follows [8] except that learned prompt vectors produced by the latent mapper $F$ replace the fixed prompt vectors. The final textual supervision information includes shared learned prompt vectors and respective embeddings of the original domain labels.
# 3.1. Image-specific prompt learning
General prompts. The previous methods [8, 22] compute a fixed adaptation direction produced by two embeddings of manually designed prompts, e.g., "a photo of a human" and "a photo of a Tolkien elf", then constrain the directions of all cross-domain pairs to be parallel with the adaptation direction. In contrast to manually designed prompts, prompt learning [58] aims to find the optimal set of prompt vectors for a domain by directly tuning the embeddings of prompts. Formally, we define a general prompt matrix $\mathrm{M_d}$ to represent a given domain d. $\mathrm{M_d}$ consists of the prompt vectors $[\mathbf{V}]_1, [\mathbf{V}]_2, \dots, [\mathbf{V}]_m$ and the embedding of the domain label $[\mathrm{Y_d}]$ as below:
$$\mathrm {M} _ {\mathrm {d}} = [ \mathbf {V} ] _ {1} [ \mathbf {V} ] _ {2} \dots [ \mathbf {V} ] _ {m} [ \mathrm {Y} _ {\mathrm {d}} ], \tag {1}$$
where $m$ is the number of prompts. Suppose the dimension of each embedding is $k$ . Then the dimension of $\mathbf{M}_{\mathrm{d}}$ should be $(m + 1) \times k$ . In [8, 22], the prompt vectors
 Stage 1: Training latent mapper for prompt learning
 Stage 2: Training generator for image synthesis Figure 3. The framework of our method. In Stage 1, a latent mapper $F$ is trained for prompt learning by a contrastive learning loss $\mathcal{L}_{\mathrm{contr}}$ and a domain regularization loss $\mathcal{L}_{\mathrm{domain}}$ . The image encoder $E_{\mathrm{I}}$ and the text encoder $E_{\mathrm{T}}$ are from the CLIP model [36]. In Stage 2, the target-domain generator $G_{\mathrm{t}}$ is trained for image synthesis by the improved Directional CLIP Loss $\mathcal{L}_{\mathrm{adapt}}$ in which the adaptive prompts produced by the latent mapper are applied. In two stages, the locked modules are fixed while the unlocked modules are trained. For simplicity, we replace $E_{\mathrm{I}}(G_{\mathrm{s}}(w^{i}))$ and $E_{\mathrm{T}}(\mathrm{M}_{\mathrm{s}}^{i})$ with $\Gamma^i$ and $\mathrm{T_s}^i$ , respectively.
$[\mathbf{V}]_1, [\mathbf{V}]_2, \dots, [\mathbf{V}]_m$ are fixed embeddings of manually designed prompts. For prompt learning [58], the prompt vectors are learned by encoding each training image of the domain $d$ with $E_{\mathrm{I}}$ and the prompt matrix $\mathrm{M_d}$ with $E_{\mathrm{T}}$ , and then maximizing the cosine similarity between them.
Inspired by prompt learning, in the zero-shot generative model adaptation task, a natural idea is to learn an optimal set of prompt vectors instead of the manually designed prompts in NADA [8]. Although the adaptation direction calculated by the learned prompt vectors seems to be more reasonable than that of the manually designed prompts, it is still fixed and shared for all cross-domain image pairs. These fixed learned prompt vectors can not solve the mode collapse issue (Experimental validations can be seen in Sec. 4.4). To obtain more flexible and diversified adaptation directions, we further propose to learn a set of image-specific prompt vectors for each image, which can be regarded as an improved version of prompt learning.
Image-specific prompts. Utilizing the source-domain generator $G_{\mathrm{s}}$ , we train a latent mapper $F$ as shown in Fig.3 (Stage 1). Through the mapper, each image of the source domain can be matched to an optimal set of prompt vectors. Formally, given a latent code $w^{i}$ , corresponding to
the $i^{\mathrm{th}}$ image in the source domain, the image-specific set of prompt vectors $\{[\mathbf{V}]_1^i,[\mathbf{V}]_2^i,\dots ,[\mathbf{V}]_m^i\}$ can be obtained by $F(w^{i},\theta)$ , where $\theta$ denotes the parameters of the latent mapper $F$ . Following the definition of the prompt matrix in Eq.(1), we define an image-specific prompt matrix of the $i^{\mathrm{th}}$ source-domain image as:
$$\mathrm {M} _ {\mathrm {s}} ^ {i} = F \left(w ^ {i}, \theta\right) \left[ \mathrm {Y} _ {\mathrm {s}} \right] = \left[ \mathrm {V} \right] _ {1} ^ {i} \left[ \mathrm {V} \right] _ {2} ^ {i} \dots \left[ \mathrm {V} \right] _ {m} ^ {i} \left[ \mathrm {Y} _ {\mathrm {s}} \right]. \tag {2}$$
In this paper, $F$ is a common four-layer fully-connected network. Next, we show how to train it.
Contrastive training scheme. Given a batch of latent codes $\{w^1, w^2, \dots, w^n\}$ , we can produce a batch of sets of prompt matrices $\{\mathrm{M_s^1}, \mathrm{M_s^2}, \dots, \mathrm{M_s^n}\}$ by $F$ and a batch of images $\{G_{\mathrm{s}}(w^{1}), G_{\mathrm{s}}(w^{2}), \dots, G_{\mathrm{s}}(w^{n})\}$ by $G_{\mathrm{s}}$ . Then $n \times n$ pairs $< G_{\mathrm{s}}(w^{i}), \mathrm{M}_{\mathrm{s}}^{j} >$ , $i, j \in \{1, 2, \dots, n\}$ have been obtained. Then, we take the pairs of $i = j$ as positive samples, and the pairs of $i \neq j$ as negative samples for contrastive training. Specifically, we compute the similarity between embeddings of the $i^{\text{th}}$ image and the $j^{\text{th}}$ prompt matrix in CLIP space as:
$$\operatorname {S i m} _ {i j} = \operatorname {C o s} \left(\operatorname {N o r m} \left(E _ {\mathrm {I}} \left(G _ {\mathrm {s}} \left(w ^ {i}\right)\right)\right), \operatorname {N o r m} \left(E _ {\mathrm {T}} \left(\mathrm {M} _ {\mathrm {s}} ^ {j}\right)\right)\right), \tag {3}$$
where $\mathrm{Norm}(\cdot)$ and $\mathrm{Cos}(\cdot)$ represent $L_{2}$ normalization and the cosine function, respectively. The similarities of pos
itive samples are maximized while the similarities of negative samples are minimized. The contrastive loss is expressed as:
$$\mathcal {L} _ {\text {c o n t r}} = \mathbb {E} _ {w \in \mathcal {W}} \left(\sum_ {i \neq j} \left(\operatorname {S i m} _ {i j}\right) - \sum_ {i = j} \left(\operatorname {S i m} _ {i j}\right)\right). \tag {4}$$
Domain regularization loss. For the target domain without any prior knowledge except the domain label $\mathrm{Y_t}$ , we can simply share the learned prompt vectors between the source and target domains following [8]. However, the shared prompt vectors may lead to the risk of generating unrealistic images for the target domain, because some learned prompt vectors may contain strongly relevant features to the source domain, leading to conflict with the target domain. For example, an image of "Human" domain is matched to prompt vectors of "round ear", but a corresponding image of "Tolkien elf" domain should not contain the features of "round ear". Sharing these prompt vectors is harmful to the target-domain image generation. Therefore, we further propose a domain regularization loss. Specifically, we constrain the angles between the embeddings of the image-specific prompt matrix $\mathbf{M}_{\mathrm{t}}^{i}$ and the target-domain label $\mathrm{Y_t}$ in CLIP space to be small, to avoid the learned prompt vectors conflicting with the target domain. Formally, the domain regularization loss is described as:
$$\mathcal {L} _ {\text {d o m a i n}} = - \mathbb {E} _ {w ^ {i} \in \mathcal {W}} \sum_ {i = 1} ^ {n} \left(\operatorname {C o s} \left(E _ {\mathrm {T}} \left(\mathrm {M} _ {\mathrm {t}} ^ {i}\right), E _ {\mathrm {T}} \left(\mathrm {Y} _ {\mathrm {t}}\right)\right)\right), \tag {5}$$
where $\mathrm{M}_{\mathrm{t}}^{i}$ is calculated by Eq.(2) except replacing the domain label, $\mathrm{Cos}(\cdot)$ represents the cosine similarity.
As a summary, the whole training loss function of the latent mapper $F$ is:
$$\mathcal {L} = \mathcal {L} _ {\text {c o n s t r}} + \lambda \mathcal {L} _ {\text {d o m a i n}}, \tag {6}$$
where $\lambda$ is the ratio parameter. Optimized by $\mathcal{L}$ , the learned prompt vectors can not only reflect the features of the source-domain images, but also adapt to the target domain.
# 3.2. Latent mapper guided generator training
After training the latent mapper $F$ , we conduct the second stage: training the target-domain generator $G_{\mathrm{t}}$ as shown in Fig.3 (Stage 2). In specific, we plug in the trained latent mapper, and train $G_{\mathrm{t}}$ with an improved Directional CLIP Loss $\mathcal{L}_{\mathrm{adapt}}$ . Its main difference with [8] is using the image-specific prompt vectors that are produced on-the-fly by $F$ instead of the fixed ones of manually designed prompts. Formally, given a latent code $w^{i}$ , we calculate the direction of the $i^{\mathrm{th}}$ source and target image pair as below:
$$\Delta \mathrm {I} _ {i} = \operatorname {N o r m} \left(E _ {\mathrm {I}} \left(G _ {\mathrm {t}} \left(w ^ {i}\right)\right) - \operatorname {N o r m} \left(E _ {\mathrm {I}} \left(G _ {\mathrm {s}} \left(w ^ {i}\right)\right), \right. \right. \tag {7}$$
where $\mathrm{Norm}(\cdot)$ represents $L_{2}$ normalization. The image-specific adaptation direction is calculated as below:
$$\Delta \mathrm {T} _ {i} = \operatorname {N o r m} \left(E _ {\mathrm {T}} \left(\mathrm {M} _ {\mathrm {t}} ^ {i}\right)\right) - \operatorname {N o r m} \left(E _ {\mathrm {T}} \left(\mathrm {M} _ {\mathrm {s}} ^ {i}\right)\right). \tag {8}$$
The improved Directional CLIP Loss $\mathcal{L}_{\mathrm{adapt}}$ is:
$$\mathcal {L} _ {\mathrm {a d a p t}} = \mathbb {E} _ {w ^ {i} \in \mathcal {W}} \sum_ {i = 1} ^ {n} \left(1 - \frac {\Delta \mathrm {I} _ {i} \cdot \Delta \mathrm {T} _ {i}}{| \Delta \mathrm {I} _ {i} | | \Delta \mathrm {T} _ {i} |}\right), \tag {9}$$
where $n$ is the batch size of latent codes. $\mathcal{L}_{\mathrm{adapt}}$ constrains the direction of each image pair $\Delta \mathrm{I}_i$ with an image-specific adaptation direction $\Delta \mathrm{T}_i$ .
# 4. Experiments
In this section, we evaluate our method qualitatively and quantitatively. The experimental setup is firstly presented in Sec. 4.1. Then we show image synthesis results across various domains in Sec. 4.2. Utilizing a GAN inversion model and diffusion models, results of real-world image translation are provided in Sec. 4.3. Finally, we carefully conduct ablation studies on prompt designing schemes and loss term ratios in Sec. 4.4.
# 4.1. Experimental setup
Baselines and settings. Two strong methods are chosen as our competitors. For zero-shot image synthesis, NADA [8] is the state-of-the-art method. Following NADA [8], we adapt the pre-trained StyleGANv2 [21] generators on (i) Flickr-Faces-HQ (FFHQ) [8] and (ii) Animal FacesHQ (AFHQ) [3], utilize the same pre-trained CLIP [36] built on ViT-B/32 [6]. For zero-shot real-world image translation, we utilize Restyle [1] with e4e [44] encoder to invert a real image into the latent space $\mathcal{W}$ for StyleGANs. DiffusionCLIP (Diff-CLIP for short) [22] is the state-of-the-art method. We follow the setting of [22] except replacing denoising diffusion implicit models (DDIM) [42] with diffusion autoencoders [35]. The training process includes 300 iterations for prompt learning and 300 iterations for generator adaptation using a single NVIDIA RTX 3090 GPU. The batch size is set to 32 for prompt learning and 2 for generator adaptation. The number of learned prompt vectors $m$ is set to 4. For each domain, the ratio parameter $\lambda$ in Eq.(6) is selected among [1, 10], according to the best Inception Score [38] of adapted generators. The whole training process requires about $10\sim 20$ minutes. More implementation details can be seen in supplementary materials.
Evaluation metrics. The ideal generated images should have: 1) high quality and diversity, 2) correct target-domain style, and 3) necessary source-domain information preservation (e.g., structure or identity). For a comprehensive evaluation, we utilize the popular Inception Score (IS) [38] to evaluate the image quality and diversity, the Single Image Fréchet Inception Distance (SIFID) [39] to evaluate the target-domain style, the Structural Consistency Score (SCS) [49] to evaluate the structure preservation, the identity similarity (ID) [5, 12] to evaluate the identity preservation. More details can be seen in supplementary materials.



 Figure 4. Image synthesis comparison results. For FFHQ [21], the source domain is "Human" and the target domains are "Pixar character", "Tolkien elf", and "Werewolf". For AFHQ-Dog [3], the source domain is "Photo" and the target domains are "Cartoon", "Pointillism", and "Cubism". The yellow box areas show the mode collapse problem of NADA [8].


Table 1. Quantitative evaluation results. US denotes user study. The best results are bold.
<table><tr><td rowspan="3">Dataset</td><td rowspan="3">Source→Target</td><td colspan="2">IS [38] (↑)</td><td colspan="2">SCS [49] (↑)</td><td colspan="2">ID [5,12] (↑)</td><td colspan="6">SIFID [39] (↓)</td><td rowspan="3">US (↑)</td></tr><tr><td rowspan="2">NADA</td><td rowspan="2">IPL</td><td rowspan="2">NADA</td><td rowspan="2">IPL</td><td rowspan="2">NADA</td><td rowspan="2">IPL</td><td colspan="4">NADA</td><td colspan="2">IPL</td></tr><tr><td>R1</td><td>R2</td><td>R3</td><td>R1</td><td>R2</td><td>R3</td></tr><tr><td rowspan="7">FFHQ [8]</td><td>Photo→Disney</td><td>2.721</td><td>3.089</td><td>0.407</td><td>0.448</td><td>0.782</td><td>0.801</td><td>2.776</td><td>3.136</td><td>3.670</td><td>2.517</td><td>2.930</td><td>3.497</td><td>82.6%</td></tr><tr><td>Photo→Anime painting</td><td>2.450</td><td>3.051</td><td>0.324</td><td>0.518</td><td>0.666</td><td>0.776</td><td>2.956</td><td>1.811</td><td>1.242</td><td>2.845</td><td>1.595</td><td>1.021</td><td>79.3%</td></tr><tr><td>Photo→Wall painting</td><td>2.183</td><td>2.676</td><td>0.439</td><td>0.487</td><td>0.594</td><td>0.637</td><td>1.944</td><td>1.220</td><td>1.331</td><td>1.930</td><td>1.183</td><td>1.274</td><td>80.9%</td></tr><tr><td>Photo→Ukiyo-e</td><td>2.205</td><td>2.974</td><td>0.420</td><td>0.506</td><td>0.775</td><td>0.632</td><td>1.954</td><td>1.990</td><td>1.326</td><td>1.165</td><td>1.255</td><td>0.878</td><td>85.9%</td></tr><tr><td>Human→Pixar character</td><td>2.703</td><td>2.785</td><td>0.379</td><td>0.461</td><td>0.757</td><td>0.853</td><td>0.793</td><td>0.932</td><td>0.865</td><td>0.638</td><td>0.821</td><td>1.092</td><td>86.7%</td></tr><tr><td>Human→Tolkien elf</td><td>2.479</td><td>2.778</td><td>0.416</td><td>0.491</td><td>0.711</td><td>0.772</td><td>0.632</td><td>1.495</td><td>1.452</td><td>0.690</td><td>0.637</td><td>0.701</td><td>76.8%</td></tr><tr><td>Human→Werewolf</td><td>2.619</td><td>2.809</td><td>0.399</td><td>0.417</td><td>0.642</td><td>0.747</td><td>1.969</td><td>1.846</td><td>1.967</td><td>1.734</td><td>1.688</td><td>1.911</td><td>72.7%</td></tr><tr><td rowspan="3">AFHQ [3]</td><td>Photo→Cartoon</td><td>6.505</td><td>8.658</td><td>0.407</td><td>0.563</td><td>0.925</td><td>0.941</td><td>2.708</td><td>2.672</td><td>3.870</td><td>2.517</td><td>2.477</td><td>3.278</td><td>87.6%</td></tr><tr><td>Photo→Pointillism</td><td>5.419</td><td>6.913</td><td>0.224</td><td>0.542</td><td>0.775</td><td>0.881</td><td>7.081</td><td>5.288</td><td>7.142</td><td>4.818</td><td>3.089</td><td>4.074</td><td>78.5%</td></tr><tr><td>Photo→Cubism</td><td>4.165</td><td>6.450</td><td>0.386</td><td>0.463</td><td>0.934</td><td>0.943</td><td>2.779</td><td>2.938</td><td>3.199</td><td>2.431</td><td>2.956</td><td>2.284</td><td>74.3%</td></tr></table>
# 4.2. Generative model adaptation
Qualitative comparison. In addition to Fig.1, we conduct extensive experiments across a wide range of domains as shown in Fig.4. All results indicate that our proposed approach outperforms NADA consistently. The yellow box areas in the figures denote the main different features between NADA and our IPL. From the quality of the gener
ated images, the results of NADA have more incorrect features and noise, such as green mussy noise on hairs (Tolkien elf), ruined noses (Werewolf) and unshaped necks (Pointillism), while the results of IPL are more clear and correct. From the mode collapse perspective of the generated images, NADA is prone to collapse to some similar facial features for different images, such as depressed emotions (Pixar character), folded ears (Cartoon) and blue noses (Cu
"Photo" $\rightarrow$ "Wall painting"









"Human" $\rightarrow$ "Tolkien elf"
 Real Images Figure 5. Real-world image translation comparison results. Baselines are NADA [8], Diff-CLIP [22] and Diff-CLIP+ (an improved version of Diff-CLIP). Recon1, Recon2 and Recon3 refer to inversion results via Restyle [1], DDIM and diffusion autoencoders, respectively. GAN-IPL and Diff-IPL denote integrating IPL with NADA and Diff-CLIP+, respectively. Real images are from CelebA-HQ dataset [29] and translated into two styles of images, "Wall painting" and "Tolkien elf". The yellow boxes show the key observation areas.
 Recon1
 NADA
 GAN-IPL
 Recon2
 Diff-CLIP
 Recon3
 Diff-CLIP+
 Diff-IPL
bism), while IPL presents consistently higher diversity and solve the mode collapse issue well. Our advantages mainly come from the fact that the latent mapper preserves sufficient image-specific and target-domain friendly features from the source-domain images. The produced prompt vectors provide more precise and diversified adaptation directions for the target-domain generator adaptation.
Quantitative comparison. To quantify the performance improvement of IPL compared to NADA [8], IS, SCS, ID and SIFID are evaluated. As reported in Tab.1, for IS, IPL outperforms NADA on all 10 settings, indicating our method achieves better image quality and diversity. For SCS and ID, IPL outperforms NADA on most of the 10 settings except "Human $\rightarrow$ Ukiyo-e". It is mainly because that "Ukiyo-e" naturally favors humans with narrow eyes and pale skin, which encourages identity changes during training. For SIFID, we collect 3 reference images $(\mathbb{R}_1,\mathbb{R}_2,$ and $\mathbb{R}_3)$ on the internet for each target domain. Tab.1 shows that IPL outperforms NADA in most cases, indicating our superiority in generating precise target-domain styles.
User studies. For each target domain, 32 images generated by NADA and our method are provided to human observers, together with their corresponding source images and textual labels of target domains. Human observers are required to choose better synthesized images which are semantically more consistent with the target domain labels and preserve the useful source-domain information better. We collect 1210 responses from 121 people using a survey platform. As reported in the last column of Tab.1, $80.5\%$ of
users prefer our approach to NADA on average.
# 4.3. Real-world image translation
This task first inverts a real-world image to the latent code by a pre-trained inversion model and then feeds it to the trained target-domain generator to get the translated target-domain image. For GAN-based generators, we compare our method (GAN-IPL) with NADA by connecting the inversion model Restyle [1]. For diffusion model generators, we compare our method (Diff-IPL) with Diff-CLIP [22] and Diff-CLIP+ which is an improved version of Diff-CLIP [22] by replacing the original DDIM [42] with a diffusion autoencoder [35]. For these diffusion models, a deterministic inversion process is naturally provided.
As shown in Fig.5, comparing the results of NADA and GAN-IPL, IPL's superiority of alleviating mode collapse over NADA can still be observed. Comparing the results of Recon1, Recon2 and Recon3, diffusion models (Recon2 and Recon3) consistently perform better identity preservation than Restyle (Recon1) for real image inversion, especially for some uncommon stuffs in a human face photo, e.g., the hats, hands and tattoos in Fig.5. However, this property is not well inherited in the target domain generators with a fixed adaptation direction (see the results of Diff-CLIP and Diff-CLIP+). Our proposed IPL could help preserve the details in source images better and present the target-domain styles correctly (see the results of Diff-IPL). Quantitative evaluation results of Diff-CLIP, Diff-CLIP+ and Diff-IPL can be seen in supplementary materials.
 Figure 6. Ablation results of prompt designing schemes.
# 4.4. Ablation studies
Prompt designing schemes. We investigate four different prompt designing schemes: 1) manually fixed prompts (NADA), 2) learned fixed prompts, 3) random prompts and 4) adaptive prompts (Ours). Manually fixed prompts mean simply utilizing the manually designed prompts as NADA [8]. Learned fixed prompts denote unified prompt vectors produced by common prompt learning strategy [58] and shared for all images. Random prompts refer to prompt vectors produced by a randomly initialized latent mapper. Adaptive prompts denote the learned image-specific prompt vectors produced by our IPL method.
As illustrated in Fig.6, synthesized images with manually fixed prompts and learned fixed prompts show some similar mode collapse issues, e.g., blue eyebrows (Ukiyo-e) and depressed emotions (Pixar character). They both produce a fixed adaptation direction, which leads to identical supervision signals for all image pairs. Synthesized images with random prompts present more photo-realistic results but lack the desired target-domain style. A possible reason is that the random prompts contain some features conflicting with the target domain and impede the learning of the target domain style. Our adaptive prompts perform best since the prompts contain more image-specific and target-domain friendly features from the source-domain images.
Loss term ratios. We compare different values of the ratio parameter $\lambda$ in Eq.(6), which is used to adjust the intensity of the domain regularization loss. Visual results are shown in Fig.7. In specific, when we set $\lambda$ to a small value ( $\lambda = 0$ as an extreme case), there is almost no constraint from the target domain. The learned prompts would excessively preserve the source-domain features. Thus the synthesized images are similar to their corresponding source
 Figure 7. Ablation results of loss term ratios.
images. In contrast, if $\lambda$ is set to a large value ( $\lambda = 20$ as an example), a strong target-domain constraint will limit the diversity of the learned prompts. As a result, the synthesized images would slightly show some similar undesired patterns as images generated via fixed prompts. Therefore, in practical applications, $\lambda$ should be a trade-off value (i.e., between 1 and 10).
# 5. Conclusion
In this paper, we have proposed a novel zero-shot generative model adaptation approach called Image-specific Prompt Learning (IPL). In specific, we build a projection from latent codes to image-specific sets of prompt vectors via a latent mapper. With a contrastive learning scheme and a domain regularization constraint, the learned prompt vectors represent image-specific but target-domain-friendly features, producing more precise and diversified adaptation directions for target domain generator training. Compared with the state-of-the-art approaches, IPL consistently improves the quality of synthesized images and alleviates the mode collapse issue. Furthermore, IPL is independent of the type of generator and works well with both GANs and diffusion models, which exhibits good universality and adaptability. In the future, we will try to apply the proposed image-specific prompt learning strategy in other downstream tasks, such as unsupervised image captioning.
# Acknowledgements
This work is supported in part by the National Key R&D Program of China (2019YFC1408703), the National Natural Science Foundation of China (62022048, 62276150), Guoqiang Institute of Tsinghua University and Beijing Academy of Artificial Intelligence.
# References
[1] Yuval Alaluf, Or Patashnik, and Daniel Cohen-Or. ReStyle: A residual-based StyleGAN encoder via iterative refinement. In ICCV, 2021. 5, 7 [2] Sergey Bartunov and Dmitry Vetrov. Few-shot generative modelling with generative matching networks. In AISTATS, 2018. 3 [3] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. StarGAN v2: Diverse image synthesis for multiple domains. In CVPR, 2020. 5, 6 [4] Louis Clouatre and Marc Demers. FIGR: Few-shot image generation with reptile. arXiv preprint arXiv:1901.02199, 2019.3 [5] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. ArcFace: Additive angular margin loss for deep face recognition. In CVPR, 2019. 5, 6 [6] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020. 5 [7] Yu Du, Fangyun Wei, Zihe Zhang, Miaojing Shi, Yue Gao, and Guoqi Li. Learning to prompt for open-vocabulary object detection with vision-language model. In CVPR, 2022. 3 [8] Rinon Gal, Or Patashnik, Haggai Maron, Amit H Bermano, Gal Chechik, and Daniel Cohen-Or. StyleGAN-NADA: CLIP-guided domain adaptation of image generators. In SIGGRAPH, 2022. 2, 3, 4, 5, 6, 7, 8 [9] Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. In ACL/IJCNLP, 2021. 3 [10] Chunjiang Ge, Rui Huang, Mixue Xie, Zihang Lai, Shiji Song, Shuang Li, and Gao Huang. Domain adaptation via prompt learning. arXiv preprint arXiv:2202.06687, 2022. 3 [11] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 1 [12] Ju He, Jie-Neng Chen, Shuai Liu, Adam Kortylewski, Cheng Yang, Yutong Bai, and Changhu Wang. TransFG: A transformer architecture for fine-grained recognition. In AAAI, 2022. 5, 6 [13] Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In NeurIPS, 2020. 2 [14] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. 2 [15] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, 2021. 3 [16] Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? TACL, 2020. 3
[17] Chen Ju, Tengda Han, Kunhao Zheng, Ya Zhang, and Weidi Xie. Prompting visual-language models for efficient video understanding. In ECCV, 2021. 3 [18] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. In NeurIPS, 2020. 2, 3 [19] Tero Karras, Miika Aittala, Samuli Laine, Erik Härkönen, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Alias-free generative adversarial networks. In NeurIPS, 2021. 3 [20] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. 2, 3 [21] Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of StyleGAN. In CVPR, 2020. 1, 2, 3, 5, 6 [22] Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. DiffusionCLIP: Text-guided diffusion models for robust image manipulation. In CVPR, 2022. 2, 3, 5, 7 [23] Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In EMNLP, 2021. 3 [24] Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, Kai-Wei Chang, and Jianfeng Gao. Grounded language-image pre-training. In CVPR, 2022. 3 [25] Xiang Lisa Li and Percy Liang. Prefix-Tuning: Optimizing continuous prompts for generation. In ACL/JCNLP, 2021. 3 [26] Weixin Liang, Zixuan Liu, and Can Liu. DAWSON: A domain adaptive few shot generation framework. arXiv preprint arXiv:2001.00576, 2020.3 [27] Xihui Liu, Dong Huk Park, Samaneh Azadi, Gong Zhang, Arman Chopikyan, Yuxiao Hu, Humphrey Shi, Anna Rohrbach, and Trevor Darrell. More control for free! image synthesis with semantic diffusion guidance. In WACV, 2023. 2 [28] Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. GPT understands, too. arXiv preprint arXiv:2103.10385, 2021. 3 [29] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In ICCV, 2015. 7 [30] Sangwoo Mo, Minsu Cho, and Jinwoo Shin. Freeze the discriminator: a simple baseline for fine-tuning GANs. In CVPR Workshops, 2020. 2, 3 [31] Alexander Quinn Nichol and Prafulla Dhariwal. Improved denoising diffusion probabilistic models. In ICML, 2021. 2 [32] Atsuhiro Noguchi and Tatsuya Harada. Image generation from small datasets via batch statistics adaptation. In ICCV, 2019. 3 [33] Utkarsh Ojha, Yijun Li, Jingwan Lu, Alexei A Efros, Yong Jae Lee, Eli Shechtman, and Richard Zhang. Few-shot image generation via cross-domain correspondence. In CVPR, 2021. 2, 3 [34] Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian
Riedel. Language models as knowledge bases? In EMNLP-IJCNLP, 2019. 3 [35] Konpat Preechakul, Nattanat Chathee, Suttisak Wizadwongsa, and Supasorn Suwajanakorn. Diffusion Autoencoders: Toward a meaningful and decodable representation. In CVPR, 2022. 2, 5, 7 [36] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 3, 4, 5 [37] Esther Robb, Wen-Sheng Chu, Abhishek Kumar, and Jia-Bin Huang. Few-shot adaptation of generative adversarial networks. arXiv preprint arXiv:2010.11943, 2020. 3 [38] Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training GANs. In NeurIPS, 2016. 5, 6 [39] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. SinGAN: Learning a generative model from a single natural image. In ICCV, 2019. 5, 6 [40] Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In EMNLP, 2020. 3 [41] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In ICML, 2015. 2 [42] Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In ICLR, 2020. 2, 3, 5, 7 [43] Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution. NeurIPS, 2019. 2 [44] Omer Tov, Yuval Alaluf, Yotam Nitzan, Or Patashnik, and Daniel Cohen-Or. Designing an encoder for StyleGAN image manipulation. TOG, 2021. 5 [45] Ngoc-Trung Tran, Viet-Hung Tran, Ngoc-Bao Nguyen, Trung-Kien Nguyen, and Ngai-Man Cheung. On data augmentation for GAN training. TIP, 2021. 3 [46] Steven Walton, Ali Hassani, Xingqian Xu, Zhangyang Wang, and Humphrey Shi. StyleNAT: Giving each head a new perspective. arXiv preprint arXiv:2211.05770, 2022. 2 [47] Yaxing Wang, Abel Gonzalez-Garcia, David Berga, Luis Herranz, Fahad Shahbaz Khan, and Joost van de Weijer. MineGAN: effective knowledge transfer from GANs to target domains with few images. In CVPR, 2020. 2, 3 [48] Yaxing Wang, Chenshen Wu, Luis Herranz, Joost van de Weijer, Abel Gonzalez-Garcia, and Bogdan Raducanu. Transferring GANs: generating images from limited data. In ECCV, 2018. 2, 3 [49] Jiayu Xiao, Liang Li, Chaofei Wang, Zheng-Jun Zha, and Qingming Huang. Few shot generative model adaption via relaxed spatial structural alignment. In CVPR, 2022. 2, 3, 5, 6 [50] Xingqian Xu, Shant Navasardyan, Vahram Tadevosyan, Andranik Sargsyan, Yadong Mu, and Humphrey Shi. Image completion with heterogeneously filtered spectral hints. In WACV, 2023. 2
[51] Xingqian Xu, Zhangyang Wang, Eric Zhang, Kai Wang, and Humphrey Shi. Versatile Diffusion: Text, images and variations all in one diffusion model. arXiv preprint arXiv:2211.08332, 2022. 2 [52] Han Zhang, Zizhao Zhang, Augustus Odena, and Honglak Lee. Consistency regularization for generative adversarial networks. In ICLR, 2019. 3 [53] Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient GAN training. In NeurIPS, 2020. 2, 3 [54] Zhengli Zhao, Sameer Singh, Honglak Lee, Zizhao Zhang, Augustus Odena, and Han Zhang. Improved consistency regularization for GANs. In AAAI, 2021. 3 [55] Zhengli Zhao, Zizhao Zhang, Ting Chen, Sameer Singh, and Han Zhang. Image augmentations for GAN training. arXiv preprint arXiv:2006.02595, 2020. 3 [56] Zexuan Zhong, Dan Friedman, and Danqi Chen. Factual probing is [MASK]: Learning vs. learning to recall. In NAACL-HLT, 2021. 3 [57] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Zwei Liu. Conditional prompt learning for vision-language models. In CVPR, 2022. 3 [58] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. IJCV, 2022. 3, 4, 8123version https://git-lfs.github.com/spec/v1oid sha256:3aa0f45dba721a9c2bfb1fba0d7c14b57caa06be5d9972e12209813566902ae4size 10904981234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560[ { "type": "text", "text": "Zero-shot Model Diagnosis", "text_level": 1, "bbox": [ 346, 130, 622, 152 ], "page_idx": 0 }, { "type": "text", "text": "Jinqi Luo*", "bbox": [ 96, 180, 183, 199 ], "page_idx": 0 }, { "type": "text", "text": "Zhaoning Wang*", "bbox": [ 215, 180, 351, 199 ], "page_idx": 0 }, { "type": "text", "text": "Chen Henry Wu", "bbox": [ 383, 181, 514, 198 ], "page_idx": 0 }, { "type": "text", "text": "Dong Huang", "bbox": [ 555, 181, 660, 198 ], "page_idx": 0 }, { "type": "text", "text": "Fernando De la Torre", "bbox": [ 700, 181, 870, 196 ], "page_idx": 0 }, { "type": "text", "text": "Carnegie Mellon University", "bbox": [ 372, 200, 594, 215 ], "page_idx": 0 }, { "type": "text", "text": "{jinqil, zhaoning, chenwu2, dghuang, ftorre}@cs.cmu.edu", "bbox": [ 238, 219, 723, 233 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 233, 268, 313, 284 ], "page_idx": 0 }, { "type": "text", "text": "When it comes to deploying deep vision models, the behavior of these systems must be explicable to ensure confidence in their reliability and fairness. A common approach to evaluate deep learning models is to build a labeled test set with attributes of interest and assess how well it performs. However, creating a balanced test set (i.e., one that is uniformly sampled over all the important traits) is often time-consuming, expensive, and prone to mistakes. The question we try to address is: can we evaluate the sensitivity of deep learning models to arbitrary visual attributes without an annotated test set?", "bbox": [ 73, 289, 468, 455 ], "page_idx": 0 }, { "type": "text", "text": "This paper argues the case that Zero-shot Model Diagnosis (ZOOM) is possible without the need for a test set nor labeling. To avoid the need for test sets, our system relies on a generative model and CLIP. The key idea is enabling the user to select a set of prompts (relevant to the problem) and our system will automatically search for semantic counterfactual images (i.e., synthesized images that flip the prediction in the case of a binary classifier) using the generative model. We evaluate several visual tasks (classification, key-point detection, and segmentation) in multiple visual domains to demonstrate the viability of our methodology. Extensive experiments demonstrate that our method is capable of producing counterfactual images and offering sensitivity analysis for model diagnosis without the need for a test set.", "bbox": [ 73, 455, 470, 681 ], "page_idx": 0 }, { "type": "text", "text": "1. Introduction", "text_level": 1, "bbox": [ 76, 699, 207, 714 ], "page_idx": 0 }, { "type": "text", "text": "Deep learning models inherit data biases, which can be accentuated or downplayed depending on the model's architecture and optimization strategy. Deploying a computer vision deep learning model requires extensive testing and evaluation, with a particular focus on features with potentially dire social consequences (e.g., non-uniform behavior across gender or ethnicity). Given the importance of the problem, it is common to collect and label large-scale datasets to evaluate the behavior of these models across attributes of interest. Unfortunately, collecting these test", "bbox": [ 75, 724, 468, 876 ], "page_idx": 0 }, { "type": "image", "img_path": "images/3c343307fb18c4ea29ef25ad4087d7b7663b31d9277a7b39fe95b2f82af49943.jpg", "image_caption": [ "Figure 1. Given a differentiable deep learning model (e.g., a cat/dog classifier) and user-defined text attributes, how can we determine the model's sensitivity to specific attributes without using labeled test data? Our system generates counterfactual images (bottom right) based on the textual directions provided by the user, while also computing the sensitivity histogram (top right)." ], "image_footnote": [], "bbox": [ 504, 268, 880, 455 ], "page_idx": 0 }, { "type": "text", "text": "datasets is extremely time-consuming, error-prone, and expensive. Moreover, a balanced dataset, that is uniformly distributed across all attributes of interest, is also typically impractical to acquire due to its combinatorial nature. Even with careful metric analysis in this test set, no robustness nor fairness can be guaranteed since there can be a mismatch between the real and test distributions [25]. This research will explore model diagnosis without relying on a test set in an effort to democratize model diagnosis and lower the associated cost.", "bbox": [ 496, 566, 890, 715 ], "page_idx": 0 }, { "type": "text", "text": "Counterfactual explainability as a means of model diagnosis is drawing the community's attention [5,20]. Counterfactual images visualize the sensitive factors of an input image that can influence the model's outputs. In other words, counterfactuals answer the question: \"How can we modify the input image $\\mathbf{x}$ (while fixing the ground truth) so that the model prediction would diverge from $\\mathbf{y}$ to $\\hat{\\mathbf{y}}$ ?\". The parameterization of such counterfactuals will provide insights into identifying key factors of where the model fails. Unlike existing image-space adversary techniques [4,18], counterfactuals provide semantic perturbations that are interpretable by humans. However, existing counterfactual studies re", "bbox": [ 496, 719, 892, 900 ], "page_idx": 0 }, { "type": "header", "text": "CVF", "bbox": [ 106, 2, 181, 42 ], "page_idx": 0 }, { "type": "header", "text": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore.", "bbox": [ 236, 0, 810, 46 ], "page_idx": 0 }, { "type": "page_footnote", "text": "*Equal contribution.", "bbox": [ 94, 886, 205, 898 ], "page_idx": 0 }, { "type": "page_number", "text": "11631", "bbox": [ 480, 944, 517, 955 ], "page_idx": 0 }, { "type": "text", "text": "require the user to either collect uniform test sets [10], annotate discovered bias [15], or train a model-specific explanation every time the user wants to diagnose a new model [13].", "bbox": [ 75, 90, 467, 136 ], "page_idx": 1 }, { "type": "text", "text": "On the other hand, recent advances in Contrastive Language-Image Pretraining (CLIP) [24] can help to overcome the above challenges. CLIP enables text-driven applications that map user text representations to visual manifolds for downstream tasks such as avatar generation [7], motion generation [37] or neural rendering [22, 30]. In the domain of image synthesis, StyleCLIP [21] reveals that text-conditioned optimization in the StyleGAN [12] latent space can decompose latent directions for image editing, allowing for the mutation of a specific attribute without disturbing others. With such capability, users can freely edit semantic attributes conditioned on text inputs. This paper further explores its use in the scope of model diagnosis.", "bbox": [ 75, 136, 467, 330 ], "page_idx": 1 }, { "type": "text", "text": "The central concept of the paper is depicted in Fig. 1. Consider a user interested in evaluating which factors contribute to the lack of robustness in a cat/dog classifier (target model). By selecting a list of keyword attributes, the user is able to (1) see counterfactual images where semantic variations flip the target model predictions (see the classifier score in the top-right corner of the counterfactual images) and (2) quantify the sensitivity of each attribute for the target model (see sensitivity histogram on the top). Instead of using a test set, we propose using a StyleGAN generator as the picture engine for sampling counterfactual images. CLIP transforms user's text input, and enables model diagnosis in an open-vocabulary setting. This is a major advantage since there is no need for collecting and annotating images and minimal user expert knowledge. In addition, we are not tied to a particular annotation from datasets (e.g., specific attributes in CelebA [16]).", "bbox": [ 75, 332, 467, 588 ], "page_idx": 1 }, { "type": "text", "text": "To summarize, our proposed work offers three major improvements over earlier efforts:", "bbox": [ 76, 589, 467, 619 ], "page_idx": 1 }, { "type": "list", "sub_type": "text", "list_items": [ "- The user requires neither a labeled, balanced test dataset, and minimal expert knowledge in order to evaluate where a model fails (i.e., model diagnosis). In addition, the method provides a sensitivity histogram across the attributes of interest.", "- When a different target model or a new user-defined attribute space is introduced, it is not necessary to retrain our system, allowing for practical use.", "- The target model fine-tuned with counterfactual images not only slightly improves the classification performance, but also greatly increases the distributional robustness against counterfactual images." ], "bbox": [ 94, 625, 467, 825 ], "page_idx": 1 }, { "type": "text", "text": "2. Related Work", "text_level": 1, "bbox": [ 76, 844, 217, 859 ], "page_idx": 1 }, { "type": "text", "text": "This section reviews prior work on attribute editing with generative models and recent efforts on model diagnosis.", "bbox": [ 76, 869, 467, 900 ], "page_idx": 1 }, { "type": "text", "text": "2.1. Attribute Editing with Generative Models", "text_level": 1, "bbox": [ 500, 90, 856, 106 ], "page_idx": 1 }, { "type": "text", "text": "With recent progress in generative models, GANs supports high-quality image synthesis, as well as semantic attributes editing [35]. [1, 6] edit the images by perturbing the intermediate latent space encoded from the original images. These methods rely on images to be encoded to latent vectors to perform attribute editing. On the contrary, StyleGAN [12] can produce images by sampling the latent space. Many works have explored ways to edit attributes in the latent space of StyleGAN, either by relying on image annotations [27] or in an unsupervised manner [8, 28]. StyleSpace [34] further disentangles the latent space of StyleGAN and can perform specific attribute edits by disentangled style vectors. Based upon StyleSpace, StyleCLIP [21] builds the connection between the CLIP language space and StyleGAN latent space to enable arbitrary edits specified by the text. Our work adopts this concept for fine-grained attribute editing.", "bbox": [ 496, 109, 890, 367 ], "page_idx": 1 }, { "type": "text", "text": "2.2. Model Diagnosis", "text_level": 1, "bbox": [ 500, 375, 663, 390 ], "page_idx": 1 }, { "type": "text", "text": "To the best of our knowledge, model diagnosis without a test set is a relatively unexplored problem. In the adversarial learning literature, it is common to find methods that show how image-space perturbations [4, 18] flip the model prediction; however, such perturbations lack visual interpretability. [36] pioneers in synthesizing adversaries by GANs. More recently, [9, 23, 26] propose generative methods to synthesize semantically perturbed images to visualize where the target model fails. However, their attribute editing is limited within the dataset's annotated labels. Instead, our framework allows users to easily customize their own attribute space, in which we visualize and quantify the biased factors that affect the model prediction. On the bias detection track, [13] co-trains a model-specific StyleGAN with each target model, and requires human annotators to name attribute coordinates in the Stylespace. [3, 14, 15] synthesize counterfactual images by either optimally traversing the latent space or learning an attribute hyperplane, after which the user will inspect the represented bias. Unlike previous work, we propose to diagnose a deep learning model without any model-specific re-training, new test sets, or manual annotations/inspections.", "bbox": [ 496, 398, 890, 729 ], "page_idx": 1 }, { "type": "text", "text": "3. Method", "text_level": 1, "bbox": [ 500, 742, 589, 757 ], "page_idx": 1 }, { "type": "text", "text": "This section firstly describes our method to generate counterfactual images guided by CLIP in a zero-shot manner. We then introduce how we perform the sensitivity analysis across attributes of interest. Fig. 2 shows the overview of our framework.", "bbox": [ 496, 763, 890, 838 ], "page_idx": 1 }, { "type": "text", "text": "3.1. Notation and Problem Definition", "text_level": 1, "bbox": [ 500, 847, 785, 861 ], "page_idx": 1 }, { "type": "text", "text": "Let $f_{\\theta}$ , parameterized by $\\theta$ , be the target model that we want to diagnose. In this paper, $f_{\\theta}$ denotes two types of", "bbox": [ 500, 869, 890, 900 ], "page_idx": 1 }, { "type": "page_number", "text": "11632", "bbox": [ 480, 944, 517, 955 ], "page_idx": 1 }, { "type": "image", "img_path": "images/247dfc97e41f80fd7d1d2a86fd3efb21ea4c42cb07451c98651a328c990284e9.jpg", "image_caption": [ "Figure 2. The ZOOM framework. Black solid lines stand for forward passes, red dashed lines stand for backpropagation, and purple dashed lines stand for inference after the optimization converges. The user inputs single or multiple attributes, and we map them into edit directions with the method in Sec. 3.2. Then we assign to each edit direction (attribute) a weight, which represents how much we are adding/removing this attribute. We iteratively perform adversarial learning on the attribute space to maximize the counterfactual effectiveness." ], "image_footnote": [], "bbox": [ 112, 85, 857, 258 ], "page_idx": 2 }, { "type": "text", "text": "deep nets: binary attribute classifiers and face keypoint detectors. Note that our approach is extendable to any end-to-end differentiable target deep models. Let $\\mathcal{G}_{\\phi}$ , parameterized by $\\phi$ , be the style generator that synthesizes images by $\\mathbf{x} = \\mathcal{G}_{\\phi}(\\mathbf{s})$ where $\\mathbf{s}$ is the style vector in Style Space $S$ [34]. We denote a counterfactual image as $\\hat{\\mathbf{x}}$ , which is a synthesized image that misleads the target model $f_{\\theta}$ , and denote the original reference image as $\\mathbf{x}$ . $a$ is defined as a single user input text-based attribute, with its domain $\\mathcal{A} = \\{a_i\\}_{i=1}^N$ for $N$ input attributes. $\\hat{\\mathbf{x}}$ and $\\mathbf{x}$ differs only along attribute directions $\\mathcal{A}$ . Given a set of $\\{f_{\\theta}, \\mathcal{G}_{\\phi}, \\mathcal{A}\\}$ , our goal is to perform counterfactual-based diagnosis to interpret where the model fails without manually collecting nor labeling any test set. Unlike traditional approaches of image-space noises which lack explainability to users, our method adversarially searches the counterfactual in the user-designed semantic space. To this end, our diagnosis will have three outputs, namely counterfactual images (Sec. 3.3), sensitivity histograms (Sec. 3.4), and distributionally robust models (Sec. 3.5).", "bbox": [ 75, 348, 472, 650 ], "page_idx": 2 }, { "type": "text", "text": "3.2. Extracting Edit Directions", "text_level": 1, "bbox": [ 76, 657, 316, 672 ], "page_idx": 2 }, { "type": "text", "text": "This section examines the terminologies, method, and modification we adopt in ZOOM to extract suitable global directions for attribute editing. Since CLIP has shown strong capability in disentangling visual representation [19], we incorporate style channel relevance from Style-CLIP [21] to find edit directions for each attribute.", "bbox": [ 75, 676, 468, 767 ], "page_idx": 2 }, { "type": "text", "text": "Given the user's input strings of attributes, we want to find an image manipulation direction $\\Delta \\mathbf{s}$ for any $\\mathbf{s} \\sim \\mathcal{S}$ , such that the generated image $\\mathcal{G}_{\\phi}(\\mathbf{s} + \\Delta \\mathbf{s})$ only varies in the input attributes. Recall that CLIP maps strings into a text embedding $\\mathbf{t} \\in \\mathcal{T}$ , the text embedding space. For a string attribute description $a$ and a neutral prefix $p$ , we obtain the CLIP text embedding difference $\\Delta \\mathbf{t}$ by:", "bbox": [ 75, 768, 470, 875 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\Delta \\mathbf {t} = \\operatorname {C L I P} _ {\\text {t e x t}} (p \\oplus a) - \\operatorname {C L I P} _ {\\text {t e x t}} (p) \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 140, 880, 468, 897 ], "page_idx": 2 }, { "type": "text", "text": "where $\\oplus$ is the string concatenation operator. To take 'Eyeglasses' as an example, we can get $\\Delta t = \\mathrm{CLIP}_{\\mathrm{text}}$ (a face with Eyeglasses) - $\\mathrm{CLIP}_{\\mathrm{text}}$ (a face).", "bbox": [ 498, 348, 890, 393 ], "page_idx": 2 }, { "type": "text", "text": "To get the edit direction, $\\Delta \\mathbf{s}$ , we need to utilize a style relevance mapper $\\mathbf{M} \\in \\mathbb{R}^{c_S \\times c_T}$ to map between the CLIP text embedding vectors of length $c_{\\mathcal{T}}$ and the Style space vector of length $c_{\\mathcal{S}}$ . StyleCLIP optimizes $\\mathbf{M}$ by iteratively searching meaningful style channels: mutating each channel in $\\mathcal{S}$ and encoding the mutated images by CLIP to assess whether there is a significant change in $\\mathcal{T}$ space. To prevent undesired edits that are irrelevant to the user prompt, the edit direction $\\Delta \\mathbf{s}$ will filter out channels that the style value change is insignificant:", "bbox": [ 496, 393, 892, 545 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\Delta \\mathbf {s} = (\\mathbf {M} \\cdot \\Delta \\mathbf {t}) \\odot \\mathbb {1} ((\\mathbf {M} \\cdot \\Delta \\mathbf {t}) > \\lambda), \\tag {2}\n$$\n", "text_format": "latex", "bbox": [ 568, 554, 890, 570 ], "page_idx": 2 }, { "type": "text", "text": "where $\\lambda$ is the hyper-parameter for the threshold value. $\\mathbb{1}(\\cdot)$ is the indicator function, and $\\odot$ is the element-wise product operator. Since the success of attribute editing by the extracted edit directions will be the key to our approach, Appendix A will show the capability of CLIP by visualizing the global edit direction on multiple sampled images, conducting the user study, and analyzing the effect of $\\lambda$ .", "bbox": [ 496, 580, 890, 686 ], "page_idx": 2 }, { "type": "text", "text": "3.3. Style Counterfactual Synthesis", "text_level": 1, "bbox": [ 500, 694, 772, 710 ], "page_idx": 2 }, { "type": "text", "text": "Identifying semantic counterfactuals necessitates a manageable parametrization of the semantic space for effective exploration. For ease of notation, we denote $(\\Delta \\mathbf{s})_i$ as the global edit direction for $i^{th}$ attribute $a_i \\in \\mathcal{A}$ from the user input. After these $N$ attributes are provided and the edit directions are calculated, we initialize the control vectors $\\mathbf{w}$ of length $N$ where the $i^{th}$ element $w_i$ controls the strength of the $i^{th}$ edit direction. Our counterfactual edit will be a linear combination of normalized edit directions: $\\mathbf{s}_{edit} = \\sum_{i=1}^{N} w_i \\frac{(\\Delta \\mathbf{s})_i}{||(\\Delta \\mathbf{s})_i||}$ .", "bbox": [ 496, 718, 890, 871 ], "page_idx": 2 }, { "type": "text", "text": "The black arrows in Fig. 2 show the forward inference to synthesize counterfactual images. Given the parametriza", "bbox": [ 500, 871, 890, 900 ], "page_idx": 2 }, { "type": "page_number", "text": "11633", "bbox": [ 478, 944, 517, 955 ], "page_idx": 2 }, { "type": "text", "text": "tion of attribute editing strengths and the final loss value, our framework searches for counterfactual examples in the. \noptimizable edit weight space. The original sampled image is $\\mathbf{x} = G_{\\phi}(\\mathbf{s})$ , and the counterfactual image is", "bbox": [ 75, 90, 468, 151 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\hat {\\mathbf {x}} = G _ {\\phi} (\\mathbf {s} + \\mathbf {s} _ {e d i t}) = G _ {\\phi} \\left(\\mathbf {s} + \\sum_ {i = 1} ^ {N} w _ {i} \\frac {(\\Delta \\mathbf {s}) _ {i}}{| | (\\Delta \\mathbf {s}) _ {i} | |}\\right), \\tag {3}\n$$\n", "text_format": "latex", "bbox": [ 91, 160, 468, 200 ], "page_idx": 3 }, { "type": "text", "text": "which is obtained by minimizing the following loss, $\\mathcal{L}$ , that is the weighted sum of three terms:", "bbox": [ 76, 208, 468, 239 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} (\\mathbf {s}, \\mathbf {w}) = \\alpha \\mathcal {L} _ {\\text {t a r g e t}} (\\hat {\\mathbf {x}}) + \\beta \\mathcal {L} _ {\\text {s t r u c t}} (\\hat {\\mathbf {x}}) + \\gamma \\mathcal {L} _ {\\text {a t t r}} (\\hat {\\mathbf {x}}). \\tag {4}\n$$\n", "text_format": "latex", "bbox": [ 86, 247, 468, 266 ], "page_idx": 3 }, { "type": "text", "text": "We back-propagate to optimize $\\mathcal{L}$ w.r.t the weights of the edit directions $\\mathbf{w}$ , shown as the red pipeline in Fig. 2.", "bbox": [ 76, 272, 468, 301 ], "page_idx": 3 }, { "type": "text", "text": "The targeted adversarial loss $\\mathcal{L}_{target}$ for binary attribute classifiers minimizes the distance between the current model prediction $f_{\\theta}(\\hat{\\mathbf{x}})$ with the flip of original prediction $\\hat{p}_{cls} = 1 - f_{\\theta}(\\mathbf{x})$ . In the case of an eyeglass classifier on a person wearing eyeglasses, $\\mathcal{L}_{target}$ will guide the optimization to search w such that the model predicts no eyeglasses. For a keypoint detector, the adversarial loss will minimize the distance between the model keypoint prediction with a set of random points $\\hat{p}_{kp} \\sim \\mathcal{N}$ :", "bbox": [ 75, 303, 468, 439 ], "page_idx": 3 }, { "type": "text", "text": "(binary classifier) $\\mathcal{L}_{target}(\\hat{\\mathbf{x}}) = L_{CE}(f_{\\theta}(\\hat{\\mathbf{x}}),\\hat{p}_{cls})$ (5)", "bbox": [ 84, 446, 468, 464 ], "page_idx": 3 }, { "type": "text", "text": "(keypoint detector) $\\mathcal{L}_{target}(\\hat{\\mathbf{x}}) = L_{MSE}(f_{\\theta}(\\hat{\\mathbf{x}}),\\hat{p}_{kp})$ (6)", "bbox": [ 84, 467, 468, 484 ], "page_idx": 3 }, { "type": "text", "text": "If we only optimize $\\mathcal{L}_{\\text {target }}$ w.r.t the global edit directions, it is possible that the method will not preserve image statistics of the original image and can include the particular attribute that we are diagnosing. To constrain the optimization, we added a structural loss $\\mathcal{L}_{\\text {struct }}$ and an attribute consistency loss $\\mathcal{L}_{\\text {attr }}$ to avoid generation collapse. $\\mathcal{L}_{\\text {struct }}$ [32] aims to preserve global image statistics of the original image x including image contrasts, background, or shape identity during the adversarial editing. While $\\mathcal{L}_{\\text {attr }}$ enforces that the target attribute (perceived ground truth) be consistent on the style edits. For example, when diagnosing the eyeglasses classifier, ZOOM preserves the original status of eyeglasses and precludes direct eyeglasses addition/removal.", "bbox": [ 75, 491, 468, 700 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\text {s t r u c t}} (\\hat {\\mathbf {x}}) = L _ {\\text {S S I M}} (\\hat {\\mathbf {x}}, \\mathbf {x}) \\tag {7}\n$$\n", "text_format": "latex", "bbox": [ 135, 710, 468, 727 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\text {a t t r}} (\\hat {\\mathbf {x}}) = L _ {C E} \\left(\\operatorname {C L I P} (\\hat {\\mathbf {x}}), \\operatorname {C L I P} (\\mathbf {x})\\right) \\tag {8}\n$$\n", "text_format": "latex", "bbox": [ 148, 729, 468, 746 ], "page_idx": 3 }, { "type": "text", "text": "Given a pretrained target model $f_{\\theta}$ , a domain-specific style generator $G_{\\phi}$ , and a text-driven attribute space $\\mathcal{A}$ , our goal is to sample an original style vector $\\mathbf{s}$ for each image and search its counterfactual edit strength $\\hat{\\mathbf{w}}$ :", "bbox": [ 76, 755, 468, 816 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\hat {\\mathbf {w}} = \\underset {\\mathbf {w}} {\\operatorname {a r g m i n}} \\mathcal {L} (\\mathbf {s}, \\mathbf {w}). \\tag {9}\n$$\n", "text_format": "latex", "bbox": [ 197, 824, 468, 848 ], "page_idx": 3 }, { "type": "text", "text": "Unless otherwise stated, we iteratively update $\\mathbf{w}$ as:", "bbox": [ 76, 854, 419, 869 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathbf {w} = \\operatorname {c l a m p} _ {[ - \\epsilon , \\epsilon ]} (\\mathbf {w} - \\eta \\nabla_ {\\mathbf {w}} \\mathcal {L}), \\tag {10}\n$$\n", "text_format": "latex", "bbox": [ 166, 878, 468, 897 ], "page_idx": 3 }, { "type": "text", "text": "where $\\eta$ is the step size and $\\epsilon$ is the clamp bound to avoid synthesis collapse caused by exaggerated edit. Note that the maximum counterfactual effectiveness does not indicate the maximum edit strength (i.e., $w_{i} = \\epsilon$ ), since the attribute edit direction does not necessarily overlap with the target classifier direction. The attribute change is bi-directional, as the $w_{i}$ can be negative in Eq. 3. Details of using other optimization approaches (e.g., linear approximation [18]) will be discussed in Appendix C.", "bbox": [ 496, 90, 890, 227 ], "page_idx": 3 }, { "type": "text", "text": "3.4. Attribute Sensitivity Analysis", "text_level": 1, "bbox": [ 500, 238, 761, 255 ], "page_idx": 3 }, { "type": "text", "text": "Single-attribute counterfactual reflects the sensitivity of target model on the individual attribute. By optimizing independently along the edit direction for a single attribute and averaging the model probability changes over images, our model generates independent sensitivity score $h_i$ for each attribute $a_i$ :", "bbox": [ 496, 262, 890, 352 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\nh _ {i} = \\mathbb {E} _ {\\mathbf {x} \\sim \\mathcal {P} (\\mathbf {x}), \\hat {\\mathbf {x}} = \\mathrm {Z O O M} (\\mathbf {x}, a _ {i})} | f _ {\\theta} (\\mathbf {x}) - f _ {\\theta} (\\hat {\\mathbf {x}}) |. \\tag {11}\n$$\n", "text_format": "latex", "bbox": [ 531, 367, 890, 385 ], "page_idx": 3 }, { "type": "text", "text": "The sensitivity score $h_i$ is the probability difference between the original image $\\mathbf{x}$ and generated image $\\hat{\\mathbf{x}}$ , at the most counterfactual point when changing attribute $a_i$ . We synthesize a number of images from $\\mathcal{G}_{\\phi}$ , then iteratively compute the sensitivity for each given attribute, and finally normalize all sensitivities to draw the histogram as shown in Fig. 4. The histogram indicates the sensitivity of the evaluated model $f_{\\theta}$ on each of the user-defined attributes. Higher sensitivity of one attribute means that the model is more easily affected by that attribute.", "bbox": [ 496, 396, 890, 547 ], "page_idx": 3 }, { "type": "text", "text": "3.5. Counterfactual Training", "text_level": 1, "bbox": [ 500, 559, 723, 575 ], "page_idx": 3 }, { "type": "text", "text": "The multi-attribute counterfactual approach visualizes semantic combinations that cause the model to falter, providing valuable insights for enhancing the model's robustness. We naturally adopt the concept of iterative adversarial training [18] to robustify the target model. For each iteration, ZOOM receives the target model parameter and returns a batch of mutated counterfactual images with the model's original predictions as labels. Then the target model will be trained on the counterfactually-augmented images to achieve the robust goal:", "bbox": [ 496, 583, 890, 734 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\theta^ {*} = \\underset {\\theta} {\\operatorname {a r g m i n}} \\mathbb {E} _ {\\mathbf {x} \\sim \\mathcal {P} (\\mathbf {x}), \\hat {\\mathbf {x}} = \\operatorname {Z O O M} (\\mathbf {x}, A)} L _ {C E} \\left(f _ {\\theta} (\\hat {\\mathbf {x}}), f _ {\\theta} (\\mathbf {x})\\right) \\tag {12}\n$$\n", "text_format": "latex", "bbox": [ 509, 746, 890, 767 ], "page_idx": 3 }, { "type": "text", "text": "where batches of $\\mathbf{x}$ are randomly sampled from the StyleGAN generator $\\mathcal{G}_{\\phi}$ . In the following, we abbreviate the process as Counterfactual Training (CT). Note that, although not explicitly expressed in Eq. 12, the CT process is a min-max game. ZOOM synthesizes counterfactuals to maximize the variation of model prediction (while persevering the perceived ground truth), and the target model is learned with the counterfactual images to minimize the variation.", "bbox": [ 496, 779, 890, 900 ], "page_idx": 3 }, { "type": "page_number", "text": "11634", "bbox": [ 480, 944, 517, 955 ], "page_idx": 3 }, { "type": "image", "img_path": "images/382f5252f5eef69ed8ac56fa86f515853e05d632939c48c6660966221ace8272.jpg", "image_caption": [ "Open Mouth" ], "image_footnote": [], "bbox": [ 83, 88, 163, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/6e6f7765c0c6d9f1d2dfdc190d779bfe664e680f1fa60e96badfb38c36bde1f4.jpg", "image_caption": [ "$\\frac{1}{2}x - 1 > 0$" ], "image_footnote": [], "bbox": [ 163, 88, 243, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/d58c5d6850d439ce2439ccb870594aa331b04646e7cdef3bd0558f01e41331d5.jpg", "image_caption": [ "$\\frac{1}{2}x - 1 > 0$" ], "image_footnote": [], "bbox": [ 243, 88, 323, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/71d46012b365d52f94b9082a48b36a98cd58e025a583732997d1de6c2f945647.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 323, 88, 401, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/e52e69fb3e1a7bb5d2200ba25acd415cca0e9d8625a7a2ccf1e06fd40de18944.jpg", "image_caption": [ "Closed Mouth" ], "image_footnote": [], "bbox": [ 401, 88, 480, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/5998e6f16297004dcded0e568b7cc7fa1aeb1d4478fa0d868cedde8c94e8abb9.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 482, 88, 560, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/f8433beb32c5896e06a7aa642d6d2e15c4fb1518e7fd0631894bb952d4187d32.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 560, 88, 640, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/b6dd9a6086f785bfc6b1ac4c27d8833b5f9c5b1ab95041790dcf663b8f50f846.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 640, 88, 720, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/28703eb187d242dc891d55db71d5efddeceab3e8980a5c1277a0ce6afedee26e.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 720, 88, 800, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/7614e0fc2876e9a275a20e70f7ed9a9f2b21e3d09bda32999fac3b9d7e2e8d29.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 802, 88, 882, 150 ], "page_idx": 4 }, { "type": "image", "img_path": "images/6a3a3474601bb128b509ebe8645c0463326834db7d238ec593ff709a98712b77.jpg", "image_caption": [ "Felidae Pupil", "$\\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH" ], "image_footnote": [], "bbox": [ 83, 162, 163, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/4d6861e565df844de868c6952bcbc37a40413ae51cdc59f8416074b34ef31c4e.jpg", "image_caption": [ "$\\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH" ], "image_footnote": [], "bbox": [ 163, 162, 243, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/4d8a7695d44eb9f470f709190f28a206de0c1aab536a4b0437ec3bc92cf5bd11.jpg", "image_caption": [ "$\\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH" ], "image_footnote": [], "bbox": [ 243, 162, 323, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/d057aae1bdbe74f1ef3ade2252fe5600868dacc63d10ffa80489d5108f2465cd.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 323, 162, 401, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/7f0ee7ecc4f01729ebc6c197b05497ab9e0d2c9ad1e1974529aaba7ff496842a.jpg", "image_caption": [ "Canidae Pupil" ], "image_footnote": [], "bbox": [ 401, 162, 480, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/950ca79c0a21d73328cb6c2141ef3a183badae2ab7c780a9fdaf31d8eff33e9a.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 482, 162, 560, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/4a3892a846507c7e850b5c42d892d2c92afc49f1ac4bfb0c9247b91e1e0e3782.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 560, 162, 640, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/fff7032c14f3dd2afb30d5725689aeb7224f00b1835d24d2086789fd848604f4.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 640, 162, 720, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/f4ee52e5caa6487a1c008a41983ab01976ff119b38dd1cfdc50448e4f2284da8.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 720, 162, 800, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/f01f0ae813036598b13cd750bae2ac75ae2ade78cfe29545fa92258a290b064b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 802, 162, 882, 224 ], "page_idx": 4 }, { "type": "image", "img_path": "images/fa8994a05b33e168543b91bca0c47422be0966914496d537e87c679df5e3861f.jpg", "image_caption": [ "Figure 3. Effect of progressively generating counterfactual images on (left) cat/dog classifier (0-Cat / 1-Dog), and (right) perceived age classifier (0-Senior / 1-Young). Model probability prediction during the process is attached at the top right corner." ], "image_footnote": [], "bbox": [ 76, 277, 277, 383 ], "page_idx": 4 }, { "type": "image", "img_path": "images/727877f509e7e5d67c5b05d7d903a72ee905c64a7b8dbdfad753de413e2325fe.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 279, 277, 478, 383 ], "page_idx": 4 }, { "type": "image", "img_path": "images/b77fcf9e992f6c5a9b18b69d5691eb5072855ddebb3e5b44b5ca39ecb67ab12b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 488, 277, 681, 383 ], "page_idx": 4 }, { "type": "image", "img_path": "images/5600c547b9caf898459903860dd888f4bcb0a9050f29754b6b7151f43b1597df.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 684, 277, 883, 383 ], "page_idx": 4 }, { "type": "image", "img_path": "images/1847122c4f8c41b0eb8a40cf92eecf152e7305a956b9ffb3b71751c5c69b6fd7.jpg", "image_caption": [ "(a) Model diagnosis histograms generated by ZOOM on four facial attribute classifiers.", "(b) Model diagnosis histograms generated by ZOOM on four classifiers trained on manually-crafted imbalance data.", "Figure 4. Model diagnosis histograms generated by ZOOM. The vertical axis values reflect the attribute sensitivities calculated by averaging the model probability change over all sampled images. The horizontal axis is the attribute space input by user." ], "image_footnote": [], "bbox": [ 76, 398, 277, 500 ], "page_idx": 4 }, { "type": "image", "img_path": "images/7aefa2cf30afb6773a8d83624c5cc365680c7a839dfb50d5f30e1c4037506cf3.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 279, 398, 478, 500 ], "page_idx": 4 }, { "type": "image", "img_path": "images/3b29ecd3f3d5ddb487e1fec77c9ab7e51b89f73310a02eefdbed083bdd755f27.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 482, 398, 681, 500 ], "page_idx": 4 }, { "type": "image", "img_path": "images/e39ef17850764b0a9307a0e37db6c248af616552d7b6550dc1ceacd5997a6f2f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 684, 398, 883, 500 ], "page_idx": 4 }, { "type": "text", "text": "4. Experimental Results", "text_level": 1, "bbox": [ 75, 569, 281, 585 ], "page_idx": 4 }, { "type": "text", "text": "This section describes the experimental validations on the effectiveness and reliability of ZOOM. First, we describe the model setup in Sec. 4.1. Sec. 4.2 and Sec. 4.3 visualize and validate the model diagnosis results for the single-attribute setting. In Sec. 4.4, we show results on synthesized multiple-attribute counterfactual images and apply them to counterfactual training.", "bbox": [ 75, 594, 468, 700 ], "page_idx": 4 }, { "type": "text", "text": "4.1. Model Setup", "text_level": 1, "bbox": [ 75, 708, 210, 724 ], "page_idx": 4 }, { "type": "text", "text": "Pre-trained models: We used Stylegan2-ADA [11] pretrained on FFHQ [12] and AFHQ [1] as our base generative networks, and the pre-trained CLIP model [24] which is parameterized by ViT-B/32. We followed StyleCLIP [21] setups to compute the channel relevance matrices $\\mathcal{M}$ .", "bbox": [ 75, 731, 468, 806 ], "page_idx": 4 }, { "type": "text", "text": "Target models: Our classifier models are ResNet50 with single fully-connected head initialized by TorchVision<sup>1</sup>. In training the binary classifiers, we use the Adam optimizer with learning rate 0.001 and batch size 128. We train binary", "bbox": [ 75, 806, 468, 867 ], "page_idx": 4 }, { "type": "text", "text": "classifiers for Eyeglasses, Perceived Gender, Mustache, Perceived Age attributes on CelebA and for cat/dog classification on AFHQ. For the 98-keypoint detectors, we used the HR-Net architecture [31] on WFLW [33].", "bbox": [ 498, 571, 890, 631 ], "page_idx": 4 }, { "type": "text", "text": "4.2. Visual Model Diagnosis: Single-Attribute", "text_level": 1, "bbox": [ 498, 646, 852, 662 ], "page_idx": 4 }, { "type": "text", "text": "Understanding where deep learning model fails is an essential step towards building trustworthy models. Our proposed work allows us to generate counterfactual images (Sec. 3.3) and provide insights on sensitivities of the target model (Sec. 3.4). This section visualizes the counterfactual images in which only one attribute is modified at a time.", "bbox": [ 496, 672, 890, 762 ], "page_idx": 4 }, { "type": "text", "text": "Fig. 3 shows the single-attribute counterfactual images. Interestingly (but not unexpectedly), we can see that reducing the hair length or joyfulness causes the age classifier more likely to label the face to an older person. Note that our approach is extendable to multiple domains, as we change the cat-like pupil to dog-like, the dog-cat classification tends towards the dog. Using the counterfactual images, we can conduct model diagnosis with the method mentioned in Sec. 3.4, on which attributes the model is sen", "bbox": [ 496, 763, 890, 898 ], "page_idx": 4 }, { "type": "page_footnote", "text": "<sup>1</sup>https://pytorch.org/blog/how-to-train-state-of-the-art-models-using-torchvision-latest-primitives/", "bbox": [ 75, 875, 457, 898 ], "page_idx": 4 }, { "type": "page_number", "text": "11635", "bbox": [ 480, 944, 517, 955 ], "page_idx": 4 }, { "type": "text", "text": "sitive to. In the histogram generated in model diagnosis, a higher bar means the model is more sensitive toward the corresponding attribute.", "bbox": [ 75, 90, 468, 136 ], "page_idx": 5 }, { "type": "text", "text": "Fig. 4a shows the model diagnosis histograms on regularly-trained classifiers. For instance, the cat/dog classifier histogram shows outstanding sensitivity to green eyes and vertical pupil. The analysis is intuitive since these are cat-biased traits rarely observed in dog photos. Moreover, the histogram of eyeglasses classifier shows that the mutation on bushy eyebrows is more influential for flipping the model prediction. It potentially reveals the positional correlation between eyeglasses and bushy eyebrows. The advantage of single-attribute model diagnosis is that the score of each attribute in the histogram are independent from other attributes, enabling unambiguous understanding of exact semantics that make the model fail. Diagnosis results for additional target models can be found in Appendix B.", "bbox": [ 75, 137, 470, 348 ], "page_idx": 5 }, { "type": "text", "text": "4.3. Validation of Visual Model Diagnosis", "text_level": 1, "bbox": [ 76, 358, 397, 375 ], "page_idx": 5 }, { "type": "text", "text": "Evaluating whether our zero-shot sensitivity histograms (Fig. 4) explain the true vulnerability is a difficult task, since we do not have access to a sufficiently large and balanced test set fully annotated in an open-vocabulary setting. To verify the performance, we create synthetically imbalanced cases where the model bias is known. We then compare our results with a supervised diagnosis setting [17]. In addition, we will validate the decoupling of the attributes by CLIP.", "bbox": [ 75, 382, 468, 503 ], "page_idx": 5 }, { "type": "text", "text": "4.3.1 Creating imbalanced classifiers", "text_level": 1, "bbox": [ 76, 516, 348, 531 ], "page_idx": 5 }, { "type": "text", "text": "In order to evaluate whether our sensitivity histogram is correct, we train classifiers that are highly imbalanced towards a known attribute and see whether ZOOM can detect the sensitivity w.r.t the attribute. For instance, when training the perceived-age classifier (binarized as Young in CelebA), we created a dataset on which the trained classifier is strongly sensitive to Bangs (hair over forehead). The custom dataset is a CelebA training subset that consists of 20, 200 images. More specifically, there are 10,000 images that have both young people that have bangs, represented as (1, 1), and 10,000 images of people that are not young and have no bangs, represented as (0, 0). The remaining combinations of (1, 0) and (0, 1) have only 100 images. With this imbalanced dataset, bangs is the attribute that dominantly correlates with whether the person is young, and hence the perceived-age classifier would be highly sensitive towards bangs. See Fig. 5 (the right histograms) for an illustration of the sensitivity histogram computed by our method for the case of an age classifier with bangs (top) and lipstick (bottom) being imbalanced.", "bbox": [ 75, 537, 468, 838 ], "page_idx": 5 }, { "type": "text", "text": "We trained multiple imbalanced classifiers with this methodology, and visualize the model diagnosis histograms of these imbalanced classifiers in Fig. 4b. We can observe that the ZOOM histograms successfully detect the", "bbox": [ 75, 839, 468, 900 ], "page_idx": 5 }, { "type": "image", "img_path": "images/03c482988bb95c3fb2b913e7d04e7753f129604886046e43297446927fd39540.jpg", "image_caption": [ "Figure 5. The sensitivity of the age classifier is evaluated with ZOOM (right) and AttGAN (left), achieving comparable results." ], "image_footnote": [], "bbox": [ 500, 90, 888, 337 ], "page_idx": 5 }, { "type": "image", "img_path": "images/868104e74e862e5874b0fc8bdea2db78e9c3a4eddc9dca8eb7eac1b667dd688e.jpg", "image_caption": [ "(a) Mustache classifier", "Figure 6. Confusion matrix of CLIP score variation (vertical axis) when perturbing attributes (horizontal axis). This shows that attributes in ZOOM are highly decoupled." ], "image_footnote": [], "bbox": [ 506, 383, 691, 518 ], "page_idx": 5 }, { "type": "image", "img_path": "images/dcbaf559d890ab0d776db1dfd7c533b9d30df76634298628b22e1c7d2c277833.jpg", "image_caption": [ "(b) Perceived age classifier" ], "image_footnote": [], "bbox": [ 697, 383, 885, 518 ], "page_idx": 5 }, { "type": "text", "text": "synthetically-made bias, which are shown as the highest bars in histograms. See the caption for more information.", "bbox": [ 498, 595, 890, 627 ], "page_idx": 5 }, { "type": "text", "text": "4.3.2 Comparison with supervised diagnosis", "text_level": 1, "bbox": [ 500, 638, 821, 652 ], "page_idx": 5 }, { "type": "text", "text": "We also validated our histogram by comparing it with the case in which we have access to a generative model that has been explicitly trained to disentangle attributes. We follow the work on [17] and used AttGAN [6] trained on the CelebA training set over 15 attributes<sup>2</sup>. After the training converged, we performed adversarial learning in the attribute space of AttGAN and create a sensitivity histogram using the same approach as Sec. 3.4. Fig. 5 shows the result of this method on the perceived-age classifier which is made biased towards bangs. As anticipated, the AttGAN histogram (left) corroborates the histogram derived from our method (right). Interestingly, unlike ZOOM, AttGAN show less sensitivity to remaining attributes. This is likely", "bbox": [ 496, 657, 890, 854 ], "page_idx": 5 }, { "type": "page_footnote", "text": "$^{2}$ Bald, Bangs, Black_Hair, Blond_Hair, Brown_Hair, Bushy_Eyesbrows, Eyeglasses, Male, Mouth_Slightly_Open, Mustache, No_Board, Pale_Skin, Young, Smiling, Wearing_Lipstick.", "bbox": [ 500, 862, 890, 900 ], "page_idx": 5 }, { "type": "page_number", "text": "11636", "bbox": [ 480, 944, 517, 955 ], "page_idx": 5 }, { "type": "image", "img_path": "images/971f72c88bb26074e4f23622c9671dc69ad2c5c8ef52b1de0e3abff7f432ed84.jpg", "image_caption": [ "Counterfactual Original" ], "image_footnote": [], "bbox": [ 98, 102, 176, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/59a77b820be44c6ef95e06c79ed435d4aea09f30e59a51a44334ce5918612f50.jpg", "image_caption": [ "Figure 7. Multi-attribute counterfactual in faces. The model probability is documented in the upper right corner of each image." ], "image_footnote": [], "bbox": [ 98, 165, 176, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/f9405d19790d274a6d1931829f8e4e575bd3f7cc28b5941c5c136c6e6fe50c9f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 176, 102, 254, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/0b74918e51861880fb6780c140d8792c3dd7328306aa4b189e381e22a0959b59.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 176, 165, 254, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/62d9231115f02f5bfbba46a4a4e0d5568e7376856e2196457f2c2cadb092c30d.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 256, 102, 333, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/95c9e54324f64ecb0c2b49a24c3925de7336d3b45bf0e60163eb774073f3797e.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 256, 165, 333, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/35b5f6e20e6167a44791b6cb91234ca74c030f5e4c36171689c395c8065cd4e6.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 334, 102, 411, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/97e45ff9d147e87912d810e4d276a4c527a7d1ad64ea900907f4c91ed774a842.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 334, 165, 411, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/da9051d7fff8dc80e0c62ad7ee8bb1f22aee7c66ceee600246b30ecd46b68ec9.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 413, 102, 490, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/fb66c5f6fd296b219f4e39383cf0d5e8611263f518e77b88dcc07bac8524b5fb.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 413, 165, 490, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/64ca890b2eb603a0c45fbe34384d65cb3f74b4fb1c434434a634b531abed726f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 491, 102, 570, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/75a69bd63b6bb345d672a5f742d694288aff8578f206e84032f24c69b9a9b894.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 491, 165, 570, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/ca61c210042de2fc0e449802d99fb5d4d50854952d4b0d1c3b744eeb1bc247eb.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 571, 102, 650, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/946eed3c0bbd26dbe64a2cfba69b326b2847fd1f8cba97cbe6ac25e8917ff046.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 571, 165, 650, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/d123ff6aac734384ccd47ae0c44a41de25a370497a5d42d8c5f027dda49c9db5.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 651, 102, 730, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/0ef9843e612c9e58dda93b42683eadb3af0fd3f8500c8a006c5c82c974bc2501.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 651, 165, 730, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/117f9d63d2885bbdb0be3707734cbab387bc97bca6cd5b6a8ae619f0b9996fa3.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 732, 102, 807, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/f48d716b2acde35b9f94c46749523a8fb01e8260331bb184c25132e442f4c22e.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 732, 165, 807, 223 ], "page_idx": 6 }, { "type": "image", "img_path": "images/c909bca5f6f918435a78f23e7f3cbf31b341cf4d888a1eecd8568c29216efa66.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 810, 102, 887, 164 ], "page_idx": 6 }, { "type": "image", "img_path": "images/2e4a4d43d388288a2a74b5386a43481c22c06d07edd49bac51178d01e8a5a1bf.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 810, 165, 887, 223 ], "page_idx": 6 }, { "type": "text", "text": "because AttGAN has a latent space learned in a supervised manner and hence attributes are better disentangled than with StyleGAN. Note that AttGAN is trained with a fixed set of attributes; if a new attribute of interest is introduced, the dataset needs to be re-labeled and AttGAN retrained. ZOOM, however, merely calls for the addition of a new text prompt. More results in Appendix B.", "bbox": [ 75, 263, 467, 368 ], "page_idx": 6 }, { "type": "text", "text": "4.3.3 Measuring disentanglement of attributes", "text_level": 1, "bbox": [ 76, 380, 413, 393 ], "page_idx": 6 }, { "type": "text", "text": "Previous works demonstrated that the StyleGAN's latent space can be entangled [2, 27], adding undesired dependencies when searching single-attribute counterfactuals. This section verifies that our framework can disentangle the attributes and mostly edit the desirable attributes.", "bbox": [ 75, 400, 467, 474 ], "page_idx": 6 }, { "type": "text", "text": "We use CLIP as a super annotator to measure attribute changes during single-attribute modifications. For 1,000 images, we record the attribute change after performing adversarial learning in each attribute, and average the attribute score change. Fig. 6 shows the confusion matrix during single-attribute counterfactual synthesis. The horizontal axis is the attribute being edited during the optimization, and the vertical axis represents the CLIP prediction changed by the process. For instance, the first column of Fig. 6a is generated when we optimize over bangs for the mustache classifier. We record the CLIP prediction variation. It clearly shows that bangs is the dominant attribute changing during the optimization. From the main diagonal of matrices, it is evident that the ZOOM mostly perturbs the attribute of interest. The results indicate reasonable disentanglement among attributes.", "bbox": [ 75, 476, 467, 715 ], "page_idx": 6 }, { "type": "text", "text": "4.4. Visual Model Diagnosis: Multi-Attributes", "text_level": 1, "bbox": [ 76, 726, 431, 741 ], "page_idx": 6 }, { "type": "text", "text": "In the previous sections, we have visualized and validated single-attribute model diagnosis histograms and counterfactual images. In this section, we will assess ZOOM's ability to produce counterfactual images by concurrently exploring multiple attributes within $\\mathcal{A}$ , the domain of user-defined attributes. The approach conducts multi-attribute counterfactual searches across various edit directions, identifying distinct semantic combinations that result in the target model's failure. By doing so, we can effectively create more powerful counterfactuals images (see Fig. 9).", "bbox": [ 75, 750, 467, 900 ], "page_idx": 6 }, { "type": "image", "img_path": "images/d63f194e849545ee4d327760565ffb442da574671e4f852701c57f64f75ccd06.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 503, 271, 576, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/2a8b19bda7e3c098f3b7515ecb4c437e82aff219568f13b46ca980369ed954b0.jpg", "image_caption": [ "Figure 8. Multi-attribute counterfactual on Cat/Dog classifier. The number in each image is the predicted probability of being a dog." ], "image_footnote": [], "bbox": [ 503, 316, 576, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/97575becca7c2b0a58f05e7bd3efea1ce8f805407f9a9a8bc5b0b8fa133de821.jpg", "image_caption": [ "Cat / Dog Classifier (0-Cat / 1-Dog)" ], "image_footnote": [], "bbox": [ 578, 271, 640, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/9f015960384356c923f938a96ad155d7920e2f40848154f6927b5ca61d80c9da.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 578, 318, 640, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/9dc79a7da6f29d71c72a5adf20673275f04537bf9eea485fde0a25d54eae61fd.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 640, 271, 702, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b0ef6e22515f9fbe3fe524912b72ea323ef911ac09d0c03ab0e227513c25dffc.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 640, 318, 702, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/eacf43272b02d9d8200813f9d64795ddfee3402d5fde9196f88ee01631e050d5.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 702, 271, 764, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/00c3b77821922449ec954cf2a408c8a712da33871a82ab4f911ece894aeb4d58.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 702, 318, 764, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/73ef0f2cf59bc1d4b27d02b70df889a8d0b602bd88ce7e79c4b3b4e6e43cb0e9.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 764, 271, 826, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/44bba462e0e42241c95319ec2b01d11c8a422c41b0ce523d8f3136a9bc721633.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 764, 318, 826, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/93e5220bf68cbf225c272fed33def41a45c1fad35b0f715590fc34da455c23ed.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 828, 271, 887, 316 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b8335552498ed460f4d22b2fd05b6d4609a5b26d9c180d8d4bc002a607f780d4.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 828, 318, 887, 364 ], "page_idx": 6 }, { "type": "image", "img_path": "images/5d137f7d3aa9d683b7868c27d6b50d55214821f413f2a649b34ec317e8ccc450.jpg", "image_caption": [ "Original Reference" ], "image_footnote": [], "bbox": [ 503, 419, 580, 477 ], "page_idx": 6 }, { "type": "image", "img_path": "images/cd94d5ea6748597fb9c03d4f85d7fe91a324a817224d3587d29b461780e9954f.jpg", "image_caption": [ "SAC by Beard" ], "image_footnote": [], "bbox": [ 581, 419, 656, 477 ], "page_idx": 6 }, { "type": "image", "img_path": "images/ef8f24a423832c377b502751ea1a6ec5c02870f6c9bf6f57ca957e36e35ccf1e.jpg", "image_caption": [ "SAC by Pale Skin" ], "image_footnote": [], "bbox": [ 658, 419, 733, 477 ], "page_idx": 6 }, { "type": "image", "img_path": "images/14f558865c5e0601cdaa01a946868a1455678b57180ec80975d4ed1ececa0a91.jpg", "image_caption": [ "SAC by Black Hair" ], "image_footnote": [], "bbox": [ 735, 419, 812, 477 ], "page_idx": 6 }, { "type": "image", "img_path": "images/d503aca254f8fbd0ba1ddfc316957c35f64f0e256656c8f21634b487f29c57bd.jpg", "image_caption": [ "Multiple-Attribute" ], "image_footnote": [], "bbox": [ 813, 419, 890, 477 ], "page_idx": 6 }, { "type": "image", "img_path": "images/4175e75073b501fe5f39001245d583575431f4cbce9915be62cc70647315c29c.jpg", "image_caption": [ "Original Reference" ], "image_footnote": [], "bbox": [ 503, 494, 580, 553 ], "page_idx": 6 }, { "type": "image", "img_path": "images/5d65bb23276b3a3c12c60e02c786251d3ba8fc8c89d311fea013e13ecf6352fa.jpg", "image_caption": [ "SAC by Lips Color" ], "image_footnote": [], "bbox": [ 581, 494, 656, 553 ], "page_idx": 6 }, { "type": "image", "img_path": "images/3fa0538d80ef39f3390920970221e72096153f9028e5e434697ae973a6488b8f.jpg", "image_caption": [ "SAC by Smiling" ], "image_footnote": [], "bbox": [ 658, 494, 735, 553 ], "page_idx": 6 }, { "type": "image", "img_path": "images/1fa5c86fcdf03b6475a88a8351d7ebf59208fccfc5f637b753b80fc3793cd0d7.jpg", "image_caption": [ "SAC by Bangs" ], "image_footnote": [], "bbox": [ 735, 494, 812, 553 ], "page_idx": 6 }, { "type": "image", "img_path": "images/06ab8a56e1dd662eb7212a310fc18e69a77dde02e44ad7df8ead56fe5f2145de.jpg", "image_caption": [ "Multiple-Attribute", "Figure 9. Multiple-Attribute Counterfactual (MAC, Sec. 4.4) compared with Single-Attribute Counterfactual (SAC, Sec. 4.2). We can see that optimization along multiple directions enable the generation of more powerful counterfactuals." ], "image_footnote": [], "bbox": [ 813, 494, 890, 553 ], "page_idx": 6 }, { "type": "text", "text": "Fig. 7 and Fig. 8 show examples of multi-attribute counterfactual images generated by ZOOM, against human and animal face classifiers. It can be observed that multiple face attributes such as lipsticks or hair color are edited in Fig. 7, and various cat/dog attributes like nose pinkness, eye shape, and fur patterns are edited in Fig. 8. These attribute edits are blended to affect the target model prediction. Appendix B further illustrates ZOOM counterfactual images for semantic segmentation, multi-class classification, and a church classifier. By mutating semantic representations, ZOOM reveals semantic combinations as outliers where the target model underfits.", "bbox": [ 496, 648, 890, 829 ], "page_idx": 6 }, { "type": "text", "text": "In the following sections, we will use the Flip Rate (the percentage of counterfactuals that flipped the model prediction) and Flip Resistance (the percentage of counterfactuals for which the model successfully withheld its prediction) to evaluate the multi-attribute setting.", "bbox": [ 496, 833, 890, 907 ], "page_idx": 6 }, { "type": "header", "text": "Eyeglasses Classifier (0-No Eyeglasses / 1-Eyeglasses)", "bbox": [ 119, 89, 395, 99 ], "page_idx": 6 }, { "type": "header", "text": "Perceived Age Classifier (0-Senior / 1-Young)", "bbox": [ 415, 89, 648, 99 ], "page_idx": 6 }, { "type": "header", "text": "Facial Keypoint Detector (WFLW)", "bbox": [ 678, 89, 859, 99 ], "page_idx": 6 }, { "type": "page_number", "text": "11637", "bbox": [ 480, 944, 517, 955 ], "page_idx": 6 }, { "type": "image", "img_path": "images/3a31fe81e15c74b575c6093e46f0834299f52fbd05a5297a4af77ec9e568073e.jpg", "image_caption": [ "(a) Sensitivity histograms generated by ZOOM on attribute combinations." ], "image_footnote": [], "bbox": [ 76, 87, 271, 188 ], "page_idx": 7 }, { "type": "image", "img_path": "images/b0c505f7748d04f811c5d12aed9bbf43c879e1b7ff0a3273c81dba77b6e38c5b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 272, 87, 467, 188 ], "page_idx": 7 }, { "type": "image", "img_path": "images/0801f88cca854414287012d32b85e15604c661f7e8ca63dfc868dc3e24766f24.jpg", "image_caption": [ "(b) Model diagnosis by ZOOM over 19 attributes. Our framework is generalizable to analyze facial attributes of various domains.", "Figure 10. Customizing attribute space for ZOOM." ], "image_footnote": [], "bbox": [ 76, 204, 464, 287 ], "page_idx": 7 }, { "type": "text", "text": "4.4.1 Customizing attribute space", "text_level": 1, "bbox": [ 76, 347, 326, 363 ], "page_idx": 7 }, { "type": "text", "text": "In some circumstances, users may finish one round of model diagnosis and proceed to another round by adding new attributes, or trying a new attribute space. The linear nature of attribute editing (Eq. 3) in ZOOM makes it possible to easily add or remove attributes. Table 1 shows the flip rates results when adding new attributes into $\\mathcal{A}$ for perceived age classifier and big lips classifier. We can observe that a different attribute space will result in different effectiveness of counterfactual images. Also, increasing the search iteration will make counterfactual more effective (see last row). Note that neither re-training the StyleGAN nor user-collection/labeling of data is required at any point in this procedure. Moreover, Fig. 10a shows the model diagnosis histograms generated with combinations of two attributes. Fig. 10b demonstrates the capability of ZOOM in a rich vocabulary setting where we can analyze attributes that are not labeled in existing datasets [16, 29].", "bbox": [ 75, 364, 468, 621 ], "page_idx": 7 }, { "type": "text", "text": "4.4.2 Counterfactual training results", "text_level": 1, "bbox": [ 76, 627, 346, 642 ], "page_idx": 7 }, { "type": "text", "text": "This section evaluates regular classifiers trained on CelebA [16] and counterfactually-trained (CT) classifiers on a mix of CelebA data and counterfactual images as described in Sec. 3.5. Table 2 presents accuracy and flip resistance (FR) results. CT outperforms the regular classifier. FR is assessed over 10,000 counterfactual images, with FR-25 and FR-100 denoting Flip Resistance after 25 and 100 optimization iterations, respectively. Both use $\\eta = 0.2$ and $\\epsilon = 30$ . We can observe that the classifiers after CT are way less likely to be flipped by counterfactual images while maintaining a decent accuracy on the CalebA testset. Our approach robustifies the model by increasing the tolerance toward counterfactuals. Note that CT slightly improves the CelebA classifier when trained on a mixture of CelebA images (original images) and the counterfactual images generated with a generative model trained in the FFHQ [12] images (different domain).", "bbox": [ 75, 648, 468, 904 ], "page_idx": 7 }, { "type": "table", "img_path": "images/4427e736fac19a282ea9a3abd30cb3b7bf9f5849ac3eecf1d3b8a74b1709f21c.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Method</td><td>AC Flip Rate (%)</td><td>BC Flip Rate (%)</td></tr><tr><td>Initialize ZOOM by A</td><td>61.95</td><td>83.47</td></tr><tr><td>+ Attribute: Beard</td><td>72.08</td><td>90.07</td></tr><tr><td>+ Attribute: Smiling</td><td>87.47</td><td>96.27</td></tr><tr><td>+ Attribute: Lipstick</td><td>90.96</td><td>94.07</td></tr><tr><td>+ Iterations increased to 200</td><td>92.91</td><td>94.87</td></tr></table>", "bbox": [ 501, 88, 888, 176 ], "page_idx": 7 }, { "type": "table", "img_path": "images/019909ecbdeabb30964a6186068d59ea0fd09e455a4976227c0994ceed8f2d1e.jpg", "table_caption": [ "Table 1. Model flip rate study. The initial attribute space $\\mathcal{A} =$ {Bangs, Blond Hair, Bushy Eyebrows, Pale Skin, Pointy Nose}. AC is the perceived age classifier and BC is the big lips classifier." ], "table_footnote": [], "table_body": "<table><tr><td>Attribute</td><td>Metric</td><td>Regular (%)</td><td>CT (Ours) (%)</td></tr><tr><td rowspan=\"3\">Perceived Age</td><td>CelebA Accuracy</td><td>86.10</td><td>86.29</td></tr><tr><td>ZOOM FR-25</td><td>19.54</td><td>97.36</td></tr><tr><td>ZOOM FR-100</td><td>9.04</td><td>95.65</td></tr><tr><td rowspan=\"3\">Big Lips</td><td>CelebA Accuracy</td><td>74.36</td><td>75.39</td></tr><tr><td>ZOOM FR-25</td><td>14.12</td><td>99.19</td></tr><tr><td>ZOOM FR-100</td><td>5.93</td><td>88.91</td></tr></table>", "bbox": [ 501, 234, 893, 340 ], "page_idx": 7 }, { "type": "text", "text": "Table 2. Results of network inference on CelebA original images and ZOOM-generated counterfactual. The CT classifier is significantly less prone to be flipped by counterfactual images, while test accuracy on CelebA remains performant.", "bbox": [ 498, 351, 890, 407 ], "page_idx": 7 }, { "type": "text", "text": "5. Conclusion and Discussion", "text_level": 1, "bbox": [ 500, 412, 746, 428 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we present ZOOM, a zero-shot model diagnosis framework that generates sensitivity histograms based on user's input of natural language attributes. ZOOM assesses failures and generates corresponding sensitivity histograms for each attribute. A significant advantage of our technique is its ability to analyze the failures of a target deep model without the need for laborious collection and annotation of test sets. ZOOM effectively visualizes the correlation between attributes and model outputs, elucidating model behaviors and intrinsic biases.", "bbox": [ 496, 431, 890, 580 ], "page_idx": 7 }, { "type": "text", "text": "Our work has three primary limitations. First, users should possess domain knowledge as their input (text of attributes of interest) should be relevant to the target domain. Recall that it is a small price to pay for model evaluation without an annotated test set. Second, StyleGAN2-ADA struggles with generating out-of-domain samples. Nevertheless, our adversarial learning framework can be adapted to other generative models (e.g., stable diffusion), and the generator can be improved by training on more images. We have rigorously tested our generator with various user inputs, confirming its effectiveness for regular diagnosis requests. Currently, we are exploring stable diffusion models to generate a broader range of classes while maintaining the core concept. Finally, we rely on a pre-trained model like CLIP which we presume to be free of bias and capable of encompassing all relevant attributes.", "bbox": [ 496, 582, 892, 823 ], "page_idx": 7 }, { "type": "text", "text": "Acknowledgements: We would like to thank George Cazenavette, Tianyuan Zhang, Yinong Wang, Hanzhe Hu, Bharath Raj for suggestions in the presentation and experiments. We sincerely thank Ken Ziyu Liu, Jiashun Wang, Bowen Li, and Ce Zheng for revisions to improve this work.", "bbox": [ 496, 824, 890, 900 ], "page_idx": 7 }, { "type": "page_number", "text": "11638", "bbox": [ 480, 944, 517, 955 ], "page_idx": 7 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 78, 89, 173, 104 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[1] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. StarGAN v2: Diverse Image Synthesis for Multiple Domains. In CVPR, 2020.", "[2] Edo Collins, Raja Bala, Bob Price, and Sabine Susstrunk. Editing in Style: Uncovering the Local Semantics of GANs. In CVPR, 2020.", "[3] Emily Denton and Ben Hutchinson and Margaret Mitchell and Timnit Gebru and Andrew Zaldivar. Image counterfactual sensitivity analysis for detecting unintended bias. arXiv preprint arXiv:1906.06439, 2019.", "[4] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and Harnessing Adversarial Examples. 2014.", "[5] Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee. Counterfactual Visual Explanations. In ICML, 2019.", "[6] Z. He, W. Zuo, M. Kan, S. Shan, and X. Chen. AttGAN: Facial Attribute Editing by Only Changing What You Want. In IEEE TIP, 2019.", "[7] Fangzhou Hong, Mingyuan Zhang, Liang Pan, Zhongang Cai, Lei Yang, and Ziwei Liu. AvatarCLIP: Zero-Shot Text-Driven Generation and Animation of 3D Avatars. In ACM TOG, 2022.", "[8] Erik Härkönen, Aaron Hertzmann, Jaakko Lehtinen, and Sylvain Paris. GANSpace: Discovering Interpretable GAN Controls. In NeurIPS, 2020.", "[9] Ameya Joshi, Amitangshu Mukherjee, Soumik Sarkar, and Chinmay Hegde. Semantic Adversarial Attacks: Parametric Transformations That Fool Deep Classifiers. In ICCV, 2019.", "[10] Kimmo Karkkainen and Jungseock Joo. FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation. In WACV, 2021.", "[11] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training Generative Adversarial Networks with Limited Data. In NeurIPS, 2020.", "[12] Tero Karras, Samuli Laine, and Timo Aila. A Style-Based Generator Architecture for Generative Adversarial Networks. In CVPR, 2019.", "[13] Oran Lang, Yossi Gandelsman, Michal Yarom, Yoav Wald, Gal Elidan, Avinatan Hassidim, William T. Freeman, Phillip Isola, Amir Globerson, Michal Irani, and Inbar Mosseri. Explaining in Style: Training a GAN To Explain a Classifier in StyleSpace. In ICCV, 2021.", "[14] Bo Li, Qiulin Wang, Jiquan Pei, Yu Yang, and Xiangyang Ji. Which Style Makes Me Attractive? Interpretable Control Discovery and Counterfactual Explanation on StyleGAN. arXiv preprint arXiv:2201.09689, 2022.", "[15] Zhiheng Li and Chenliang Xu. Discover the Unknown Biased Attribute of an Image Classifier. In ICCV, 2021.", "[16] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep Learning Face Attributes in the Wild. In ICCV, 2015.", "[17] Jinqi Luo, Zhaoning Wang, Chen Henry Wu, Dong Huang, and Fernando De la Torre. Semantic image attack for visual model diagnosis. arXiv preprint arXiv:2303.13010, 2023.", "[18] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards Deep Learning Models Resistant to Adversarial Attacks. In ICLR, 2018." ], "bbox": [ 78, 114, 467, 898 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[19] Joanna Materzynska, Antonio Torralba, and David Bau. Disentangling Visual and Written Concepts in CLIP. In CVPR, 2022.", "[20] Ramaravind K. Mothilal, Amit Sharma, and Chenhao Tan. Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations. In ACM FAccT, 2020.", "[21] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery. In ICCV, 2021.", "[22] Ben Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. DreamFusion: Text-to-3D using 2D Diffusion. arXiv preprint arXiv:2209.14988, 2022.", "[23] Haonan Qiu, Chaowei Xiao, Lei Yang, Xinchen Yan, Honglak Lee, and Bo Li. SemanticAdv: Generating Adversarial Examples via Attribute-conditioned Image Editing. In ECCV, 2020.", "[24] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning Transferable Visual Models From Natural Language Supervision. In ICML, 2021.", "[25] Vikram V. Ramaswamy, Sunnie S. Y. Kim, and Olga Russakovsky. Fair Attribute Classification Through Latent Space De-Biasing. In CVPR, 2021.", "[26] Axel Sauer and Andreas Geiger. Counterfactual Generative Networks. In ICLR, 2021.", "[27] Yujun Shen, Ceyuan Yang, Xiaou Tang, and Bolei Zhou. InterFaceGAN: Interpreting the Disentangled Face Representation Learned by GANs. In IEEE TPAMI, 2020.", "[28] Yujun Shen and Bolei Zhou. Closed-Form Factorization of Latent Semantics in GANs. In CVPR, 2021.", "[29] Philipp Terhörst, Daniel Fährmann, Jan Niklas Kolf, Naser Damer, Florian Kirchbuchner, and Arjan Kuijper. MAAD-Face: A Massively Annotated Attribute Dataset for Face Images. In IEEE TIFS, 2021.", "[30] Can Wang, Menglei Chai, Mingming He, Dongdong Chen, and Jing Liao. CLIP-NeRF: Text-and-Image Driven Manipulation of Neural Radiance Fields. In CVPR, 2022.", "[31] Jingdong Wang, Ke Sun, Tianheng Cheng, Borui Jiang, Chaorui Deng, Yang Zhao, Dong Liu, Yadong Mu, Mingkui Tan, Xinggang Wang, Wenyu Liu, and Bin Xiao. Deep High-Resolution Representation Learning for Visual Recognition. In IEEE TPAMI, 2019.", "[32] Zhou Wang, A.C. Bovik, H.R. Sheikh, and E.P. Simoncelli. Image Quality Assessment: from Error Visibility to Structural Similarity. In IEEE TIP, 2004.", "[33] Wayne Wu, Chen Qian, Shuo Yang, Quan Wang, Yici Cai, and Qiang Zhou. Look at Boundary: A Boundary-Aware Face Alignment Algorithm. In CVPR, 2018.", "[34] Zongze Wu, Dani Lischinski, and Eli Shechtman. StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation. In CVPR, 2021.", "[35] Weihao Xia, Yulun Zhang, Yujiu Yang, Jing-Hao Xue, Bolei Zhou, and Ming-Hsuan Yang. GAN Inversion: A Survey. In IEEE TPAMI, 2022." ], "bbox": [ 501, 92, 890, 898 ], "page_idx": 8 }, { "type": "page_number", "text": "11639", "bbox": [ 480, 945, 519, 955 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[36] Chaowei Xiao, Bo Li, Jun-yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating Adversarial Examples with Adversarial Networks. In *IJCAI*, 2018.", "[37] Mingyuan Zhang, Zhongang Cai, Liang Pan, Fangzhou Hong, Xinying Guo, Lei Yang, and Ziwei Liu. MotionDiffuse: Text-Driven Human Motion Generation with Diffusion Model. arXiv preprint arXiv:2208.15001, 2022." ], "bbox": [ 78, 90, 468, 189 ], "page_idx": 9 }, { "type": "page_number", "text": "11640", "bbox": [ 480, 945, 519, 955 ], "page_idx": 9 }]123version https://git-lfs.github.com/spec/v1oid sha256:561ec038d43be43f634578de6b66c2d89b9f1edc3dd8033fbc098fc6e0071dafsize 6163757123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467# Zero-shot Model Diagnosis
Jinqi Luo*
Zhaoning Wang*
Chen Henry Wu
Dong Huang
Fernando De la Torre
Carnegie Mellon University
{jinqil, zhaoning, chenwu2, dghuang, ftorre}@cs.cmu.edu
# Abstract
When it comes to deploying deep vision models, the behavior of these systems must be explicable to ensure confidence in their reliability and fairness. A common approach to evaluate deep learning models is to build a labeled test set with attributes of interest and assess how well it performs. However, creating a balanced test set (i.e., one that is uniformly sampled over all the important traits) is often time-consuming, expensive, and prone to mistakes. The question we try to address is: can we evaluate the sensitivity of deep learning models to arbitrary visual attributes without an annotated test set?
This paper argues the case that Zero-shot Model Diagnosis (ZOOM) is possible without the need for a test set nor labeling. To avoid the need for test sets, our system relies on a generative model and CLIP. The key idea is enabling the user to select a set of prompts (relevant to the problem) and our system will automatically search for semantic counterfactual images (i.e., synthesized images that flip the prediction in the case of a binary classifier) using the generative model. We evaluate several visual tasks (classification, key-point detection, and segmentation) in multiple visual domains to demonstrate the viability of our methodology. Extensive experiments demonstrate that our method is capable of producing counterfactual images and offering sensitivity analysis for model diagnosis without the need for a test set.
# 1. Introduction
Deep learning models inherit data biases, which can be accentuated or downplayed depending on the model's architecture and optimization strategy. Deploying a computer vision deep learning model requires extensive testing and evaluation, with a particular focus on features with potentially dire social consequences (e.g., non-uniform behavior across gender or ethnicity). Given the importance of the problem, it is common to collect and label large-scale datasets to evaluate the behavior of these models across attributes of interest. Unfortunately, collecting these test
 Figure 1. Given a differentiable deep learning model (e.g., a cat/dog classifier) and user-defined text attributes, how can we determine the model's sensitivity to specific attributes without using labeled test data? Our system generates counterfactual images (bottom right) based on the textual directions provided by the user, while also computing the sensitivity histogram (top right).
datasets is extremely time-consuming, error-prone, and expensive. Moreover, a balanced dataset, that is uniformly distributed across all attributes of interest, is also typically impractical to acquire due to its combinatorial nature. Even with careful metric analysis in this test set, no robustness nor fairness can be guaranteed since there can be a mismatch between the real and test distributions [25]. This research will explore model diagnosis without relying on a test set in an effort to democratize model diagnosis and lower the associated cost.
Counterfactual explainability as a means of model diagnosis is drawing the community's attention [5,20]. Counterfactual images visualize the sensitive factors of an input image that can influence the model's outputs. In other words, counterfactuals answer the question: "How can we modify the input image $\mathbf{x}$ (while fixing the ground truth) so that the model prediction would diverge from $\mathbf{y}$ to $\hat{\mathbf{y}}$ ?". The parameterization of such counterfactuals will provide insights into identifying key factors of where the model fails. Unlike existing image-space adversary techniques [4,18], counterfactuals provide semantic perturbations that are interpretable by humans. However, existing counterfactual studies re
require the user to either collect uniform test sets [10], annotate discovered bias [15], or train a model-specific explanation every time the user wants to diagnose a new model [13].
On the other hand, recent advances in Contrastive Language-Image Pretraining (CLIP) [24] can help to overcome the above challenges. CLIP enables text-driven applications that map user text representations to visual manifolds for downstream tasks such as avatar generation [7], motion generation [37] or neural rendering [22, 30]. In the domain of image synthesis, StyleCLIP [21] reveals that text-conditioned optimization in the StyleGAN [12] latent space can decompose latent directions for image editing, allowing for the mutation of a specific attribute without disturbing others. With such capability, users can freely edit semantic attributes conditioned on text inputs. This paper further explores its use in the scope of model diagnosis.
The central concept of the paper is depicted in Fig. 1. Consider a user interested in evaluating which factors contribute to the lack of robustness in a cat/dog classifier (target model). By selecting a list of keyword attributes, the user is able to (1) see counterfactual images where semantic variations flip the target model predictions (see the classifier score in the top-right corner of the counterfactual images) and (2) quantify the sensitivity of each attribute for the target model (see sensitivity histogram on the top). Instead of using a test set, we propose using a StyleGAN generator as the picture engine for sampling counterfactual images. CLIP transforms user's text input, and enables model diagnosis in an open-vocabulary setting. This is a major advantage since there is no need for collecting and annotating images and minimal user expert knowledge. In addition, we are not tied to a particular annotation from datasets (e.g., specific attributes in CelebA [16]).
To summarize, our proposed work offers three major improvements over earlier efforts:
- The user requires neither a labeled, balanced test dataset, and minimal expert knowledge in order to evaluate where a model fails (i.e., model diagnosis). In addition, the method provides a sensitivity histogram across the attributes of interest. - When a different target model or a new user-defined attribute space is introduced, it is not necessary to retrain our system, allowing for practical use. - The target model fine-tuned with counterfactual images not only slightly improves the classification performance, but also greatly increases the distributional robustness against counterfactual images.
# 2. Related Work
This section reviews prior work on attribute editing with generative models and recent efforts on model diagnosis.
# 2.1. Attribute Editing with Generative Models
With recent progress in generative models, GANs supports high-quality image synthesis, as well as semantic attributes editing [35]. [1, 6] edit the images by perturbing the intermediate latent space encoded from the original images. These methods rely on images to be encoded to latent vectors to perform attribute editing. On the contrary, StyleGAN [12] can produce images by sampling the latent space. Many works have explored ways to edit attributes in the latent space of StyleGAN, either by relying on image annotations [27] or in an unsupervised manner [8, 28]. StyleSpace [34] further disentangles the latent space of StyleGAN and can perform specific attribute edits by disentangled style vectors. Based upon StyleSpace, StyleCLIP [21] builds the connection between the CLIP language space and StyleGAN latent space to enable arbitrary edits specified by the text. Our work adopts this concept for fine-grained attribute editing.
# 2.2. Model Diagnosis
To the best of our knowledge, model diagnosis without a test set is a relatively unexplored problem. In the adversarial learning literature, it is common to find methods that show how image-space perturbations [4, 18] flip the model prediction; however, such perturbations lack visual interpretability. [36] pioneers in synthesizing adversaries by GANs. More recently, [9, 23, 26] propose generative methods to synthesize semantically perturbed images to visualize where the target model fails. However, their attribute editing is limited within the dataset's annotated labels. Instead, our framework allows users to easily customize their own attribute space, in which we visualize and quantify the biased factors that affect the model prediction. On the bias detection track, [13] co-trains a model-specific StyleGAN with each target model, and requires human annotators to name attribute coordinates in the Stylespace. [3, 14, 15] synthesize counterfactual images by either optimally traversing the latent space or learning an attribute hyperplane, after which the user will inspect the represented bias. Unlike previous work, we propose to diagnose a deep learning model without any model-specific re-training, new test sets, or manual annotations/inspections.
# 3. Method
This section firstly describes our method to generate counterfactual images guided by CLIP in a zero-shot manner. We then introduce how we perform the sensitivity analysis across attributes of interest. Fig. 2 shows the overview of our framework.
# 3.1. Notation and Problem Definition
Let $f_{\theta}$ , parameterized by $\theta$ , be the target model that we want to diagnose. In this paper, $f_{\theta}$ denotes two types of
 Figure 2. The ZOOM framework. Black solid lines stand for forward passes, red dashed lines stand for backpropagation, and purple dashed lines stand for inference after the optimization converges. The user inputs single or multiple attributes, and we map them into edit directions with the method in Sec. 3.2. Then we assign to each edit direction (attribute) a weight, which represents how much we are adding/removing this attribute. We iteratively perform adversarial learning on the attribute space to maximize the counterfactual effectiveness.
deep nets: binary attribute classifiers and face keypoint detectors. Note that our approach is extendable to any end-to-end differentiable target deep models. Let $\mathcal{G}_{\phi}$ , parameterized by $\phi$ , be the style generator that synthesizes images by $\mathbf{x} = \mathcal{G}_{\phi}(\mathbf{s})$ where $\mathbf{s}$ is the style vector in Style Space $S$ [34]. We denote a counterfactual image as $\hat{\mathbf{x}}$ , which is a synthesized image that misleads the target model $f_{\theta}$ , and denote the original reference image as $\mathbf{x}$ . $a$ is defined as a single user input text-based attribute, with its domain $\mathcal{A} = \{a_i\}_{i=1}^N$ for $N$ input attributes. $\hat{\mathbf{x}}$ and $\mathbf{x}$ differs only along attribute directions $\mathcal{A}$ . Given a set of $\{f_{\theta}, \mathcal{G}_{\phi}, \mathcal{A}\}$ , our goal is to perform counterfactual-based diagnosis to interpret where the model fails without manually collecting nor labeling any test set. Unlike traditional approaches of image-space noises which lack explainability to users, our method adversarially searches the counterfactual in the user-designed semantic space. To this end, our diagnosis will have three outputs, namely counterfactual images (Sec. 3.3), sensitivity histograms (Sec. 3.4), and distributionally robust models (Sec. 3.5).
# 3.2. Extracting Edit Directions
This section examines the terminologies, method, and modification we adopt in ZOOM to extract suitable global directions for attribute editing. Since CLIP has shown strong capability in disentangling visual representation [19], we incorporate style channel relevance from Style-CLIP [21] to find edit directions for each attribute.
Given the user's input strings of attributes, we want to find an image manipulation direction $\Delta \mathbf{s}$ for any $\mathbf{s} \sim \mathcal{S}$ , such that the generated image $\mathcal{G}_{\phi}(\mathbf{s} + \Delta \mathbf{s})$ only varies in the input attributes. Recall that CLIP maps strings into a text embedding $\mathbf{t} \in \mathcal{T}$ , the text embedding space. For a string attribute description $a$ and a neutral prefix $p$ , we obtain the CLIP text embedding difference $\Delta \mathbf{t}$ by:
$$\Delta \mathbf {t} = \operatorname {C L I P} _ {\text {t e x t}} (p \oplus a) - \operatorname {C L I P} _ {\text {t e x t}} (p) \tag {1}$$
where $\oplus$ is the string concatenation operator. To take 'Eyeglasses' as an example, we can get $\Delta t = \mathrm{CLIP}_{\mathrm{text}}$ (a face with Eyeglasses) - $\mathrm{CLIP}_{\mathrm{text}}$ (a face).
To get the edit direction, $\Delta \mathbf{s}$ , we need to utilize a style relevance mapper $\mathbf{M} \in \mathbb{R}^{c_S \times c_T}$ to map between the CLIP text embedding vectors of length $c_{\mathcal{T}}$ and the Style space vector of length $c_{\mathcal{S}}$ . StyleCLIP optimizes $\mathbf{M}$ by iteratively searching meaningful style channels: mutating each channel in $\mathcal{S}$ and encoding the mutated images by CLIP to assess whether there is a significant change in $\mathcal{T}$ space. To prevent undesired edits that are irrelevant to the user prompt, the edit direction $\Delta \mathbf{s}$ will filter out channels that the style value change is insignificant:
$$\Delta \mathbf {s} = (\mathbf {M} \cdot \Delta \mathbf {t}) \odot \mathbb {1} ((\mathbf {M} \cdot \Delta \mathbf {t}) > \lambda), \tag {2}$$
where $\lambda$ is the hyper-parameter for the threshold value. $\mathbb{1}(\cdot)$ is the indicator function, and $\odot$ is the element-wise product operator. Since the success of attribute editing by the extracted edit directions will be the key to our approach, Appendix A will show the capability of CLIP by visualizing the global edit direction on multiple sampled images, conducting the user study, and analyzing the effect of $\lambda$ .
# 3.3. Style Counterfactual Synthesis
Identifying semantic counterfactuals necessitates a manageable parametrization of the semantic space for effective exploration. For ease of notation, we denote $(\Delta \mathbf{s})_i$ as the global edit direction for $i^{th}$ attribute $a_i \in \mathcal{A}$ from the user input. After these $N$ attributes are provided and the edit directions are calculated, we initialize the control vectors $\mathbf{w}$ of length $N$ where the $i^{th}$ element $w_i$ controls the strength of the $i^{th}$ edit direction. Our counterfactual edit will be a linear combination of normalized edit directions: $\mathbf{s}_{edit} = \sum_{i=1}^{N} w_i \frac{(\Delta \mathbf{s})_i}{||(\Delta \mathbf{s})_i||}$ .
The black arrows in Fig. 2 show the forward inference to synthesize counterfactual images. Given the parametriza
tion of attribute editing strengths and the final loss value, our framework searches for counterfactual examples in the. optimizable edit weight space. The original sampled image is $\mathbf{x} = G_{\phi}(\mathbf{s})$ , and the counterfactual image is
$$\hat {\mathbf {x}} = G _ {\phi} (\mathbf {s} + \mathbf {s} _ {e d i t}) = G _ {\phi} \left(\mathbf {s} + \sum_ {i = 1} ^ {N} w _ {i} \frac {(\Delta \mathbf {s}) _ {i}}{| | (\Delta \mathbf {s}) _ {i} | |}\right), \tag {3}$$
which is obtained by minimizing the following loss, $\mathcal{L}$ , that is the weighted sum of three terms:
$$\mathcal {L} (\mathbf {s}, \mathbf {w}) = \alpha \mathcal {L} _ {\text {t a r g e t}} (\hat {\mathbf {x}}) + \beta \mathcal {L} _ {\text {s t r u c t}} (\hat {\mathbf {x}}) + \gamma \mathcal {L} _ {\text {a t t r}} (\hat {\mathbf {x}}). \tag {4}$$
We back-propagate to optimize $\mathcal{L}$ w.r.t the weights of the edit directions $\mathbf{w}$ , shown as the red pipeline in Fig. 2.
The targeted adversarial loss $\mathcal{L}_{target}$ for binary attribute classifiers minimizes the distance between the current model prediction $f_{\theta}(\hat{\mathbf{x}})$ with the flip of original prediction $\hat{p}_{cls} = 1 - f_{\theta}(\mathbf{x})$ . In the case of an eyeglass classifier on a person wearing eyeglasses, $\mathcal{L}_{target}$ will guide the optimization to search w such that the model predicts no eyeglasses. For a keypoint detector, the adversarial loss will minimize the distance between the model keypoint prediction with a set of random points $\hat{p}_{kp} \sim \mathcal{N}$ :
(binary classifier) $\mathcal{L}_{target}(\hat{\mathbf{x}}) = L_{CE}(f_{\theta}(\hat{\mathbf{x}}),\hat{p}_{cls})$ (5)
(keypoint detector) $\mathcal{L}_{target}(\hat{\mathbf{x}}) = L_{MSE}(f_{\theta}(\hat{\mathbf{x}}),\hat{p}_{kp})$ (6)
If we only optimize $\mathcal{L}_{\text {target }}$ w.r.t the global edit directions, it is possible that the method will not preserve image statistics of the original image and can include the particular attribute that we are diagnosing. To constrain the optimization, we added a structural loss $\mathcal{L}_{\text {struct }}$ and an attribute consistency loss $\mathcal{L}_{\text {attr }}$ to avoid generation collapse. $\mathcal{L}_{\text {struct }}$ [32] aims to preserve global image statistics of the original image x including image contrasts, background, or shape identity during the adversarial editing. While $\mathcal{L}_{\text {attr }}$ enforces that the target attribute (perceived ground truth) be consistent on the style edits. For example, when diagnosing the eyeglasses classifier, ZOOM preserves the original status of eyeglasses and precludes direct eyeglasses addition/removal.
$$\mathcal {L} _ {\text {s t r u c t}} (\hat {\mathbf {x}}) = L _ {\text {S S I M}} (\hat {\mathbf {x}}, \mathbf {x}) \tag {7}$$
$$\mathcal {L} _ {\text {a t t r}} (\hat {\mathbf {x}}) = L _ {C E} \left(\operatorname {C L I P} (\hat {\mathbf {x}}), \operatorname {C L I P} (\mathbf {x})\right) \tag {8}$$
Given a pretrained target model $f_{\theta}$ , a domain-specific style generator $G_{\phi}$ , and a text-driven attribute space $\mathcal{A}$ , our goal is to sample an original style vector $\mathbf{s}$ for each image and search its counterfactual edit strength $\hat{\mathbf{w}}$ :
$$\hat {\mathbf {w}} = \underset {\mathbf {w}} {\operatorname {a r g m i n}} \mathcal {L} (\mathbf {s}, \mathbf {w}). \tag {9}$$
Unless otherwise stated, we iteratively update $\mathbf{w}$ as:
$$\mathbf {w} = \operatorname {c l a m p} _ {[ - \epsilon , \epsilon ]} (\mathbf {w} - \eta \nabla_ {\mathbf {w}} \mathcal {L}), \tag {10}$$
where $\eta$ is the step size and $\epsilon$ is the clamp bound to avoid synthesis collapse caused by exaggerated edit. Note that the maximum counterfactual effectiveness does not indicate the maximum edit strength (i.e., $w_{i} = \epsilon$ ), since the attribute edit direction does not necessarily overlap with the target classifier direction. The attribute change is bi-directional, as the $w_{i}$ can be negative in Eq. 3. Details of using other optimization approaches (e.g., linear approximation [18]) will be discussed in Appendix C.
# 3.4. Attribute Sensitivity Analysis
Single-attribute counterfactual reflects the sensitivity of target model on the individual attribute. By optimizing independently along the edit direction for a single attribute and averaging the model probability changes over images, our model generates independent sensitivity score $h_i$ for each attribute $a_i$ :
$$h _ {i} = \mathbb {E} _ {\mathbf {x} \sim \mathcal {P} (\mathbf {x}), \hat {\mathbf {x}} = \mathrm {Z O O M} (\mathbf {x}, a _ {i})} | f _ {\theta} (\mathbf {x}) - f _ {\theta} (\hat {\mathbf {x}}) |. \tag {11}$$
The sensitivity score $h_i$ is the probability difference between the original image $\mathbf{x}$ and generated image $\hat{\mathbf{x}}$ , at the most counterfactual point when changing attribute $a_i$ . We synthesize a number of images from $\mathcal{G}_{\phi}$ , then iteratively compute the sensitivity for each given attribute, and finally normalize all sensitivities to draw the histogram as shown in Fig. 4. The histogram indicates the sensitivity of the evaluated model $f_{\theta}$ on each of the user-defined attributes. Higher sensitivity of one attribute means that the model is more easily affected by that attribute.
# 3.5. Counterfactual Training
The multi-attribute counterfactual approach visualizes semantic combinations that cause the model to falter, providing valuable insights for enhancing the model's robustness. We naturally adopt the concept of iterative adversarial training [18] to robustify the target model. For each iteration, ZOOM receives the target model parameter and returns a batch of mutated counterfactual images with the model's original predictions as labels. Then the target model will be trained on the counterfactually-augmented images to achieve the robust goal:
$$\theta^ {*} = \underset {\theta} {\operatorname {a r g m i n}} \mathbb {E} _ {\mathbf {x} \sim \mathcal {P} (\mathbf {x}), \hat {\mathbf {x}} = \operatorname {Z O O M} (\mathbf {x}, A)} L _ {C E} \left(f _ {\theta} (\hat {\mathbf {x}}), f _ {\theta} (\mathbf {x})\right) \tag {12}$$
where batches of $\mathbf{x}$ are randomly sampled from the StyleGAN generator $\mathcal{G}_{\phi}$ . In the following, we abbreviate the process as Counterfactual Training (CT). Note that, although not explicitly expressed in Eq. 12, the CT process is a min-max game. ZOOM synthesizes counterfactuals to maximize the variation of model prediction (while persevering the perceived ground truth), and the target model is learned with the counterfactual images to minimize the variation.
 Open Mouth
 $\frac{1}{2}x - 1 > 0$
 $\frac{1}{2}x - 1 > 0$

 Closed Mouth





 Felidae Pupil $\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH
 $\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH
 $\frac{3}{1} + u + {4q} = 1 + u + {uq}$ dH

 Canidae Pupil





 Figure 3. Effect of progressively generating counterfactual images on (left) cat/dog classifier (0-Cat / 1-Dog), and (right) perceived age classifier (0-Senior / 1-Young). Model probability prediction during the process is attached at the top right corner.



 (a) Model diagnosis histograms generated by ZOOM on four facial attribute classifiers. (b) Model diagnosis histograms generated by ZOOM on four classifiers trained on manually-crafted imbalance data. Figure 4. Model diagnosis histograms generated by ZOOM. The vertical axis values reflect the attribute sensitivities calculated by averaging the model probability change over all sampled images. The horizontal axis is the attribute space input by user.



# 4. Experimental Results
This section describes the experimental validations on the effectiveness and reliability of ZOOM. First, we describe the model setup in Sec. 4.1. Sec. 4.2 and Sec. 4.3 visualize and validate the model diagnosis results for the single-attribute setting. In Sec. 4.4, we show results on synthesized multiple-attribute counterfactual images and apply them to counterfactual training.
# 4.1. Model Setup
Pre-trained models: We used Stylegan2-ADA [11] pretrained on FFHQ [12] and AFHQ [1] as our base generative networks, and the pre-trained CLIP model [24] which is parameterized by ViT-B/32. We followed StyleCLIP [21] setups to compute the channel relevance matrices $\mathcal{M}$ .
Target models: Our classifier models are ResNet50 with single fully-connected head initialized by TorchVision<sup>1</sup>. In training the binary classifiers, we use the Adam optimizer with learning rate 0.001 and batch size 128. We train binary
classifiers for Eyeglasses, Perceived Gender, Mustache, Perceived Age attributes on CelebA and for cat/dog classification on AFHQ. For the 98-keypoint detectors, we used the HR-Net architecture [31] on WFLW [33].
# 4.2. Visual Model Diagnosis: Single-Attribute
Understanding where deep learning model fails is an essential step towards building trustworthy models. Our proposed work allows us to generate counterfactual images (Sec. 3.3) and provide insights on sensitivities of the target model (Sec. 3.4). This section visualizes the counterfactual images in which only one attribute is modified at a time.
Fig. 3 shows the single-attribute counterfactual images. Interestingly (but not unexpectedly), we can see that reducing the hair length or joyfulness causes the age classifier more likely to label the face to an older person. Note that our approach is extendable to multiple domains, as we change the cat-like pupil to dog-like, the dog-cat classification tends towards the dog. Using the counterfactual images, we can conduct model diagnosis with the method mentioned in Sec. 3.4, on which attributes the model is sen
sitive to. In the histogram generated in model diagnosis, a higher bar means the model is more sensitive toward the corresponding attribute.
Fig. 4a shows the model diagnosis histograms on regularly-trained classifiers. For instance, the cat/dog classifier histogram shows outstanding sensitivity to green eyes and vertical pupil. The analysis is intuitive since these are cat-biased traits rarely observed in dog photos. Moreover, the histogram of eyeglasses classifier shows that the mutation on bushy eyebrows is more influential for flipping the model prediction. It potentially reveals the positional correlation between eyeglasses and bushy eyebrows. The advantage of single-attribute model diagnosis is that the score of each attribute in the histogram are independent from other attributes, enabling unambiguous understanding of exact semantics that make the model fail. Diagnosis results for additional target models can be found in Appendix B.
# 4.3. Validation of Visual Model Diagnosis
Evaluating whether our zero-shot sensitivity histograms (Fig. 4) explain the true vulnerability is a difficult task, since we do not have access to a sufficiently large and balanced test set fully annotated in an open-vocabulary setting. To verify the performance, we create synthetically imbalanced cases where the model bias is known. We then compare our results with a supervised diagnosis setting [17]. In addition, we will validate the decoupling of the attributes by CLIP.
# 4.3.1 Creating imbalanced classifiers
In order to evaluate whether our sensitivity histogram is correct, we train classifiers that are highly imbalanced towards a known attribute and see whether ZOOM can detect the sensitivity w.r.t the attribute. For instance, when training the perceived-age classifier (binarized as Young in CelebA), we created a dataset on which the trained classifier is strongly sensitive to Bangs (hair over forehead). The custom dataset is a CelebA training subset that consists of 20, 200 images. More specifically, there are 10,000 images that have both young people that have bangs, represented as (1, 1), and 10,000 images of people that are not young and have no bangs, represented as (0, 0). The remaining combinations of (1, 0) and (0, 1) have only 100 images. With this imbalanced dataset, bangs is the attribute that dominantly correlates with whether the person is young, and hence the perceived-age classifier would be highly sensitive towards bangs. See Fig. 5 (the right histograms) for an illustration of the sensitivity histogram computed by our method for the case of an age classifier with bangs (top) and lipstick (bottom) being imbalanced.
We trained multiple imbalanced classifiers with this methodology, and visualize the model diagnosis histograms of these imbalanced classifiers in Fig. 4b. We can observe that the ZOOM histograms successfully detect the
 Figure 5. The sensitivity of the age classifier is evaluated with ZOOM (right) and AttGAN (left), achieving comparable results.
 (a) Mustache classifier Figure 6. Confusion matrix of CLIP score variation (vertical axis) when perturbing attributes (horizontal axis). This shows that attributes in ZOOM are highly decoupled.
 (b) Perceived age classifier
synthetically-made bias, which are shown as the highest bars in histograms. See the caption for more information.
# 4.3.2 Comparison with supervised diagnosis
We also validated our histogram by comparing it with the case in which we have access to a generative model that has been explicitly trained to disentangle attributes. We follow the work on [17] and used AttGAN [6] trained on the CelebA training set over 15 attributes<sup>2</sup>. After the training converged, we performed adversarial learning in the attribute space of AttGAN and create a sensitivity histogram using the same approach as Sec. 3.4. Fig. 5 shows the result of this method on the perceived-age classifier which is made biased towards bangs. As anticipated, the AttGAN histogram (left) corroborates the histogram derived from our method (right). Interestingly, unlike ZOOM, AttGAN show less sensitivity to remaining attributes. This is likely
 Counterfactual Original
 Figure 7. Multi-attribute counterfactual in faces. The model probability is documented in the upper right corner of each image.


















because AttGAN has a latent space learned in a supervised manner and hence attributes are better disentangled than with StyleGAN. Note that AttGAN is trained with a fixed set of attributes; if a new attribute of interest is introduced, the dataset needs to be re-labeled and AttGAN retrained. ZOOM, however, merely calls for the addition of a new text prompt. More results in Appendix B.
# 4.3.3 Measuring disentanglement of attributes
Previous works demonstrated that the StyleGAN's latent space can be entangled [2, 27], adding undesired dependencies when searching single-attribute counterfactuals. This section verifies that our framework can disentangle the attributes and mostly edit the desirable attributes.
We use CLIP as a super annotator to measure attribute changes during single-attribute modifications. For 1,000 images, we record the attribute change after performing adversarial learning in each attribute, and average the attribute score change. Fig. 6 shows the confusion matrix during single-attribute counterfactual synthesis. The horizontal axis is the attribute being edited during the optimization, and the vertical axis represents the CLIP prediction changed by the process. For instance, the first column of Fig. 6a is generated when we optimize over bangs for the mustache classifier. We record the CLIP prediction variation. It clearly shows that bangs is the dominant attribute changing during the optimization. From the main diagonal of matrices, it is evident that the ZOOM mostly perturbs the attribute of interest. The results indicate reasonable disentanglement among attributes.
# 4.4. Visual Model Diagnosis: Multi-Attributes
In the previous sections, we have visualized and validated single-attribute model diagnosis histograms and counterfactual images. In this section, we will assess ZOOM's ability to produce counterfactual images by concurrently exploring multiple attributes within $\mathcal{A}$ , the domain of user-defined attributes. The approach conducts multi-attribute counterfactual searches across various edit directions, identifying distinct semantic combinations that result in the target model's failure. By doing so, we can effectively create more powerful counterfactuals images (see Fig. 9).

 Figure 8. Multi-attribute counterfactual on Cat/Dog classifier. The number in each image is the predicted probability of being a dog.
 Cat / Dog Classifier (0-Cat / 1-Dog)









 Original Reference
 SAC by Beard
 SAC by Pale Skin
 SAC by Black Hair
 Multiple-Attribute
 Original Reference
 SAC by Lips Color
 SAC by Smiling
 SAC by Bangs
 Multiple-Attribute Figure 9. Multiple-Attribute Counterfactual (MAC, Sec. 4.4) compared with Single-Attribute Counterfactual (SAC, Sec. 4.2). We can see that optimization along multiple directions enable the generation of more powerful counterfactuals.
Fig. 7 and Fig. 8 show examples of multi-attribute counterfactual images generated by ZOOM, against human and animal face classifiers. It can be observed that multiple face attributes such as lipsticks or hair color are edited in Fig. 7, and various cat/dog attributes like nose pinkness, eye shape, and fur patterns are edited in Fig. 8. These attribute edits are blended to affect the target model prediction. Appendix B further illustrates ZOOM counterfactual images for semantic segmentation, multi-class classification, and a church classifier. By mutating semantic representations, ZOOM reveals semantic combinations as outliers where the target model underfits.
In the following sections, we will use the Flip Rate (the percentage of counterfactuals that flipped the model prediction) and Flip Resistance (the percentage of counterfactuals for which the model successfully withheld its prediction) to evaluate the multi-attribute setting.
 (a) Sensitivity histograms generated by ZOOM on attribute combinations.

 (b) Model diagnosis by ZOOM over 19 attributes. Our framework is generalizable to analyze facial attributes of various domains. Figure 10. Customizing attribute space for ZOOM.
# 4.4.1 Customizing attribute space
In some circumstances, users may finish one round of model diagnosis and proceed to another round by adding new attributes, or trying a new attribute space. The linear nature of attribute editing (Eq. 3) in ZOOM makes it possible to easily add or remove attributes. Table 1 shows the flip rates results when adding new attributes into $\mathcal{A}$ for perceived age classifier and big lips classifier. We can observe that a different attribute space will result in different effectiveness of counterfactual images. Also, increasing the search iteration will make counterfactual more effective (see last row). Note that neither re-training the StyleGAN nor user-collection/labeling of data is required at any point in this procedure. Moreover, Fig. 10a shows the model diagnosis histograms generated with combinations of two attributes. Fig. 10b demonstrates the capability of ZOOM in a rich vocabulary setting where we can analyze attributes that are not labeled in existing datasets [16, 29].
# 4.4.2 Counterfactual training results
This section evaluates regular classifiers trained on CelebA [16] and counterfactually-trained (CT) classifiers on a mix of CelebA data and counterfactual images as described in Sec. 3.5. Table 2 presents accuracy and flip resistance (FR) results. CT outperforms the regular classifier. FR is assessed over 10,000 counterfactual images, with FR-25 and FR-100 denoting Flip Resistance after 25 and 100 optimization iterations, respectively. Both use $\eta = 0.2$ and $\epsilon = 30$ . We can observe that the classifiers after CT are way less likely to be flipped by counterfactual images while maintaining a decent accuracy on the CalebA testset. Our approach robustifies the model by increasing the tolerance toward counterfactuals. Note that CT slightly improves the CelebA classifier when trained on a mixture of CelebA images (original images) and the counterfactual images generated with a generative model trained in the FFHQ [12] images (different domain).
<table><tr><td>Method</td><td>AC Flip Rate (%)</td><td>BC Flip Rate (%)</td></tr><tr><td>Initialize ZOOM by A</td><td>61.95</td><td>83.47</td></tr><tr><td>+ Attribute: Beard</td><td>72.08</td><td>90.07</td></tr><tr><td>+ Attribute: Smiling</td><td>87.47</td><td>96.27</td></tr><tr><td>+ Attribute: Lipstick</td><td>90.96</td><td>94.07</td></tr><tr><td>+ Iterations increased to 200</td><td>92.91</td><td>94.87</td></tr></table>
Table 1. Model flip rate study. The initial attribute space $\mathcal{A} =$ {Bangs, Blond Hair, Bushy Eyebrows, Pale Skin, Pointy Nose}. AC is the perceived age classifier and BC is the big lips classifier.
<table><tr><td>Attribute</td><td>Metric</td><td>Regular (%)</td><td>CT (Ours) (%)</td></tr><tr><td rowspan="3">Perceived Age</td><td>CelebA Accuracy</td><td>86.10</td><td>86.29</td></tr><tr><td>ZOOM FR-25</td><td>19.54</td><td>97.36</td></tr><tr><td>ZOOM FR-100</td><td>9.04</td><td>95.65</td></tr><tr><td rowspan="3">Big Lips</td><td>CelebA Accuracy</td><td>74.36</td><td>75.39</td></tr><tr><td>ZOOM FR-25</td><td>14.12</td><td>99.19</td></tr><tr><td>ZOOM FR-100</td><td>5.93</td><td>88.91</td></tr></table>
Table 2. Results of network inference on CelebA original images and ZOOM-generated counterfactual. The CT classifier is significantly less prone to be flipped by counterfactual images, while test accuracy on CelebA remains performant.
# 5. Conclusion and Discussion
In this paper, we present ZOOM, a zero-shot model diagnosis framework that generates sensitivity histograms based on user's input of natural language attributes. ZOOM assesses failures and generates corresponding sensitivity histograms for each attribute. A significant advantage of our technique is its ability to analyze the failures of a target deep model without the need for laborious collection and annotation of test sets. ZOOM effectively visualizes the correlation between attributes and model outputs, elucidating model behaviors and intrinsic biases.
Our work has three primary limitations. First, users should possess domain knowledge as their input (text of attributes of interest) should be relevant to the target domain. Recall that it is a small price to pay for model evaluation without an annotated test set. Second, StyleGAN2-ADA struggles with generating out-of-domain samples. Nevertheless, our adversarial learning framework can be adapted to other generative models (e.g., stable diffusion), and the generator can be improved by training on more images. We have rigorously tested our generator with various user inputs, confirming its effectiveness for regular diagnosis requests. Currently, we are exploring stable diffusion models to generate a broader range of classes while maintaining the core concept. Finally, we rely on a pre-trained model like CLIP which we presume to be free of bias and capable of encompassing all relevant attributes.
Acknowledgements: We would like to thank George Cazenavette, Tianyuan Zhang, Yinong Wang, Hanzhe Hu, Bharath Raj for suggestions in the presentation and experiments. We sincerely thank Ken Ziyu Liu, Jiashun Wang, Bowen Li, and Ce Zheng for revisions to improve this work.
# References
[1] Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. StarGAN v2: Diverse Image Synthesis for Multiple Domains. In CVPR, 2020. [2] Edo Collins, Raja Bala, Bob Price, and Sabine Susstrunk. Editing in Style: Uncovering the Local Semantics of GANs. In CVPR, 2020. [3] Emily Denton and Ben Hutchinson and Margaret Mitchell and Timnit Gebru and Andrew Zaldivar. Image counterfactual sensitivity analysis for detecting unintended bias. arXiv preprint arXiv:1906.06439, 2019. [4] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and Harnessing Adversarial Examples. 2014. [5] Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee. Counterfactual Visual Explanations. In ICML, 2019. [6] Z. He, W. Zuo, M. Kan, S. Shan, and X. Chen. AttGAN: Facial Attribute Editing by Only Changing What You Want. In IEEE TIP, 2019. [7] Fangzhou Hong, Mingyuan Zhang, Liang Pan, Zhongang Cai, Lei Yang, and Ziwei Liu. AvatarCLIP: Zero-Shot Text-Driven Generation and Animation of 3D Avatars. In ACM TOG, 2022. [8] Erik Härkönen, Aaron Hertzmann, Jaakko Lehtinen, and Sylvain Paris. GANSpace: Discovering Interpretable GAN Controls. In NeurIPS, 2020. [9] Ameya Joshi, Amitangshu Mukherjee, Soumik Sarkar, and Chinmay Hegde. Semantic Adversarial Attacks: Parametric Transformations That Fool Deep Classifiers. In ICCV, 2019. [10] Kimmo Karkkainen and Jungseock Joo. FairFace: Face Attribute Dataset for Balanced Race, Gender, and Age for Bias Measurement and Mitigation. In WACV, 2021. [11] Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training Generative Adversarial Networks with Limited Data. In NeurIPS, 2020. [12] Tero Karras, Samuli Laine, and Timo Aila. A Style-Based Generator Architecture for Generative Adversarial Networks. In CVPR, 2019. [13] Oran Lang, Yossi Gandelsman, Michal Yarom, Yoav Wald, Gal Elidan, Avinatan Hassidim, William T. Freeman, Phillip Isola, Amir Globerson, Michal Irani, and Inbar Mosseri. Explaining in Style: Training a GAN To Explain a Classifier in StyleSpace. In ICCV, 2021. [14] Bo Li, Qiulin Wang, Jiquan Pei, Yu Yang, and Xiangyang Ji. Which Style Makes Me Attractive? Interpretable Control Discovery and Counterfactual Explanation on StyleGAN. arXiv preprint arXiv:2201.09689, 2022. [15] Zhiheng Li and Chenliang Xu. Discover the Unknown Biased Attribute of an Image Classifier. In ICCV, 2021. [16] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep Learning Face Attributes in the Wild. In ICCV, 2015. [17] Jinqi Luo, Zhaoning Wang, Chen Henry Wu, Dong Huang, and Fernando De la Torre. Semantic image attack for visual model diagnosis. arXiv preprint arXiv:2303.13010, 2023. [18] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards Deep Learning Models Resistant to Adversarial Attacks. In ICLR, 2018.
[19] Joanna Materzynska, Antonio Torralba, and David Bau. Disentangling Visual and Written Concepts in CLIP. In CVPR, 2022. [20] Ramaravind K. Mothilal, Amit Sharma, and Chenhao Tan. Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations. In ACM FAccT, 2020. [21] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. StyleCLIP: Text-Driven Manipulation of StyleGAN Imagery. In ICCV, 2021. [22] Ben Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. DreamFusion: Text-to-3D using 2D Diffusion. arXiv preprint arXiv:2209.14988, 2022. [23] Haonan Qiu, Chaowei Xiao, Lei Yang, Xinchen Yan, Honglak Lee, and Bo Li. SemanticAdv: Generating Adversarial Examples via Attribute-conditioned Image Editing. In ECCV, 2020. [24] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning Transferable Visual Models From Natural Language Supervision. In ICML, 2021. [25] Vikram V. Ramaswamy, Sunnie S. Y. Kim, and Olga Russakovsky. Fair Attribute Classification Through Latent Space De-Biasing. In CVPR, 2021. [26] Axel Sauer and Andreas Geiger. Counterfactual Generative Networks. In ICLR, 2021. [27] Yujun Shen, Ceyuan Yang, Xiaou Tang, and Bolei Zhou. InterFaceGAN: Interpreting the Disentangled Face Representation Learned by GANs. In IEEE TPAMI, 2020. [28] Yujun Shen and Bolei Zhou. Closed-Form Factorization of Latent Semantics in GANs. In CVPR, 2021. [29] Philipp Terhörst, Daniel Fährmann, Jan Niklas Kolf, Naser Damer, Florian Kirchbuchner, and Arjan Kuijper. MAAD-Face: A Massively Annotated Attribute Dataset for Face Images. In IEEE TIFS, 2021. [30] Can Wang, Menglei Chai, Mingming He, Dongdong Chen, and Jing Liao. CLIP-NeRF: Text-and-Image Driven Manipulation of Neural Radiance Fields. In CVPR, 2022. [31] Jingdong Wang, Ke Sun, Tianheng Cheng, Borui Jiang, Chaorui Deng, Yang Zhao, Dong Liu, Yadong Mu, Mingkui Tan, Xinggang Wang, Wenyu Liu, and Bin Xiao. Deep High-Resolution Representation Learning for Visual Recognition. In IEEE TPAMI, 2019. [32] Zhou Wang, A.C. Bovik, H.R. Sheikh, and E.P. Simoncelli. Image Quality Assessment: from Error Visibility to Structural Similarity. In IEEE TIP, 2004. [33] Wayne Wu, Chen Qian, Shuo Yang, Quan Wang, Yici Cai, and Qiang Zhou. Look at Boundary: A Boundary-Aware Face Alignment Algorithm. In CVPR, 2018. [34] Zongze Wu, Dani Lischinski, and Eli Shechtman. StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation. In CVPR, 2021. [35] Weihao Xia, Yulun Zhang, Yujiu Yang, Jing-Hao Xue, Bolei Zhou, and Ming-Hsuan Yang. GAN Inversion: A Survey. In IEEE TPAMI, 2022.
[36] Chaowei Xiao, Bo Li, Jun-yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating Adversarial Examples with Adversarial Networks. In *IJCAI*, 2018. [37] Mingyuan Zhang, Zhongang Cai, Liang Pan, Fangzhou Hong, Xinying Guo, Lei Yang, and Ziwei Liu. MotionDiffuse: Text-Driven Human Motion Generation with Diffusion Model. arXiv preprint arXiv:2208.15001, 2022.123version https://git-lfs.github.com/spec/v1oid sha256:2fadd0e06a2e68242e06ad607b5324622796cac7cd95ac83d9feda3105a8f7c5size 6747281234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645[ { "type": "text", "text": "Zero-Shot Noise2Noise: Efficient Image Denoising without any Data", "text_level": 1, "bbox": [ 155, 130, 841, 152 ], "page_idx": 0 }, { "type": "text", "text": "Youssef Mansour and Reinhard Heckel \nTechnical University of Munich and Munich Center for Machine Learning \nMunich, Germany", "bbox": [ 205, 181, 790, 233 ], "page_idx": 0 }, { "type": "text", "text": "y.mansour@tum.de, reinhard.heckel@tum.de", "bbox": [ 316, 237, 673, 250 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 259, 286, 336, 301 ], "page_idx": 0 }, { "type": "text", "text": "Recently, self-supervised neural networks have shown excellent image denoising performance. However, current dataset free methods are either computationally expensive, require a noise model, or have inadequate image quality. In this work we show that a simple 2-layer network, without any training data or knowledge of the noise distribution, can enable high-quality image denoising at low computational cost. Our approach is motivated by Noise2Noise and Neighbor2Neighbor and works well for denoising pixel-wise independent noise. Our experiments on artificial, real-world camera, and microscope noise show that our method termed ZS-N2N (Zero Shot Noise2Noise) often outperforms existing dataset-free methods at a reduced cost, making it suitable for use cases with scarce data availability and limited compute.", "bbox": [ 111, 319, 485, 561 ], "page_idx": 0 }, { "type": "text", "text": "1. Introduction", "text_level": 1, "bbox": [ 112, 594, 243, 609 ], "page_idx": 0 }, { "type": "text", "text": "Image denoising is the process of removing distortions from images, to enhance them visually and to reconstruct fine details. The latter is especially important for medical images, where fine details are necessary for an accurate diagnosis.", "bbox": [ 111, 621, 483, 696 ], "page_idx": 0 }, { "type": "text", "text": "Current state-of-the-art image denoising techniques rely on large data sets of clean-noisy image pairs and often consist of a neural network trained to map the noisy to the clean image. The drawbacks of dataset-based methods are that data collection, even without ground truths, is expensive and time-consuming, and second, a network trained on dataset suffers from a performance drop if the test images come from a different distribution of images. These drawbacks motivate research in dataset-free methods.", "bbox": [ 111, 699, 482, 849 ], "page_idx": 0 }, { "type": "text", "text": "All current zero-shot models are either suitable only for specific noise distributions and need previous knowledge of the noise level [7, 20], require a lot of compute (time, memory, GPU) to denoise an image [24], have", "bbox": [ 111, 851, 483, 912 ], "page_idx": 0 }, { "type": "text", "text": "poor denoising quality [28], or do not generalise to different noise distributions or levels [15, 24]. We propose a method that builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers and aims to circumvent these issues to reach a good trade-off between denoising quality and computational resources. We make only minimal assumptions on the noise statistics (pixel-wise independence), and do not require training data. Our method does not require an explicit noise model, and is therefore suitable for various noise types and can be employed when the noise distribution or level are unknown. The only assumption we make about the noise is that it is unstructured and has zero mean.", "bbox": [ 511, 287, 883, 482 ], "page_idx": 0 }, { "type": "text", "text": "In a nutshell, we convolve the noisy test image with two fixed filters, which yields two downsampled images. We next train a lightweight network with regularization to map one downsampled image to the other. Our strategy builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers, however we take those methods one step further by enabling denoising without any training data. Even with an extremely small network and without any training data, our method achieves good denoising quality and often even outperforms large networks trained on datasets.", "bbox": [ 511, 484, 883, 648 ], "page_idx": 0 }, { "type": "text", "text": "The key attributes of our work are as follows:", "bbox": [ 532, 650, 834, 664 ], "page_idx": 0 }, { "type": "text", "text": "- Compute. Dataset free neural network based algorithms [24, 28] require solving an optimization problem involving millions of parameters to denoise an image. The huge parameter count requires large memory storage, advanced GPUs, and long denoising times. In this work we show that our method, that utilizes a simple 2 layer network, with only $20\\mathrm{k}$ parameters, can often outperform networks with millions of parameters while reducing the computational cost significantly and being easily executable on a CPU.", "bbox": [ 532, 675, 883, 843 ], "page_idx": 0 }, { "type": "text", "text": "- Generalisation. Existing zero-shot methods often to do not generalise well. For example, BM3D [7], a classical denoising algorithm does not generalize well to non-Gaussian noise, and blind spot net", "bbox": [ 532, 851, 885, 912 ], "page_idx": 0 }, { "type": "header", "text": "CVF", "bbox": [ 106, 2, 181, 42 ], "page_idx": 0 }, { "type": "header", "text": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore.", "bbox": [ 236, 0, 810, 46 ], "page_idx": 0 }, { "type": "page_number", "text": "14018", "bbox": [ 480, 950, 519, 963 ], "page_idx": 0 }, { "type": "image", "img_path": "images/2e40134f5190ea5ff9d19f16d882ce0c33535e6e560d24636f8dec3bd8054069.jpg", "image_caption": [ "Figure 1. Left and middle plots: PSNR scores for Gaussian and Poisson denoising for different noise levels. Note BM3D's poor performance on Poisson compared to Gaussian noise. Right plot: Time required in seconds to denoise one $256 \\times 256$ colour image on CPU and GPU, tested on Poisson noise with $\\lambda = 50$ . Except for BM3D, all methods have shorter times on GPU. Only S2S in some cases outperforms our method, however it is about 100 times slower. S2S* denotes the ensemble free version of S2S." ], "image_footnote": [], "bbox": [ 117, 90, 500, 200 ], "page_idx": 1 }, { "type": "text", "text": "works [15] [24] (discussed later in detail) fail to denoise well in the regime of low noise level. Extensive experiments on different noise distributions and noise levels show that our proposed approach can generalise better to different conditions better than existing methods.", "bbox": [ 143, 381, 483, 472 ], "page_idx": 1 }, { "type": "text", "text": "In summary, our proposed method is dataset and noise model-free, and achieves a better trade-off between generalization, denoising quality, and computational resources compared to existing zero-shot methods, as displayed in Figure 1. We compare to the standard zero shot baselines, including BM3D, and the recent neural network-based algorithms DIP [28] and S2S [24]. Only BM3D is faster than our method but achieves poor results on non-Gaussian noise. Only S2S sometimes outperforms our method, but is orders of magnitude slower, often fails on low noise levels [14], and requires assembling to achieve acceptable performance.", "bbox": [ 111, 489, 483, 672 ], "page_idx": 1 }, { "type": "text", "text": "2. Related Work", "text_level": 1, "bbox": [ 112, 686, 253, 704 ], "page_idx": 1 }, { "type": "text", "text": "Supervised methods achieve state-of-the-art performance by training a network end-to-end to map a noisy image to a clean one. Networks that work well are CNNs [3, 32], vision transformers [19], or MLP based architectures [21, 27].", "bbox": [ 111, 714, 482, 789 ], "page_idx": 1 }, { "type": "text", "text": "Noise2Noise [17] yields excellent performance from training on two noisy images of the same static scene, without any ground truth images. Given that the noise has zero mean, training a network to map one noisy image to another noisy image of the same scene performs as well as mapping to the ground truth. While having access to a pair of noisy images of the same scene is in practice hard to achieve, the Noise2Noise method", "bbox": [ 111, 791, 482, 911 ], "page_idx": 1 }, { "type": "text", "text": "has motivated further research in self-supervised methods [12] that require only single noisy images.", "bbox": [ 511, 90, 882, 121 ], "page_idx": 1 }, { "type": "text", "text": "Self-supervised methods are trained on datasets consisting of only noisy images. Noise2Void [15] and Noise2Self [2] are two blind spot prediction approaches for image denoising. Given a set of noisy images $\\{\\mathbf{y}^i\\}_{1}^n$ , The idea is to minimize the loss $\\frac{1}{n}\\sum_{i=1}^{n}\\mathcal{L}(f_{\\theta}(M^i(\\mathbf{y}^i)),\\mathbf{y}^i)$ , where $\\mathcal{L}$ is a loss function, $f_{\\theta}$ is a network, and $M^i$ is an operator that masks some pixels, hence the name blind spot. Assuming that the neighbouring pixels of a clean image are highly correlated, and that the noise pixels are independent, a network trained to reconstruct a masked pixel, can only predict the signal value from the neighbouring visible pixels, but not the noise.", "bbox": [ 511, 138, 883, 334 ], "page_idx": 1 }, { "type": "text", "text": "Recently, several works [4, 26, 34] attempted to use Stein's unbiased risk estimator for Gaussian denoising. Such methods work well only for Gaussian noise and require the noise level to be known in advance. A more general framework is Noisier2Noise [23] which works for any noise distribution, but the distribution must be known in advance.", "bbox": [ 511, 335, 883, 439 ], "page_idx": 1 }, { "type": "text", "text": "The newly proposed Neighbour2Neighbour [12] builds on the Noise2Noise [17] method, where the assumptions are that the noise has zero mean and is pixel-wise independent. Neighbour2Neighbour extends Noise2Noise by enabling training without noisy image pairs. It does so by sub-sampling single noisy images to create pairs of noisy images, where Noise2Noise can be applied.", "bbox": [ 511, 441, 883, 561 ], "page_idx": 1 }, { "type": "text", "text": "Zero-Shot/ Dataset free Methods. Most similar to our work is Noise2Fast [18], which also builds on Noise2Noise and Neighbour2Neighbour to achieve dataset-free denoising. However, the method is only evaluated on grayscale images, uses a relatively large network, and requires an early stopping criterion. Our work improves on Noise2Fast by easily denoising grayscale or RGB images, and designing a consistency loss that alleviates the need to early stop. Moreover, we use a much smaller network which saves compute. Specifically, our network is twelve times smaller and a forward pass through it is seven times faster. To the best of our knowledge, our work is the first to utilize a small 2-layer network and achieve competitive quality for image restoration. We show that on grayscale images, our method despite achieving similar scores to Noise2Fast [18], produces better quality images. This is likely due to Noise2Fast dropping pixel values when downsampling, whereas our method always keeps all information retained.", "bbox": [ 511, 579, 883, 878 ], "page_idx": 1 }, { "type": "text", "text": "Besides this work, classical non-learning-based methods, such as BM3D [7] and Anscombe [20], work", "bbox": [ 511, 881, 883, 912 ], "page_idx": 1 }, { "type": "page_number", "text": "14019", "bbox": [ 480, 950, 517, 962 ], "page_idx": 1 }, { "type": "text", "text": "well for Gaussian and Poisson noise, respectively, and require the noise level as an input.", "bbox": [ 111, 90, 480, 119 ], "page_idx": 2 }, { "type": "text", "text": "DIP (Deep Image Prior) [28] and its variants such as the Deep Decoder [11] build on the fact that CNNs have an inductive bias towards natural images, in that they can fit natural images much faster than noise. Therefore, a network trained, with early stopping, to map a random input to the noisy image will denoise the image. The denoising performance of DIP is often poor, and is dependent on the number of training epochs, which is hard to determine in advance.", "bbox": [ 111, 122, 480, 256 ], "page_idx": 2 }, { "type": "text", "text": "Self2Self [24] utilizes the idea of the blind spot networks (reconstructing masked pixels) on a single image, but with dropout ensembling. However, this method is not computationally efficient, in that it requires long durations to denoise an image. According to the authors, it takes 1.2 hours to denoise one $256 \\times 256$ image on a GPU. Compared to other blind spot networks, Self2Self achieves significantly better denoising scores, since it relies on ensembling, i.e., averaging the output of several networks. However, ensemble learning over smoothens the image, causing a loss of some details, despite the improvement in PSNR scores [8].", "bbox": [ 111, 258, 480, 440 ], "page_idx": 2 }, { "type": "text", "text": "Similar to almost all supervised and self-supervised methods, both Self2Self and DIP use a UNet [25] or a variant of it as the backbone network in their architectures. A UNet typically has millions of parameters, making it unsuitable for compute limited applications. Our work departs from this scheme, by designing a shallow and simple network with few parameters.", "bbox": [ 111, 441, 480, 547 ], "page_idx": 2 }, { "type": "text", "text": "3. Method", "text_level": 1, "bbox": [ 112, 564, 202, 579 ], "page_idx": 2 }, { "type": "text", "text": "Our method builds on the Noise2Noise [17], for training a network on pairs of noisy images, and the Neighbour2Neighbour (NB2NB) [12], which generates such pairs from a single noisy image. Our main idea is to generate a pair of noisy images from a single noisy image and train a small network only on this pair. We start with a brief summary of Noise2Noise and then introduce our method.", "bbox": [ 111, 590, 480, 710 ], "page_idx": 2 }, { "type": "text", "text": "3.1. Background: Noise2Noise and Neighbour2Neighbour", "text_level": 1, "bbox": [ 112, 724, 480, 756 ], "page_idx": 2 }, { "type": "text", "text": "Supervised denoising methods are typically neural networks $f_{\\theta}$ that map a noisy image $\\mathbf{y}$ to an estimate $f_{\\theta}(\\mathbf{y})$ of the clean image $\\mathbf{x}$ . Supervised denoising methods are typically trained on pairs of clean images $\\mathbf{x}$ and noisy measurements $\\mathbf{y} = \\mathbf{x} + \\mathbf{e}$ , where $\\mathbf{e}$ is noise. We refer to supervised denoising as Noise2Clean (N2C).", "bbox": [ 111, 765, 480, 854 ], "page_idx": 2 }, { "type": "text", "text": "Neural networks can also be trained on different noisy observations of the same clean image. Noise2Noise (N2N) [17] assumes access to a set of pairs of noisy images $\\mathbf{y}_1 = \\mathbf{x} + \\mathbf{e}_1, \\mathbf{y}_2 = \\mathbf{x} + \\mathbf{e}_2$", "bbox": [ 111, 856, 480, 912 ], "page_idx": 2 }, { "type": "text", "text": "where $\\mathbf{e}_1, \\mathbf{e}_2$ are independent noise vectors. A network $f_{\\theta}$ is then trained to minimize the empirical risk $\\frac{1}{n} \\sum_{i=1}^{n} \\left\\| f_{\\theta}(\\mathbf{y}_1^i) - \\mathbf{y}_2^i \\right\\|_2^2$ . This makes sense, since in expectation over such noisy instances, and assuming zero mean noise, training a network in a supervised manner to map a noisy image to another noisy image is equivalent to mapping it to a clean image i.e.,", "bbox": [ 511, 90, 882, 193 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\underset {\\theta} {\\arg \\min } \\mathbb {E} \\left[ \\| f _ {\\theta} (\\mathbf {y} _ {1}) - \\mathbf {x} \\| _ {2} ^ {2} \\right] = \\underset {\\theta} {\\arg \\min } \\mathbb {E} \\left[ \\| f _ {\\theta} (\\mathbf {y} _ {1}) - \\mathbf {y} _ {2} \\| _ {2} ^ {2} \\right]. \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 513, 202, 885, 238 ], "page_idx": 2 }, { "type": "text", "text": "The proof is given in the supplementary material.", "bbox": [ 532, 239, 857, 253 ], "page_idx": 2 }, { "type": "text", "text": "In theory N2N training reaches the same performance as N2C training if the dataset is infinitely large. In practice, since the training set is limited in size, N2N falls slightly short of N2C. For example, N2N training with a UNet on 50k images gives a performance drop of only about $0.02\\mathrm{dB}$ compared to N2C with a UNet.", "bbox": [ 511, 255, 882, 344 ], "page_idx": 2 }, { "type": "text", "text": "Despite the great performance of N2N, its usability is often limited, since it is difficult to obtain a pair of noisy images of the same static scene. For instance, the object being captured might be non-static, or the lighting conditions change rapidly.", "bbox": [ 511, 345, 882, 421 ], "page_idx": 2 }, { "type": "text", "text": "Neighbour2Neighbour (NB2NB) [12] extends N2N and allows training only on a set of single noisy images, by sub-sampling a noisy image to create a pair of noisy images. Similar to N2N, NB2NB exhibits strong denoising performance when trained on many images.", "bbox": [ 511, 422, 882, 498 ], "page_idx": 2 }, { "type": "text", "text": "3.2. Zero-Shot Noise2Noise", "text_level": 1, "bbox": [ 513, 508, 723, 523 ], "page_idx": 2 }, { "type": "text", "text": "Our work extends Noise2Noise [17] and Neighbour2Neighbour [12] by enabling training on only one single noisy image. To avoid overfitting to the single image, we use a very shallow network and an explicit regularization term.", "bbox": [ 511, 532, 882, 607 ], "page_idx": 2 }, { "type": "text", "text": "Almost all self- or un-supervised denoising methods, including ours, rely on the premise that a clean natural image has different attributes than random noise. As shown in [12], a noisy image can be decomposed into a pair of downsampled images. Based on the premise that nearby pixels of a clean image are highly correlated and often have similar values, while the noise pixels are unstructured and independent, the downsampled pair of noisy images has similar signal but independent noise. This pair can therefore serve as an approximation of two noisy observations of the same scene, where one observation is used as the input, and the other as the target, as in N2N.", "bbox": [ 511, 609, 882, 803 ], "page_idx": 2 }, { "type": "text", "text": "Our approach is to first decompose the image into a pair of downsampled images and second train a lightweight network with regularization to map one downsampled image to the other. Applying the so-trained network to a noisy image yields the denoised image. We first explain how we generate the downsampled images, and then how we fit the network.", "bbox": [ 511, 806, 882, 911 ], "page_idx": 2 }, { "type": "page_number", "text": "14020", "bbox": [ 480, 950, 517, 962 ], "page_idx": 2 }, { "type": "text", "text": "Image Pair Down sampler The pair down sampler takes as input an image $\\mathbf{y}$ of size $H\\times W\\times C$ and generates two images $D_{1}(\\mathbf{y})$ and $D_{2}(\\mathbf{y})$ , each of size $H / 2\\times W / 2\\times C$ . The down sampler generates those images by dividing the image into non-overlapping patches of size $2\\times 2$ , taking an average of the diagonal pixels of each patch and assigning it to the first low-resolution image, then the average of the anti-diagonal pixels and assigning it to the second low-resolution image. See Figure 2 for an illustration of the pair down sampler.", "bbox": [ 111, 90, 480, 241 ], "page_idx": 3 }, { "type": "text", "text": "The downsample is implemented with convolutions as follows. The first low-resolution image is obtained by applying a 2D convolution with stride two and fixed kernel $\\mathbf{k}_1 = \\begin{bmatrix} 0 & 0.5 \\\\ 0.5 & 0 \\end{bmatrix}$ to the original image as $D_1(\\mathbf{y}) = \\mathbf{y} * \\mathbf{k}_1$ , and the second image is obtained by applying a 2D convolution with stride two and fixed kernel $\\mathbf{k}_2 = \\begin{bmatrix} 0.5 & 0 \\\\ 0 & 0.5 \\end{bmatrix}$ to the original image as $D_2(\\mathbf{y}) = \\mathbf{y} * \\mathbf{k}_2$ . The convolutions are implemented channel-wise and therefore the downsampling scheme is applicable to any arbitrary number of input channels.", "bbox": [ 111, 242, 483, 421 ], "page_idx": 3 }, { "type": "image", "img_path": "images/072dc66dcb427118e22a6c61690194a433223b48e11010108bfa7e63e6b1f977.jpg", "image_caption": [ "Figure 2. The Image Pair Downsampler decomposes an image into two images of half the spatial resolution by averaging diagonal pixels of $2 \\times 2$ non-overlapping patches. In the above example the input is a $4 \\times 4$ image, and the output is two $2 \\times 2$ images." ], "image_footnote": [], "bbox": [ 124, 431, 468, 568 ], "page_idx": 3 }, { "type": "text", "text": "Zero-shot-image denoising method. Given a test image $\\mathbf{y}$ to denoise, our method is conceptually similar to first fitting a small image-to-image neural network $f_{\\theta}$ to map the first downsampled image $D_{1}(\\mathbf{y})$ to the second one, $D_{2}(\\mathbf{y})$ by minimizing the loss", "bbox": [ 111, 680, 482, 756 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2}. \\tag {2}\n$$\n", "text_format": "latex", "bbox": [ 184, 763, 480, 782 ], "page_idx": 3 }, { "type": "text", "text": "Once we fitted the network, we can apply it to the original noisy observation to estimate the denoised image as $\\hat{\\mathbf{x}} = f_{\\hat{\\theta}}(\\mathbf{y})$", "bbox": [ 111, 791, 482, 835 ], "page_idx": 3 }, { "type": "text", "text": "However, our experiments showed that residual learning, a symmetric loss, and an additional consistency-enforcing term are critical for good performance. We next explain the elements of our loss function. In residual learning, the network is optimized to fit", "bbox": [ 111, 837, 483, 912 ], "page_idx": 3 }, { "type": "text", "text": "the noise instead of the image. The loss then becomes", "bbox": [ 511, 90, 870, 106 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| D _ {1} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2}. \\tag {3}\n$$\n", "text_format": "latex", "bbox": [ 553, 116, 882, 135 ], "page_idx": 3 }, { "type": "text", "text": "Following [6], where a symmetric loss was used in the context of self-supervised pretraining of a siamese network, we additionally adopt a symmetric loss, which yields the residual loss:", "bbox": [ 511, 146, 883, 207 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} \\mathcal {L} _ {\\text {r e s .}} (\\boldsymbol {\\theta}) = \\frac {1}{2} \\left(\\left\\| D _ {1} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2} + \\right. \\\\ \\left. \\left\\| D _ {2} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {2} (\\mathbf {y})\\right) - D _ {1} (\\mathbf {y}) \\right\\| _ {2} ^ {2}\\right). \\tag {4} \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 527, 217, 880, 285 ], "page_idx": 3 }, { "type": "text", "text": "In addition, we enforce consistency by ensuring that first denoising the image $\\mathbf{y}$ and then downsampling it, is similar to what we get when first downsampling $\\mathbf{y}$ and then denoising it, i.e., we consider a loss of the form:", "bbox": [ 511, 287, 883, 347 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| D (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} (D (\\mathbf {y})) - D (\\mathbf {y} - f _ {\\boldsymbol {\\theta}} (\\mathbf {y})) \\right\\| _ {2} ^ {2}. \\tag {5}\n$$\n", "text_format": "latex", "bbox": [ 524, 357, 882, 377 ], "page_idx": 3 }, { "type": "text", "text": "Again adopting a symmetric loss, the consistency loss becomes:", "bbox": [ 511, 386, 883, 412 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} \\mathcal {L} _ {\\mathrm {c o n s .}} (\\pmb {\\theta}) = \\frac {1}{2} \\Big (\\| D _ {1} (\\mathbf {y}) - f _ {\\pmb {\\theta}} (D _ {1} (\\mathbf {y})) - D _ {1} (\\mathbf {y} - f _ {\\pmb {\\theta}} (\\mathbf {y})) \\| _ {2} ^ {2} \\\\ \\left. + \\left\\| D _ {2} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {2} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y} - f _ {\\boldsymbol {\\theta}} (\\mathbf {y})) \\right\\| _ {2} ^ {2}\\right). \\tag {6} \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 514, 421, 888, 483 ], "page_idx": 3 }, { "type": "text", "text": "Note that for the residual loss, the network only has the downsampled images as input. Only in the consistency loss, the network gets to see the image in full spatial resolution. Including the consistency loss enables better denoising performance and helps to avoid overfitting. It can therefore be seen as a regularizing term.", "bbox": [ 511, 484, 883, 573 ], "page_idx": 3 }, { "type": "text", "text": "In summary, we minimize the loss $\\mathcal{L}(\\pmb{\\theta}) = \\mathcal{L}_{\\mathrm{res.}}(\\pmb{\\theta}) + \\mathcal{L}_{\\mathrm{cons.}}(\\pmb{\\theta})$ using gradient descent, which yields the network parameters $\\hat{\\pmb{\\theta}}$ . With those, we estimate the denoised image as $\\hat{\\mathbf{x}} = \\mathbf{y} - f_{\\hat{\\pmb{\\theta}}}(\\mathbf{y})$ . Note that only the network parameters $\\pmb{\\theta}$ are optimized during the gradient descent updates, since the downsampling operations $D_{1}$ and $D_{2}$ are fixed. Convergence typically requires 1k to 2k iterations, which thanks to using a lightweight network takes less than half a minute on a GPU and around one minute on a CPU.", "bbox": [ 511, 575, 883, 727 ], "page_idx": 3 }, { "type": "text", "text": "Network Many supervised and self-supervised methods use a relatively large network, often a UNet [25]. Instead, we use a very simple two-layer image-to-image network. It consists of only two convolutional operators with kernel size $3 \\times 3$ followed by one operator of $1 \\times 1$ convolutions. This network has about $20k$ parameters, which is small compared to typical denoising networks. An exact comparison of the network sizes can be found in section 4.4. There are no normalization or pooling layers. The low parameter count and simple structure enables fast denoising even when deployed on a CPU.", "bbox": [ 511, 744, 883, 912 ], "page_idx": 3 }, { "type": "page_number", "text": "14021", "bbox": [ 480, 950, 517, 962 ], "page_idx": 3 }, { "type": "text", "text": "In the ablation studies we show that using a UNet instead of a lightweight network leads to overfitting and much worse denoising performance.", "bbox": [ 112, 90, 480, 137 ], "page_idx": 4 }, { "type": "text", "text": "4. Experiments", "text_level": 1, "bbox": [ 112, 152, 243, 169 ], "page_idx": 4 }, { "type": "text", "text": "We compare our denoising algorithm (ZS-N2N) to several baselines. The baselines include dataset based methods, as well as other zero-shot methods. For the dataset based methods, we include both supervised (with clean images) and self-supervised (only noisy images) methods. We test all methods on artificial and real-world noise. We provide ablation studies in the supplementary material.", "bbox": [ 111, 178, 480, 297 ], "page_idx": 4 }, { "type": "text", "text": "The results highlight the dependency of dataset based methods on the dataset they are trained on and suggest that given a small training set, they are outperformed by dataset free ones. Furthermore, the experiments show that methods based on noise models achieve good performance for the specific noise model, but do not generalise to other distributions.", "bbox": [ 111, 300, 480, 404 ], "page_idx": 4 }, { "type": "text", "text": "Concerning the dataset and noise model free methods, our proposed method is either on par or better than other baselines on Gaussian, Poisson, and real world camera and microscope noise. Our method only falls short of Self2Self [24] on high noise levels, however, it requires only $\\frac{1}{200}$ of the denoising time of Self2Self and $2\\%$ of its memory. Moreover, Self2self's performance on low noise levels is insufficient. Therefore, considering denoising quality, generalisition, and computational resources, our method achieves a better trade-off compared to existing methods as shown in Figure 1.", "bbox": [ 111, 407, 480, 571 ], "page_idx": 4 }, { "type": "text", "text": "4.1. Baselines", "text_level": 1, "bbox": [ 112, 584, 220, 599 ], "page_idx": 4 }, { "type": "text", "text": "We compare to Noise2Clean (N2C) with a UNet, which is the current state-of-the-art denoising algorithm. There exists several other networks that perform on par with the UNet, such as DnCNN [32] and RED30 [22], but the UNet is orders of magnitude faster, since it is not very deep, and has a multi-resolution structure. The UNet is therefore the standard choice in all recent denoising papers [12, 15, 17, 23].", "bbox": [ 111, 608, 480, 728 ], "page_idx": 4 }, { "type": "text", "text": "For the self-supervised methods, we compare to Neighbour2Neighbour (NB2NB) [12] and Noise2Void (N2V) [15]. We exclude the methods that require an explicit noise model, such as [4, 16, 23, 34], since these methods work well on synthetic denoising tasks for the given noise distribution, but fail to generalize to unknown noise distributions or real-world noise [12, 30]. This is due to the fact that the synthetic noise is insufficient for simulating real camera noise, which is signal-dependent and substantially altered by the camera's imaging system.", "bbox": [ 111, 729, 480, 895 ], "page_idx": 4 }, { "type": "text", "text": "Regarding the zero-shot methods, which are most", "bbox": [ 130, 897, 480, 911 ], "page_idx": 4 }, { "type": "text", "text": "similar to ours, we compare to the deep learning based algorithms: DIP [28] and Self2Self (S2S) [24], and also to the classical algorithm: BM3D [7]. Note that apart of our method (and BM3D), all baselines use a U-Net or a variation of it as a denoising backbone.", "bbox": [ 511, 90, 883, 167 ], "page_idx": 4 }, { "type": "text", "text": "The performance of DIP is very sensitive to the number of gradient descent steps. We used the ground truth images to determine the best early stopping iteration. The DIP results can therefore be seen as an over optimistic performance of the method. For a fair comparison, we report the results of the best performing model for the other baselines. A comparison of the sensitivity of the methods to the number of optimization steps can be found in the supplementary material.", "bbox": [ 511, 167, 883, 303 ], "page_idx": 4 }, { "type": "text", "text": "The original implementation of S2S uses an ensemble of multiple networks, i.e., averaging the outputs of several networks. All other baselines do not utilize ensembling or averaging. For a fair comparison, we additionally report the results of S2S without any ensembling, which we denote by S2S*. S2S denotes the original implementation with an ensemble of 50 networks.", "bbox": [ 511, 304, 880, 409 ], "page_idx": 4 }, { "type": "text", "text": "4.2. Synthetic Noise", "text_level": 1, "bbox": [ 511, 421, 668, 436 ], "page_idx": 4 }, { "type": "text", "text": "The dataset based methods (N2C, NB2NB, N2V) are trained on 500 colour images from ImageNet [10]. All methods are tested on the Kodak24 ${}^{1}$ and McMaster18 [13] datasets. All training and test images are centercropped to patches of size ${256} \\times {256}$ .", "bbox": [ 511, 446, 883, 520 ], "page_idx": 4 }, { "type": "text", "text": "We examine Gaussian and Poisson noise with noise levels $\\sigma$ and $\\lambda$ respectively. We consider the fixed noise levels $\\sigma, \\lambda = 10, 25, 50$ . The $\\sigma$ values for Gaussian noise correspond to pixel values in the interval [0,255], while the $\\lambda$ values for Poisson noise correspond to values in the interval [0,1].", "bbox": [ 511, 521, 883, 612 ], "page_idx": 4 }, { "type": "text", "text": "For the dataset based methods, we also consider blind denoising during training with the range of noise levels $\\sigma, \\lambda \\in [10, 50]$ . During training, a $\\sigma, \\lambda$ value is sampled uniformly from the given range for each image in each training epoch, unlike the fixed noise levels, where all training images are contaminated with the same noise level. Blind denoising is what is used in practice, since an exact noise level is typically not given, but rather a range of noise levels.", "bbox": [ 511, 613, 880, 748 ], "page_idx": 4 }, { "type": "text", "text": "In table 1, we present the denoising performance of the different methods. For the dataset based methods, $\\sigma, \\lambda$ is known, denotes that the network trained on that exact noise level is used for testing, while unknown denotes the blind denoising, where the network trained on the range of noise levels [10,50] is used for testing. BM3D requires as input the value of the noise level. For Gaussian denoising the known $\\sigma$ value was used, while for Possion denoising the noise level was estimated us", "bbox": [ 511, 750, 883, 885 ], "page_idx": 4 }, { "type": "page_footnote", "text": "http://r0k.us/graphics/kodak/", "bbox": [ 529, 898, 767, 911 ], "page_idx": 4 }, { "type": "page_number", "text": "14022", "bbox": [ 480, 950, 517, 962 ], "page_idx": 4 }, { "type": "text", "text": "ing the method in [5]. Note that ZS-N2N, DIP, and S2S do not utilize any prior information on the noise distribution or level.", "bbox": [ 109, 90, 480, 133 ], "page_idx": 5 }, { "type": "text", "text": "As seen from the results, the dataset based methods often fall slightly short of the dataset free methods. This is due to the fact that they were only trained on 500 images, whereas they reach good performance when trained on larger datasets. In the supplementary material, we show that when N2C is trained on 4000 images, it outperforms all other baselines and its performance can keep improving with more training data. Another drawback of dataset based methods is that they are sensitive to the data they are trained on. They experience a performance drop when trained on a range of noise levels as opposed to a specific noise level as the test set.", "bbox": [ 109, 137, 480, 316 ], "page_idx": 5 }, { "type": "text", "text": "Regarding the zero-shot methods, DIP exhibited worse scores in all simulations. BM3D is tailored to work well for Gaussian denoising, where the exact noise variance is known and required as input. However, its performance dropped for Poisson noise, where the noise level was estimated.", "bbox": [ 109, 318, 480, 407 ], "page_idx": 5 }, { "type": "text", "text": "ZS-N2N and S2S do not rely on a specific noise model and therefore work consistently well for both Gaussian and Poisson noise. However, S2S suffers from at least two drawbacks. The first is it heavily relies on ensembling to achieve good scores as seen by comparing the results of S2S with $\\mathrm{S2S^{*}}$ . Despite improving the scores, ensembling oversmoothens the image causing a loss in some visual features [8]. Note that all other baselines are ensemble free. The second drawback is that it performs worse than all other baselines on low noise levels, as seen in the Gaussian noise with $\\sigma = 10$ .", "bbox": [ 109, 409, 480, 574 ], "page_idx": 5 }, { "type": "text", "text": "Considering that DIP performs poorly, that BM3D only works well for Gaussian noise, and that S2S's performance without ensembling and on low noise levels is unsatisfactory, our method, ZS-N2N is the only dataset free denoising algorithm that performs well on different noise distributions and levels.", "bbox": [ 109, 575, 480, 665 ], "page_idx": 5 }, { "type": "text", "text": "4.3. Real-World Noise", "text_level": 1, "bbox": [ 112, 676, 284, 690 ], "page_idx": 5 }, { "type": "text", "text": "Camera noise: Following [24], we evaluate on the PolyU dataset [29] which consists of high-resolution images from various scenes captured by 5 cameras from the 3 leading brands of cameras: Canon, Nikon, and Sony. We also consider the SIDD [1], which consists of images captured by several smartphone cameras under different lighting conditions and noise patterns.", "bbox": [ 109, 700, 480, 805 ], "page_idx": 5 }, { "type": "text", "text": "Since the computational cost for running S2S is high, we randomly choose 20 images from both datasets to test on. The SIDD validation set has images of size $256 \\times 256$ . For consistency, we center-crop the PolyU images to patches of size $256 \\times 256$ . The results are shown in table 2. All methods perform similarly except for BM3D and the ensemble free version of S2S, which", "bbox": [ 109, 806, 480, 910 ], "page_idx": 5 }, { "type": "text", "text": "exhibit a notable performance drop.", "bbox": [ 513, 90, 750, 106 ], "page_idx": 5 }, { "type": "table", "img_path": "images/f798b3ecd447631810d171f9a3b4d6c1a19f4ba843f1beabd42eac8175e5f65f.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Dataset</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>S2S*</td><td>BM3D</td></tr><tr><td>PolyU</td><td>36.92</td><td>37.07</td><td>37.01</td><td>33.12</td><td>36.11</td></tr><tr><td>SIDD</td><td>34.07</td><td>34.31</td><td>33.98</td><td>30.77</td><td>28.19</td></tr></table>", "bbox": [ 514, 119, 893, 169 ], "page_idx": 5 }, { "type": "text", "text": "Microscope noise: We additionally evaluate on the Fluorescence Microscopy dataset [33], which contains real grayscale fluorescence images obtained with commercial confocal, two-photon, and wide-field microscopes and representative biological samples such as cells, zebrafish, and mouse brain tissues. We pick random images from the test set to test on. We also compare to Noise2Fast (N2F) [18], for which code for denoising grayscale is available. The results are depicted in table 3.", "bbox": [ 511, 215, 880, 366 ], "page_idx": 5 }, { "type": "table", "img_path": "images/d52d06630cbb8303c97dab9b3a1657560e8a49ea2aecb308b3f8d7323837fa26.jpg", "table_caption": [ "Table 2. Denoising PSNR in dB on real world camera noise." ], "table_footnote": [], "table_body": "<table><tr><td>Image</td><td>Photon BPAE</td><td>Photon Mice</td><td>Confocal BPAE</td><td>Average</td></tr><tr><td>ZS-N2N</td><td>30.73</td><td>31.42</td><td>35.85</td><td>32.67</td></tr><tr><td>DIP</td><td>29.22</td><td>30.01</td><td>35.51</td><td>31.58</td></tr><tr><td>S2S</td><td>30.90</td><td>31.51</td><td>31.01</td><td>31.14</td></tr><tr><td>S2S*</td><td>29.49</td><td>29.99</td><td>29.54</td><td>29.67</td></tr><tr><td>BM3D</td><td>27.19</td><td>29.48</td><td>33.23</td><td>29.97</td></tr><tr><td>N2F</td><td>30.93</td><td>31.07</td><td>36.01</td><td>32.67</td></tr></table>", "bbox": [ 521, 378, 874, 502 ], "page_idx": 5 }, { "type": "text", "text": "Table 3. PSNR in dB on real world microscope noise.", "bbox": [ 535, 513, 857, 527 ], "page_idx": 5 }, { "type": "text", "text": "Our method and Noise2Fast achieve similar scores and slightly outperform the other baselines. Despite the similarity in scores, when inspecting the denoised images visually, we see differences: Our method produces visually sharper images and preserves slightly more details, while the Noise2Fast images are relatively smooth. This is most noticeable on images with fine details, such as MRI images, see Figure 3 for a knee image from the fastMRI dataset [31]. The blurriness in the Noise2Fast images is likely due to the downsampling scheme used, which drops some pixel values, and the ensembling performed to obtain the final image estimate, which oversmoothens the image [8]. Our method, on the other hand, preserves all pixel values during downsampling, and is ensemble free.", "bbox": [ 511, 547, 880, 772 ], "page_idx": 5 }, { "type": "text", "text": "4.4. Computational Efficiency", "text_level": 1, "bbox": [ 511, 782, 743, 799 ], "page_idx": 5 }, { "type": "text", "text": "In this section we focus on the computational efficiency. We consider the denoising time and the memory requirements represented by the number of network parameters. Since in some applications a GPU is not available [9], we additionally consider the denoising time on a CPU. The GPU tested is Quadro RTX 6000 and the CPU is Intel Core i9-9940X 3.30GHz.", "bbox": [ 511, 806, 880, 910 ], "page_idx": 5 }, { "type": "page_number", "text": "14023", "bbox": [ 480, 950, 517, 962 ], "page_idx": 5 }, { "type": "table", "img_path": "images/fcee7752d5dbd5a40edbe27f76aa63bbda08283f3781384aeaed670d00f8c964.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Noise</td><td colspan=\"2\">Method</td><td colspan=\"3\">Kodak24</td><td colspan=\"3\">McMaster18</td></tr><tr><td rowspan=\"12\">Gaussian</td><td rowspan=\"7\">dataset-based</td><td rowspan=\"3\">N2C</td><td>σ known?</td><td>σ = 10</td><td>σ = 25</td><td>σ = 50</td><td>σ = 10</td><td>σ = 25</td></tr><tr><td>yes</td><td>33.45</td><td>28.27</td><td>25.47</td><td>33.03</td><td>28.46</td></tr><tr><td>no</td><td>32.16</td><td>28.18</td><td>24.45</td><td>31.97</td><td>28.26</td></tr><tr><td rowspan=\"2\">NB2NB</td><td>yes</td><td>33.01</td><td>27.90</td><td>25.02</td><td>32.63</td><td>28.01</td></tr><tr><td>no</td><td>31.79</td><td>27.80</td><td>24.15</td><td>31.19</td><td>27.85</td></tr><tr><td rowspan=\"2\">N2V</td><td>yes</td><td>30.19</td><td>26.21</td><td>24.07</td><td>30.95</td><td>26.50</td></tr><tr><td>no</td><td>28.95</td><td>26.03</td><td>23.19</td><td>29.64</td><td>26.31</td></tr><tr><td rowspan=\"5\">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>33.69</td><td>29.07</td><td>24.81</td><td>34.21</td><td>28.80</td></tr><tr><td>DIP</td><td>-</td><td>32.28</td><td>27.38</td><td>23.95</td><td>33.07</td><td>27.61</td></tr><tr><td>S2S</td><td>-</td><td>29.54</td><td>28.39</td><td>26.22</td><td>30.78</td><td>28.71</td></tr><tr><td>S2S*</td><td>-</td><td>26.93</td><td>26.29</td><td>24.83</td><td>27.64</td><td>26.48</td></tr><tr><td>BM3D</td><td>yes</td><td>33.74</td><td>29.02</td><td>25.51</td><td>34.51</td><td>29.21</td></tr><tr><td rowspan=\"12\">Poisson</td><td rowspan=\"7\">dataset-based</td><td rowspan=\"3\">N2C</td><td>λ known?</td><td>λ = 50</td><td>λ = 25</td><td>λ = 10</td><td>λ = 50</td><td>λ = 25</td></tr><tr><td>yes</td><td>29.42</td><td>27.49</td><td>26.25</td><td>29.89</td><td>28.20</td></tr><tr><td>no</td><td>28.92</td><td>27.14</td><td>23.13</td><td>28.62</td><td>27.51</td></tr><tr><td rowspan=\"2\">NB2NB</td><td>yes</td><td>29.19</td><td>27.01</td><td>25.71</td><td>29.41</td><td>27.79</td></tr><tr><td>no</td><td>28.53</td><td>26.88</td><td>23.60</td><td>28.03</td><td>27.66</td></tr><tr><td rowspan=\"2\">N2V</td><td>yes</td><td>27.73</td><td>25.55</td><td>23.77</td><td>27.86</td><td>25.65</td></tr><tr><td>no</td><td>27.04</td><td>25.28</td><td>21.93</td><td>26.34</td><td>25.52</td></tr><tr><td rowspan=\"5\">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>29.45</td><td>27.52</td><td>24.92</td><td>30.36</td><td>28.41</td></tr><tr><td>DIP</td><td>-</td><td>27.51</td><td>25.84</td><td>23.81</td><td>28.73</td><td>27.37</td></tr><tr><td>S2S</td><td>-</td><td>28.89</td><td>28.31</td><td>27.29</td><td>30.11</td><td>29.40</td></tr><tr><td>S2S*</td><td>-</td><td>26.75</td><td>26.40</td><td>25.63</td><td>27.55</td><td>27.24</td></tr><tr><td>BM3D</td><td>no</td><td>28.36</td><td>26.58</td><td>24.20</td><td>27.33</td><td>24.77</td></tr></table>", "bbox": [ 138, 88, 859, 474 ], "page_idx": 6 }, { "type": "text", "text": "Table 1. PSNR scores in dB for Gaussian and Poisson denoising. Best result is in bold, second best result is underlined. The dataset based methods are italicized. Note DIP's mediocre scores and BM3D's performance drop between Gaussian and Poisson noise. S2S has significantly lower scores in low noise as seen with $\\sigma = 10$ and its ensemble free version S2S* has inadequate performance. Denoised samples can be found in the supplementary material.", "bbox": [ 116, 487, 880, 542 ], "page_idx": 6 }, { "type": "text", "text": "In table 4 we display the time required to denoise one colour image of size $256 \\times 256$ at inference, as well as the total number of trainable parameters of a model. The dataset based methods are trained for long durations, but after training, the network parameters are fixed, and inference is almost instantaneous, since it is just a forward pass through the model. The time taken for denoising is therefore negligible compared to the zero-shot methods, whose parameters are optimized for each test image separately.", "bbox": [ 116, 569, 480, 719 ], "page_idx": 6 }, { "type": "text", "text": "In the original implementation of S2S, the authors report a denoising time of 1.2 hours for a $256 \\times 256$ colour image on GPU. However, we noticed that only half of the gradient update iterations are needed for convergence. We therefore report only half of their GPU time.", "bbox": [ 116, 726, 480, 815 ], "page_idx": 6 }, { "type": "text", "text": "Concerning the denoising time, dataset based methods are the fastest, since a forward pass through a fixed network requires only milli seconds. Regarding the deep learning based zero-shot methods, ZS-N2N is significantly more computationally efficient. Specifically, on CPU it is 200 times and 35 times faster than S2S and", "bbox": [ 116, 821, 480, 910 ], "page_idx": 6 }, { "type": "text", "text": "DIP respectively and has only $2\\%$ and $1\\%$ of their memory requirements. Only the classical BM3D is computationally more efficient than ZS-N2N.", "bbox": [ 516, 569, 880, 614 ], "page_idx": 6 }, { "type": "text", "text": "4.5. Discussion", "text_level": 1, "bbox": [ 516, 628, 629, 643 ], "page_idx": 6 }, { "type": "text", "text": "Dataset based methods typically achieve state-of-the-art results but our experiments manifested two of their shortcomings: They don't perform well when trained on small datasets, and the performance drops when the test data differs from the training data, as seen by varying the noise levels. This highlights the importance of dataset free denoising algorithms.", "bbox": [ 516, 654, 880, 758 ], "page_idx": 6 }, { "type": "text", "text": "Methods that rely on an explicit model of the noise distribution such as Noisier2Noise [23] and Anscombe [20] or those tailored to work well for specific distributions such as BM3D, do not generalize well to other distributions. Their performance therefore degrades when the noise distribution is unknown, or the noise level must be estimated. This has been manifested by BM3D's competitive performance on Gaussian noise, but its failure to keep up with the other baselines on Poisson and real world noise. These findings highlight the advantage", "bbox": [ 516, 761, 880, 910 ], "page_idx": 6 }, { "type": "page_number", "text": "14024", "bbox": [ 480, 952, 517, 962 ], "page_idx": 6 }, { "type": "image", "img_path": "images/4a90a39e1e5aeffe1bf4ef2585b249e2f75711e91028c17d4c61cba64f880f8f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 114, 87, 269, 220 ], "page_idx": 7 }, { "type": "image", "img_path": "images/57e4001787a4600cc5a18ca0d13e3c647553819bbdcfed802a4b23c56bad574f.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 316, 87, 475, 220 ], "page_idx": 7 }, { "type": "image", "img_path": "images/fbf1a105137312093bd3be1650c690ce8c329005a5b4e06f253480600247281b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 522, 87, 681, 220 ], "page_idx": 7 }, { "type": "image", "img_path": "images/8fca2ab14f3f86eebb388395846f2c72490c0887387c6152e6f80ca46cd37363.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 727, 88, 885, 220 ], "page_idx": 7 }, { "type": "image", "img_path": "images/6af9e111c367a366653d7ded1785a29f770a7bcd717b48de0b280d3906ca8995.jpg", "image_caption": [ "Figure 3. Visual comparison between our method and Noise2Fast for denoising Gaussian noise on a knee MRI. Both methods achieve similar PSNR, but notice how the center and left edge are blurry and oversmooth in Noise2Fast. Our method produces a sharper image with less loss of details." ], "image_footnote": [], "bbox": [ 114, 232, 272, 351 ], "page_idx": 7 }, { "type": "image", "img_path": "images/032512022491e34fb7120f464f3eb60cc120ffd18fa3528ffcf08ecfe9e618f1.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 318, 232, 473, 351 ], "page_idx": 7 }, { "type": "image", "img_path": "images/a1998f7d1439aa188a577ca18ed8ea70f6dad3c491d2fb0ded4fa0f08d2cebd6.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 524, 232, 679, 351 ], "page_idx": 7 }, { "type": "image", "img_path": "images/a171e5ab676a203e8e42fff539343f738e4e985ae75b8fad3afa4d505e479059.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 728, 232, 883, 351 ], "page_idx": 7 }, { "type": "table", "img_path": "images/a12a00be32866bf89f6184853791d22ebab695665a3566592800701682f7ddaf.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Method</td><td>N2C</td><td>NB2NB</td><td>N2V</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>BM3D</td></tr><tr><td>GPU time</td><td>-</td><td>-</td><td>-</td><td>20 sec.</td><td>3 min.</td><td>35 min.</td><td>4 sec.</td></tr><tr><td>CPU time</td><td>-</td><td>-</td><td>-</td><td>80 sec.</td><td>45 min.</td><td>4.5 hr.</td><td>4 sec.</td></tr><tr><td>Network size</td><td>3.3M</td><td>1.3M</td><td>2.2M</td><td>22k</td><td>2.2M</td><td>1M</td><td>-</td></tr></table>", "bbox": [ 210, 433, 787, 500 ], "page_idx": 7 }, { "type": "text", "text": "Table 4. Computational Resources. First and Second Rows: Time taken to denoise one image on average on GPU and CPU. The time for the dataset based methods is discarded, since it is negligible. BM3D does not benefit from the GPU, as there is no optimization involved. Bottom Row: Number of parameters of a network.", "bbox": [ 109, 508, 883, 551 ], "page_idx": 7 }, { "type": "text", "text": "of noise model free techniques.", "bbox": [ 109, 578, 320, 593 ], "page_idx": 7 }, { "type": "text", "text": "Regarding the three dataset free and noise model free methods considered, DIP was often lagging behind S2S and ZS-N2N, despite using the ground truths to find the best possible early stopping iteration. S2S's performance without ensembling is inadequate, and even with ensembling, it does not work well on low noise levels. Moreover, it requires more than 0.5 hours to denoise an image on a GPU and 4.5 hours on a CPU.", "bbox": [ 109, 594, 482, 714 ], "page_idx": 7 }, { "type": "text", "text": "Except for ZS-N2N, all deep learning based baselines have millions of parameters, making them computationally expensive. Considering ZS-N2N's ability to generalize to various denoising conditions with relatively fast denoising time, very few parameters, and CPU compatibility, we can conclude that it offers a good trade-off between denoising quality and computational resources.", "bbox": [ 109, 715, 482, 821 ], "page_idx": 7 }, { "type": "text", "text": "5. Conclusion", "text_level": 1, "bbox": [ 112, 839, 232, 854 ], "page_idx": 7 }, { "type": "text", "text": "We proposed a novel zero-shot image denoising algorithm that does not require any training examples or knowledge of the noise model or level. Our work uses a", "bbox": [ 109, 866, 482, 912 ], "page_idx": 7 }, { "type": "text", "text": "simple 2-layer network, and allows denoising in a relatively short period of time even when executed without a GPU. The method can perform well on simulated noise as well as real-world camera and microscope noise, and achieves a good trade-off between generalization, denoising quality and computational resources compared to existing dataset free methods. A demo of our implementation including our code and hyperparameters can be found in the following colab notebook: https://colab.research.google.com/drive/1i82nyizTdszyHkaHBuKPbWnTzao8HF9b", "bbox": [ 511, 578, 883, 743 ], "page_idx": 7 }, { "type": "text", "text": "Acknowledgements", "text_level": 1, "bbox": [ 513, 763, 681, 780 ], "page_idx": 7 }, { "type": "text", "text": "The authors are supported by the Institute of Advanced Studies at the Technical University of Munich, the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 456465471, 464123524, the German Federal Ministry of Education and Research, and the Bavarian State Ministry for Science and the Arts. The authors of this work take full responsibility for its content.", "bbox": [ 511, 791, 883, 910 ], "page_idx": 7 }, { "type": "page_number", "text": "14025", "bbox": [ 480, 950, 517, 962 ], "page_idx": 7 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 114, 89, 209, 104 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[1] Abdelrahman Abdelhamed, Stephen Lin, and Michael S. Brown. A high-quality denoising dataset for smartphone cameras. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 6", "[2] Joshua Batson and Loic Royer. Noise2Self: Blind denoising by self-supervision. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 524-533. PMLR, 2019. 2", "[3] Tim Brooks, Ben Mildenhall, Tianfan Xue, Jiawen Chen, Dillon Sharlet, and Jonathan T. Barron. Unprocessing Images for Learned Raw Denoising. In IEEE Conference on Computer Vision and Pattern Recognition, pages 11036-11045, 2019. 2", "[4] Sungmin Cha and Taesup Moon. Fully convolutional pixel adaptive image denoiser. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019. 2, 5", "[5] Guangyong Chen, Fengyuan Zhu, and Pheng Ann Heng. An efficient statistical method for image noise level estimation. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 477-485, 2015. 6", "[6] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15750-15758, 2021. 4", "[7] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian. Image Denoising by Sparse 3-D Transform-Domain Collaborative Filtering. IEEE Transactions on Image Processing, 16(8):2080-2095, 2007. 1, 2, 5", "[8] Mohammad Zalbagi Darestani and Reinhard Heckel. Accelerated mri with un-trained neural networks. IEEE Transactions on Computational Imaging, 7:724-733, 2021. 3, 6", "[9] Mauricio Delbracio, Ignacio Garcia-Dorado, SungJoon Choi, Damien Kelly, and Peyman Milanfar. Polyblur: Removing mild blur by polynomial reblurring. IEEE Transactions on Computational Imaging, 7:837-848, 2021. 6", "[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 5", "[11] Reinhard Heckel and Paul Hand. Deep decoder: Concise image representations from untrained non-convolutional networks. International Conference on Learning Representations, 2019. 3", "[12] Tao Huang, Songjiang Li, Xu Jia, Huchuan Lu, and Jianzhuang Liu. Neighbor2neighbor: Self-supervised denoising from single noisy images. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14776-14785, 2021. 1, 2, 3, 5", "[13] Sandip M. Kasar and Sachin D. Ruikar. Image demosaicking by nonlocal adaptive thresholding. In 2013 International Conference on Signal Processing, Image Processing Pattern Recognition, pages 34-38, 2013. 5" ], "bbox": [ 114, 114, 483, 911 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[14] Chaewon Kim, Jaeho Lee, and Jinwoo Shin. Zero-shot blind image denoising via implicit neural representations, 2022. 2", "[15] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2void - learning denoising from single noisy images. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2124-2132, 2019. 1, 2, 5", "[16] Samuli Laine, Tero Karras, Jaakko Lehtinen, and Timo Aila. High-quality self-supervised deep image denoising. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 5", "[17] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2Noise: Learning image restoration without clean data. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2965-2974. PMLR, 2018. 1, 2, 3, 5", "[18] Jason Lequyer, Reuben Philip, Amit Sharma, Wen-Hsin Hsu, and Laurence Pelletier. A fast blind zero-shot denoiser. Nature Machine Intelligence, oct 2022. 2, 6", "[19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10012-10022, 2021. 2", "[20] Markku Makitalo and Alessandro Foi. Optimal inversion of the anscombe transformation in low-countoisson image denoising. IEEE Transactions on Image Processing, 20(1):99-109, 2011. 1, 2, 7", "[21] Youssef Mansour, Kang Lin, and Reinhard Heckel. Image-to-image mlp-mixer for image reconstruction. CoRR, abs/2202.02018, 2022. 2", "[22] Xiaojiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using very deep convolutional encoder-decoder networks with symmetric skip connections. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. 5", "[23] Nick Moran, Dan Schmidt, Yu Zhong, and Patrick Coady. Noisier2noise: Learning to denoise from unpaired noisy data. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12061-12069, 2020. 2, 5, 7", "[24] Yuhui Quan, Mingqin Chen, Tongyao Pang, and Hui Ji. Self2self with dropout: Learning self-supervised denoising from single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 3, 5, 6", "[25] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi, editors," ], "bbox": [ 516, 92, 883, 911 ], "page_idx": 8 }, { "type": "page_number", "text": "14026", "bbox": [ 480, 950, 519, 963 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015, pages 234-241, Cham, 2015. Springer International Publishing. 3, 4", "[26] Shakarim Soltanayev and Se Young Chun. Training deep learning based denoisers without ground truth data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 2", "[27] Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxim: Multi-axis mlp for image processing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5769-5780, June 2022. 2", "[28] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 3, 5", "[29] Jun Xu, Hui Li, Zhetong Liang, David Zhang, and Lei Zhang. Real-world noisy image denoising: A new benchmark, 2018. 6", "[30] Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. Cycleisp: Real image restoration via improved data synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 5", "[31] Jure Zbontar, Florian Knoll, Anuroop Sriram, Tullie Murrell, Zhengnan Huang, Matthew J. Muckley, Aaron Defazio, Ruben Stern, Patricia Johnson, Mary Bruno, Marc Parente, Krzysztof J. Geras, Joe Katsnelson, Hersh Chandarana, Zizhao Zhang, Michal Drozdzal, Adriana Romero, Michael Rabbat, Pascal Vincent, Nafissa Yakubova, James Pinkerton, Duo Wang, Erich Owens, C. Lawrence Zitnick, Michael P. Recht, Daniel K. Sodickson, and Yvonne W. Lui. fastMRI: An open dataset and benchmarks for accelerated MRI. 2018. 6", "[32] K. Zhang, W. Zuo, Y. Chen, D. Meng, and L. Zhang. Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 2, 5", "[33] Yide Zhang, Yinhao Zhu, Evan Nichols, Qingfei Wang, Siyuan Zhang, Cody Smith, and Scott Howard. Aoisson-gaussian denoising dataset with real fluorescence microscopy images. In CVPR, 2019. 6", "[34] Magaiya Zhussip, Shakarim Soltanayev, and Se Young Chun. Extending stein's unbiased risk estimator to train deep denoisers with correlated pairs of noisy images. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2, 5" ], "bbox": [ 114, 92, 482, 835 ], "page_idx": 9 }, { "type": "page_number", "text": "14027", "bbox": [ 480, 950, 517, 962 ], "page_idx": 9 }]12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991[ [ { "type": "header", "bbox": [ 0.107, 0.003, 0.182, 0.043 ], "angle": 0, "content": "CVF" }, { "type": "header", "bbox": [ 0.237, 0.001, 0.812, 0.047 ], "angle": 0, "content": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore." }, { "type": "title", "bbox": [ 0.156, 0.131, 0.842, 0.153 ], "angle": 0, "content": "Zero-Shot Noise2Noise: Efficient Image Denoising without any Data" }, { "type": "text", "bbox": [ 0.206, 0.182, 0.792, 0.234 ], "angle": 0, "content": "Youssef Mansour and Reinhard Heckel \nTechnical University of Munich and Munich Center for Machine Learning \nMunich, Germany" }, { "type": "text", "bbox": [ 0.318, 0.238, 0.674, 0.251 ], "angle": 0, "content": "y.mansour@tum.de, reinhard.heckel@tum.de" }, { "type": "title", "bbox": [ 0.26, 0.287, 0.337, 0.303 ], "angle": 0, "content": "Abstract" }, { "type": "text", "bbox": [ 0.112, 0.32, 0.486, 0.562 ], "angle": 0, "content": "Recently, self-supervised neural networks have shown excellent image denoising performance. However, current dataset free methods are either computationally expensive, require a noise model, or have inadequate image quality. In this work we show that a simple 2-layer network, without any training data or knowledge of the noise distribution, can enable high-quality image denoising at low computational cost. Our approach is motivated by Noise2Noise and Neighbor2Neighbor and works well for denoising pixel-wise independent noise. Our experiments on artificial, real-world camera, and microscope noise show that our method termed ZS-N2N (Zero Shot Noise2Noise) often outperforms existing dataset-free methods at a reduced cost, making it suitable for use cases with scarce data availability and limited compute." }, { "type": "title", "bbox": [ 0.114, 0.595, 0.245, 0.611 ], "angle": 0, "content": "1. Introduction" }, { "type": "text", "bbox": [ 0.112, 0.622, 0.484, 0.698 ], "angle": 0, "content": "Image denoising is the process of removing distortions from images, to enhance them visually and to reconstruct fine details. The latter is especially important for medical images, where fine details are necessary for an accurate diagnosis." }, { "type": "text", "bbox": [ 0.112, 0.7, 0.483, 0.85 ], "angle": 0, "content": "Current state-of-the-art image denoising techniques rely on large data sets of clean-noisy image pairs and often consist of a neural network trained to map the noisy to the clean image. The drawbacks of dataset-based methods are that data collection, even without ground truths, is expensive and time-consuming, and second, a network trained on dataset suffers from a performance drop if the test images come from a different distribution of images. These drawbacks motivate research in dataset-free methods." }, { "type": "text", "bbox": [ 0.112, 0.852, 0.484, 0.913 ], "angle": 0, "content": "All current zero-shot models are either suitable only for specific noise distributions and need previous knowledge of the noise level [7, 20], require a lot of compute (time, memory, GPU) to denoise an image [24], have" }, { "type": "text", "bbox": [ 0.512, 0.288, 0.885, 0.483 ], "angle": 0, "content": "poor denoising quality [28], or do not generalise to different noise distributions or levels [15, 24]. We propose a method that builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers and aims to circumvent these issues to reach a good trade-off between denoising quality and computational resources. We make only minimal assumptions on the noise statistics (pixel-wise independence), and do not require training data. Our method does not require an explicit noise model, and is therefore suitable for various noise types and can be employed when the noise distribution or level are unknown. The only assumption we make about the noise is that it is unstructured and has zero mean." }, { "type": "text", "bbox": [ 0.512, 0.485, 0.884, 0.649 ], "angle": 0, "content": "In a nutshell, we convolve the noisy test image with two fixed filters, which yields two downsampled images. We next train a lightweight network with regularization to map one downsampled image to the other. Our strategy builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers, however we take those methods one step further by enabling denoising without any training data. Even with an extremely small network and without any training data, our method achieves good denoising quality and often even outperforms large networks trained on datasets." }, { "type": "text", "bbox": [ 0.534, 0.651, 0.835, 0.665 ], "angle": 0, "content": "The key attributes of our work are as follows:" }, { "type": "text", "bbox": [ 0.533, 0.676, 0.885, 0.844 ], "angle": 0, "content": "- Compute. Dataset free neural network based algorithms [24, 28] require solving an optimization problem involving millions of parameters to denoise an image. The huge parameter count requires large memory storage, advanced GPUs, and long denoising times. In this work we show that our method, that utilizes a simple 2 layer network, with only \\(20\\mathrm{k}\\) parameters, can often outperform networks with millions of parameters while reducing the computational cost significantly and being easily executable on a CPU." }, { "type": "text", "bbox": [ 0.533, 0.852, 0.887, 0.913 ], "angle": 0, "content": "- Generalisation. Existing zero-shot methods often to do not generalise well. For example, BM3D [7], a classical denoising algorithm does not generalize well to non-Gaussian noise, and blind spot net" }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.52, 0.964 ], "angle": 0, "content": "14018" } ], [ { "type": "image", "bbox": [ 0.118, 0.092, 0.501, 0.201 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.112, 0.228, 0.484, 0.352 ], "angle": 0, "content": "Figure 1. Left and middle plots: PSNR scores for Gaussian and Poisson denoising for different noise levels. Note BM3D's poor performance on Poisson compared to Gaussian noise. Right plot: Time required in seconds to denoise one \\(256 \\times 256\\) colour image on CPU and GPU, tested on Poisson noise with \\(\\lambda = 50\\). Except for BM3D, all methods have shorter times on GPU. Only S2S in some cases outperforms our method, however it is about 100 times slower. S2S* denotes the ensemble free version of S2S." }, { "type": "text", "bbox": [ 0.145, 0.382, 0.484, 0.473 ], "angle": 0, "content": "works [15] [24] (discussed later in detail) fail to denoise well in the regime of low noise level. Extensive experiments on different noise distributions and noise levels show that our proposed approach can generalise better to different conditions better than existing methods." }, { "type": "text", "bbox": [ 0.112, 0.49, 0.484, 0.673 ], "angle": 0, "content": "In summary, our proposed method is dataset and noise model-free, and achieves a better trade-off between generalization, denoising quality, and computational resources compared to existing zero-shot methods, as displayed in Figure 1. We compare to the standard zero shot baselines, including BM3D, and the recent neural network-based algorithms DIP [28] and S2S [24]. Only BM3D is faster than our method but achieves poor results on non-Gaussian noise. Only S2S sometimes outperforms our method, but is orders of magnitude slower, often fails on low noise levels [14], and requires assembling to achieve acceptable performance." }, { "type": "title", "bbox": [ 0.114, 0.688, 0.254, 0.705 ], "angle": 0, "content": "2. Related Work" }, { "type": "text", "bbox": [ 0.112, 0.715, 0.483, 0.79 ], "angle": 0, "content": "Supervised methods achieve state-of-the-art performance by training a network end-to-end to map a noisy image to a clean one. Networks that work well are CNNs [3, 32], vision transformers [19], or MLP based architectures [21, 27]." }, { "type": "text", "bbox": [ 0.112, 0.792, 0.483, 0.912 ], "angle": 0, "content": "Noise2Noise [17] yields excellent performance from training on two noisy images of the same static scene, without any ground truth images. Given that the noise has zero mean, training a network to map one noisy image to another noisy image of the same scene performs as well as mapping to the ground truth. While having access to a pair of noisy images of the same scene is in practice hard to achieve, the Noise2Noise method" }, { "type": "text", "bbox": [ 0.513, 0.092, 0.883, 0.122 ], "angle": 0, "content": "has motivated further research in self-supervised methods [12] that require only single noisy images." }, { "type": "text", "bbox": [ 0.513, 0.139, 0.885, 0.335 ], "angle": 0, "content": "Self-supervised methods are trained on datasets consisting of only noisy images. Noise2Void [15] and Noise2Self [2] are two blind spot prediction approaches for image denoising. Given a set of noisy images \\(\\{\\mathbf{y}^i\\}_{1}^n\\), The idea is to minimize the loss \\(\\frac{1}{n}\\sum_{i=1}^{n}\\mathcal{L}(f_{\\theta}(M^i(\\mathbf{y}^i)),\\mathbf{y}^i)\\), where \\(\\mathcal{L}\\) is a loss function, \\(f_{\\theta}\\) is a network, and \\(M^i\\) is an operator that masks some pixels, hence the name blind spot. Assuming that the neighbouring pixels of a clean image are highly correlated, and that the noise pixels are independent, a network trained to reconstruct a masked pixel, can only predict the signal value from the neighbouring visible pixels, but not the noise." }, { "type": "text", "bbox": [ 0.513, 0.336, 0.884, 0.44 ], "angle": 0, "content": "Recently, several works [4, 26, 34] attempted to use Stein's unbiased risk estimator for Gaussian denoising. Such methods work well only for Gaussian noise and require the noise level to be known in advance. A more general framework is Noisier2Noise [23] which works for any noise distribution, but the distribution must be known in advance." }, { "type": "text", "bbox": [ 0.512, 0.442, 0.884, 0.563 ], "angle": 0, "content": "The newly proposed Neighbour2Neighbour [12] builds on the Noise2Noise [17] method, where the assumptions are that the noise has zero mean and is pixel-wise independent. Neighbour2Neighbour extends Noise2Noise by enabling training without noisy image pairs. It does so by sub-sampling single noisy images to create pairs of noisy images, where Noise2Noise can be applied." }, { "type": "text", "bbox": [ 0.513, 0.58, 0.884, 0.88 ], "angle": 0, "content": "Zero-Shot/ Dataset free Methods. Most similar to our work is Noise2Fast [18], which also builds on Noise2Noise and Neighbour2Neighbour to achieve dataset-free denoising. However, the method is only evaluated on grayscale images, uses a relatively large network, and requires an early stopping criterion. Our work improves on Noise2Fast by easily denoising grayscale or RGB images, and designing a consistency loss that alleviates the need to early stop. Moreover, we use a much smaller network which saves compute. Specifically, our network is twelve times smaller and a forward pass through it is seven times faster. To the best of our knowledge, our work is the first to utilize a small 2-layer network and achieve competitive quality for image restoration. We show that on grayscale images, our method despite achieving similar scores to Noise2Fast [18], produces better quality images. This is likely due to Noise2Fast dropping pixel values when downsampling, whereas our method always keeps all information retained." }, { "type": "text", "bbox": [ 0.513, 0.882, 0.884, 0.913 ], "angle": 0, "content": "Besides this work, classical non-learning-based methods, such as BM3D [7] and Anscombe [20], work" }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.519, 0.963 ], "angle": 0, "content": "14019" } ], [ { "type": "text", "bbox": [ 0.112, 0.092, 0.482, 0.121 ], "angle": 0, "content": "well for Gaussian and Poisson noise, respectively, and require the noise level as an input." }, { "type": "text", "bbox": [ 0.112, 0.123, 0.482, 0.257 ], "angle": 0, "content": "DIP (Deep Image Prior) [28] and its variants such as the Deep Decoder [11] build on the fact that CNNs have an inductive bias towards natural images, in that they can fit natural images much faster than noise. Therefore, a network trained, with early stopping, to map a random input to the noisy image will denoise the image. The denoising performance of DIP is often poor, and is dependent on the number of training epochs, which is hard to determine in advance." }, { "type": "text", "bbox": [ 0.112, 0.26, 0.482, 0.441 ], "angle": 0, "content": "Self2Self [24] utilizes the idea of the blind spot networks (reconstructing masked pixels) on a single image, but with dropout ensembling. However, this method is not computationally efficient, in that it requires long durations to denoise an image. According to the authors, it takes 1.2 hours to denoise one \\(256 \\times 256\\) image on a GPU. Compared to other blind spot networks, Self2Self achieves significantly better denoising scores, since it relies on ensembling, i.e., averaging the output of several networks. However, ensemble learning over smoothens the image, causing a loss of some details, despite the improvement in PSNR scores [8]." }, { "type": "text", "bbox": [ 0.112, 0.442, 0.482, 0.548 ], "angle": 0, "content": "Similar to almost all supervised and self-supervised methods, both Self2Self and DIP use a UNet [25] or a variant of it as the backbone network in their architectures. A UNet typically has millions of parameters, making it unsuitable for compute limited applications. Our work departs from this scheme, by designing a shallow and simple network with few parameters." }, { "type": "title", "bbox": [ 0.114, 0.565, 0.204, 0.58 ], "angle": 0, "content": "3. Method" }, { "type": "text", "bbox": [ 0.112, 0.592, 0.482, 0.712 ], "angle": 0, "content": "Our method builds on the Noise2Noise [17], for training a network on pairs of noisy images, and the Neighbour2Neighbour (NB2NB) [12], which generates such pairs from a single noisy image. Our main idea is to generate a pair of noisy images from a single noisy image and train a small network only on this pair. We start with a brief summary of Noise2Noise and then introduce our method." }, { "type": "title", "bbox": [ 0.113, 0.726, 0.482, 0.757 ], "angle": 0, "content": "3.1. Background: Noise2Noise and Neighbour2Neighbour" }, { "type": "text", "bbox": [ 0.112, 0.766, 0.482, 0.856 ], "angle": 0, "content": "Supervised denoising methods are typically neural networks \\( f_{\\theta} \\) that map a noisy image \\( \\mathbf{y} \\) to an estimate \\( f_{\\theta}(\\mathbf{y}) \\) of the clean image \\( \\mathbf{x} \\). Supervised denoising methods are typically trained on pairs of clean images \\( \\mathbf{x} \\) and noisy measurements \\( \\mathbf{y} = \\mathbf{x} + \\mathbf{e} \\), where \\( \\mathbf{e} \\) is noise. We refer to supervised denoising as Noise2Clean (N2C)." }, { "type": "text", "bbox": [ 0.112, 0.857, 0.482, 0.913 ], "angle": 0, "content": "Neural networks can also be trained on different noisy observations of the same clean image. Noise2Noise (N2N) [17] assumes access to a set of pairs of noisy images \\(\\mathbf{y}_1 = \\mathbf{x} + \\mathbf{e}_1, \\mathbf{y}_2 = \\mathbf{x} + \\mathbf{e}_2\\)" }, { "type": "text", "bbox": [ 0.513, 0.092, 0.883, 0.194 ], "angle": 0, "content": "where \\(\\mathbf{e}_1, \\mathbf{e}_2\\) are independent noise vectors. A network \\(f_{\\theta}\\) is then trained to minimize the empirical risk \\(\\frac{1}{n} \\sum_{i=1}^{n} \\left\\| f_{\\theta}(\\mathbf{y}_1^i) - \\mathbf{y}_2^i \\right\\|_2^2\\). This makes sense, since in expectation over such noisy instances, and assuming zero mean noise, training a network in a supervised manner to map a noisy image to another noisy image is equivalent to mapping it to a clean image i.e.," }, { "type": "equation", "bbox": [ 0.514, 0.203, 0.887, 0.239 ], "angle": 0, "content": "\\[\n\\underset {\\theta} {\\arg \\min } \\mathbb {E} \\left[ \\| f _ {\\theta} (\\mathbf {y} _ {1}) - \\mathbf {x} \\| _ {2} ^ {2} \\right] = \\underset {\\theta} {\\arg \\min } \\mathbb {E} \\left[ \\| f _ {\\theta} (\\mathbf {y} _ {1}) - \\mathbf {y} _ {2} \\| _ {2} ^ {2} \\right]. \\tag {1}\n\\]" }, { "type": "text", "bbox": [ 0.533, 0.24, 0.859, 0.255 ], "angle": 0, "content": "The proof is given in the supplementary material." }, { "type": "text", "bbox": [ 0.513, 0.256, 0.883, 0.345 ], "angle": 0, "content": "In theory N2N training reaches the same performance as N2C training if the dataset is infinitely large. In practice, since the training set is limited in size, N2N falls slightly short of N2C. For example, N2N training with a UNet on 50k images gives a performance drop of only about \\(0.02\\mathrm{dB}\\) compared to N2C with a UNet." }, { "type": "text", "bbox": [ 0.513, 0.347, 0.883, 0.422 ], "angle": 0, "content": "Despite the great performance of N2N, its usability is often limited, since it is difficult to obtain a pair of noisy images of the same static scene. For instance, the object being captured might be non-static, or the lighting conditions change rapidly." }, { "type": "text", "bbox": [ 0.513, 0.423, 0.883, 0.499 ], "angle": 0, "content": "Neighbour2Neighbour (NB2NB) [12] extends N2N and allows training only on a set of single noisy images, by sub-sampling a noisy image to create a pair of noisy images. Similar to N2N, NB2NB exhibits strong denoising performance when trained on many images." }, { "type": "title", "bbox": [ 0.514, 0.51, 0.725, 0.525 ], "angle": 0, "content": "3.2. Zero-Shot Noise2Noise" }, { "type": "text", "bbox": [ 0.513, 0.534, 0.883, 0.608 ], "angle": 0, "content": "Our work extends Noise2Noise [17] and Neighbour2Neighbour [12] by enabling training on only one single noisy image. To avoid overfitting to the single image, we use a very shallow network and an explicit regularization term." }, { "type": "text", "bbox": [ 0.513, 0.61, 0.883, 0.804 ], "angle": 0, "content": "Almost all self- or un-supervised denoising methods, including ours, rely on the premise that a clean natural image has different attributes than random noise. As shown in [12], a noisy image can be decomposed into a pair of downsampled images. Based on the premise that nearby pixels of a clean image are highly correlated and often have similar values, while the noise pixels are unstructured and independent, the downsampled pair of noisy images has similar signal but independent noise. This pair can therefore serve as an approximation of two noisy observations of the same scene, where one observation is used as the input, and the other as the target, as in N2N." }, { "type": "text", "bbox": [ 0.512, 0.807, 0.883, 0.912 ], "angle": 0, "content": "Our approach is to first decompose the image into a pair of downsampled images and second train a lightweight network with regularization to map one downsampled image to the other. Applying the so-trained network to a noisy image yields the denoised image. We first explain how we generate the downsampled images, and then how we fit the network." }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.519, 0.963 ], "angle": 0, "content": "14020" } ], [ { "type": "text", "bbox": [ 0.112, 0.092, 0.482, 0.242 ], "angle": 0, "content": "Image Pair Down sampler The pair down sampler takes as input an image \\(\\mathbf{y}\\) of size \\(H\\times W\\times C\\) and generates two images \\(D_{1}(\\mathbf{y})\\) and \\(D_{2}(\\mathbf{y})\\), each of size \\(H / 2\\times W / 2\\times C\\). The down sampler generates those images by dividing the image into non-overlapping patches of size \\(2\\times 2\\), taking an average of the diagonal pixels of each patch and assigning it to the first low-resolution image, then the average of the anti-diagonal pixels and assigning it to the second low-resolution image. See Figure 2 for an illustration of the pair down sampler." }, { "type": "text", "bbox": [ 0.112, 0.243, 0.484, 0.422 ], "angle": 0, "content": "The downsample is implemented with convolutions as follows. The first low-resolution image is obtained by applying a 2D convolution with stride two and fixed kernel \\(\\mathbf{k}_1 = \\begin{bmatrix} 0 & 0.5 \\\\ 0.5 & 0 \\end{bmatrix}\\) to the original image as \\(D_1(\\mathbf{y}) = \\mathbf{y} * \\mathbf{k}_1\\), and the second image is obtained by applying a 2D convolution with stride two and fixed kernel \\(\\mathbf{k}_2 = \\begin{bmatrix} 0.5 & 0 \\\\ 0 & 0.5 \\end{bmatrix}\\) to the original image as \\(D_2(\\mathbf{y}) = \\mathbf{y} * \\mathbf{k}_2\\). The convolutions are implemented channel-wise and therefore the downsampling scheme is applicable to any arbitrary number of input channels." }, { "type": "image", "bbox": [ 0.125, 0.433, 0.47, 0.569 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.112, 0.578, 0.483, 0.648 ], "angle": 0, "content": "Figure 2. The Image Pair Downsampler decomposes an image into two images of half the spatial resolution by averaging diagonal pixels of \\(2 \\times 2\\) non-overlapping patches. In the above example the input is a \\(4 \\times 4\\) image, and the output is two \\(2 \\times 2\\) images." }, { "type": "text", "bbox": [ 0.112, 0.681, 0.483, 0.757 ], "angle": 0, "content": "Zero-shot-image denoising method. Given a test image \\(\\mathbf{y}\\) to denoise, our method is conceptually similar to first fitting a small image-to-image neural network \\(f_{\\theta}\\) to map the first downsampled image \\(D_{1}(\\mathbf{y})\\) to the second one, \\(D_{2}(\\mathbf{y})\\) by minimizing the loss" }, { "type": "equation", "bbox": [ 0.185, 0.765, 0.482, 0.784 ], "angle": 0, "content": "\\[\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2}. \\tag {2}\n\\]" }, { "type": "text", "bbox": [ 0.112, 0.792, 0.483, 0.837 ], "angle": 0, "content": "Once we fitted the network, we can apply it to the original noisy observation to estimate the denoised image as \\(\\hat{\\mathbf{x}} = f_{\\hat{\\theta}}(\\mathbf{y})\\)" }, { "type": "text", "bbox": [ 0.112, 0.838, 0.484, 0.913 ], "angle": 0, "content": "However, our experiments showed that residual learning, a symmetric loss, and an additional consistency-enforcing term are critical for good performance. We next explain the elements of our loss function. In residual learning, the network is optimized to fit" }, { "type": "text", "bbox": [ 0.513, 0.092, 0.871, 0.107 ], "angle": 0, "content": "the noise instead of the image. The loss then becomes" }, { "type": "equation", "bbox": [ 0.554, 0.117, 0.883, 0.136 ], "angle": 0, "content": "\\[\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| D _ {1} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2}. \\tag {3}\n\\]" }, { "type": "text", "bbox": [ 0.512, 0.147, 0.884, 0.208 ], "angle": 0, "content": "Following [6], where a symmetric loss was used in the context of self-supervised pretraining of a siamese network, we additionally adopt a symmetric loss, which yields the residual loss:" }, { "type": "equation", "bbox": [ 0.528, 0.218, 0.882, 0.286 ], "angle": 0, "content": "\\[\n\\begin{array}{l} \\mathcal {L} _ {\\text {r e s .}} (\\boldsymbol {\\theta}) = \\frac {1}{2} \\left(\\left\\| D _ {1} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {1} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y}) \\right\\| _ {2} ^ {2} + \\right. \\\\ \\left. \\left\\| D _ {2} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {2} (\\mathbf {y})\\right) - D _ {1} (\\mathbf {y}) \\right\\| _ {2} ^ {2}\\right). \\tag {4} \\\\ \\end{array}\n\\]" }, { "type": "text", "bbox": [ 0.513, 0.288, 0.884, 0.348 ], "angle": 0, "content": "In addition, we enforce consistency by ensuring that first denoising the image \\(\\mathbf{y}\\) and then downsampling it, is similar to what we get when first downsampling \\(\\mathbf{y}\\) and then denoising it, i.e., we consider a loss of the form:" }, { "type": "equation", "bbox": [ 0.525, 0.358, 0.883, 0.378 ], "angle": 0, "content": "\\[\n\\mathcal {L} (\\boldsymbol {\\theta}) = \\left\\| D (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} (D (\\mathbf {y})) - D (\\mathbf {y} - f _ {\\boldsymbol {\\theta}} (\\mathbf {y})) \\right\\| _ {2} ^ {2}. \\tag {5}\n\\]" }, { "type": "text", "bbox": [ 0.513, 0.387, 0.884, 0.414 ], "angle": 0, "content": "Again adopting a symmetric loss, the consistency loss becomes:" }, { "type": "equation", "bbox": [ 0.515, 0.422, 0.89, 0.484 ], "angle": 0, "content": "\\[\n\\begin{array}{l} \\mathcal {L} _ {\\mathrm {c o n s .}} (\\pmb {\\theta}) = \\frac {1}{2} \\Big (\\| D _ {1} (\\mathbf {y}) - f _ {\\pmb {\\theta}} (D _ {1} (\\mathbf {y})) - D _ {1} (\\mathbf {y} - f _ {\\pmb {\\theta}} (\\mathbf {y})) \\| _ {2} ^ {2} \\\\ \\left. + \\left\\| D _ {2} (\\mathbf {y}) - f _ {\\boldsymbol {\\theta}} \\left(D _ {2} (\\mathbf {y})\\right) - D _ {2} (\\mathbf {y} - f _ {\\boldsymbol {\\theta}} (\\mathbf {y})) \\right\\| _ {2} ^ {2}\\right). \\tag {6} \\\\ \\end{array}\n\\]" }, { "type": "text", "bbox": [ 0.512, 0.485, 0.884, 0.574 ], "angle": 0, "content": "Note that for the residual loss, the network only has the downsampled images as input. Only in the consistency loss, the network gets to see the image in full spatial resolution. Including the consistency loss enables better denoising performance and helps to avoid overfitting. It can therefore be seen as a regularizing term." }, { "type": "text", "bbox": [ 0.513, 0.576, 0.884, 0.728 ], "angle": 0, "content": "In summary, we minimize the loss \\(\\mathcal{L}(\\pmb{\\theta}) = \\mathcal{L}_{\\mathrm{res.}}(\\pmb{\\theta}) + \\mathcal{L}_{\\mathrm{cons.}}(\\pmb{\\theta})\\) using gradient descent, which yields the network parameters \\(\\hat{\\pmb{\\theta}}\\). With those, we estimate the denoised image as \\(\\hat{\\mathbf{x}} = \\mathbf{y} - f_{\\hat{\\pmb{\\theta}}}(\\mathbf{y})\\). Note that only the network parameters \\(\\pmb{\\theta}\\) are optimized during the gradient descent updates, since the downsampling operations \\(D_{1}\\) and \\(D_{2}\\) are fixed. Convergence typically requires 1k to 2k iterations, which thanks to using a lightweight network takes less than half a minute on a GPU and around one minute on a CPU." }, { "type": "text", "bbox": [ 0.512, 0.746, 0.885, 0.913 ], "angle": 0, "content": "Network Many supervised and self-supervised methods use a relatively large network, often a UNet [25]. Instead, we use a very simple two-layer image-to-image network. It consists of only two convolutional operators with kernel size \\(3 \\times 3\\) followed by one operator of \\(1 \\times 1\\) convolutions. This network has about \\(20k\\) parameters, which is small compared to typical denoising networks. An exact comparison of the network sizes can be found in section 4.4. There are no normalization or pooling layers. The low parameter count and simple structure enables fast denoising even when deployed on a CPU." }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.518, 0.963 ], "angle": 0, "content": "14021" } ], [ { "type": "text", "bbox": [ 0.113, 0.092, 0.482, 0.138 ], "angle": 0, "content": "In the ablation studies we show that using a UNet instead of a lightweight network leads to overfitting and much worse denoising performance." }, { "type": "title", "bbox": [ 0.114, 0.154, 0.245, 0.17 ], "angle": 0, "content": "4. Experiments" }, { "type": "text", "bbox": [ 0.112, 0.179, 0.482, 0.299 ], "angle": 0, "content": "We compare our denoising algorithm (ZS-N2N) to several baselines. The baselines include dataset based methods, as well as other zero-shot methods. For the dataset based methods, we include both supervised (with clean images) and self-supervised (only noisy images) methods. We test all methods on artificial and real-world noise. We provide ablation studies in the supplementary material." }, { "type": "text", "bbox": [ 0.112, 0.301, 0.482, 0.405 ], "angle": 0, "content": "The results highlight the dependency of dataset based methods on the dataset they are trained on and suggest that given a small training set, they are outperformed by dataset free ones. Furthermore, the experiments show that methods based on noise models achieve good performance for the specific noise model, but do not generalise to other distributions." }, { "type": "text", "bbox": [ 0.112, 0.408, 0.482, 0.573 ], "angle": 0, "content": "Concerning the dataset and noise model free methods, our proposed method is either on par or better than other baselines on Gaussian, Poisson, and real world camera and microscope noise. Our method only falls short of Self2Self [24] on high noise levels, however, it requires only \\(\\frac{1}{200}\\) of the denoising time of Self2Self and \\(2\\%\\) of its memory. Moreover, Self2self's performance on low noise levels is insufficient. Therefore, considering denoising quality, generalisition, and computational resources, our method achieves a better trade-off compared to existing methods as shown in Figure 1." }, { "type": "title", "bbox": [ 0.114, 0.585, 0.221, 0.6 ], "angle": 0, "content": "4.1. Baselines" }, { "type": "text", "bbox": [ 0.112, 0.609, 0.482, 0.729 ], "angle": 0, "content": "We compare to Noise2Clean (N2C) with a UNet, which is the current state-of-the-art denoising algorithm. There exists several other networks that perform on par with the UNet, such as DnCNN [32] and RED30 [22], but the UNet is orders of magnitude faster, since it is not very deep, and has a multi-resolution structure. The UNet is therefore the standard choice in all recent denoising papers [12, 15, 17, 23]." }, { "type": "text", "bbox": [ 0.112, 0.731, 0.482, 0.896 ], "angle": 0, "content": "For the self-supervised methods, we compare to Neighbour2Neighbour (NB2NB) [12] and Noise2Void (N2V) [15]. We exclude the methods that require an explicit noise model, such as [4, 16, 23, 34], since these methods work well on synthetic denoising tasks for the given noise distribution, but fail to generalize to unknown noise distributions or real-world noise [12, 30]. This is due to the fact that the synthetic noise is insufficient for simulating real camera noise, which is signal-dependent and substantially altered by the camera's imaging system." }, { "type": "text", "bbox": [ 0.132, 0.898, 0.482, 0.912 ], "angle": 0, "content": "Regarding the zero-shot methods, which are most" }, { "type": "text", "bbox": [ 0.512, 0.092, 0.884, 0.168 ], "angle": 0, "content": "similar to ours, we compare to the deep learning based algorithms: DIP [28] and Self2Self (S2S) [24], and also to the classical algorithm: BM3D [7]. Note that apart of our method (and BM3D), all baselines use a U-Net or a variation of it as a denoising backbone." }, { "type": "text", "bbox": [ 0.512, 0.168, 0.884, 0.304 ], "angle": 0, "content": "The performance of DIP is very sensitive to the number of gradient descent steps. We used the ground truth images to determine the best early stopping iteration. The DIP results can therefore be seen as an over optimistic performance of the method. For a fair comparison, we report the results of the best performing model for the other baselines. A comparison of the sensitivity of the methods to the number of optimization steps can be found in the supplementary material." }, { "type": "text", "bbox": [ 0.512, 0.305, 0.882, 0.41 ], "angle": 0, "content": "The original implementation of S2S uses an ensemble of multiple networks, i.e., averaging the outputs of several networks. All other baselines do not utilize ensembling or averaging. For a fair comparison, we additionally report the results of S2S without any ensembling, which we denote by S2S*. S2S denotes the original implementation with an ensemble of 50 networks." }, { "type": "title", "bbox": [ 0.513, 0.422, 0.669, 0.437 ], "angle": 0, "content": "4.2. Synthetic Noise" }, { "type": "text", "bbox": [ 0.512, 0.447, 0.884, 0.521 ], "angle": 0, "content": "The dataset based methods (N2C, NB2NB, N2V) are trained on 500 colour images from ImageNet [10]. All methods are tested on the Kodak24 \\( {}^{1} \\) and McMaster18 [13] datasets. All training and test images are centercropped to patches of size \\( {256} \\times {256} \\) ." }, { "type": "text", "bbox": [ 0.512, 0.522, 0.884, 0.613 ], "angle": 0, "content": "We examine Gaussian and Poisson noise with noise levels \\(\\sigma\\) and \\(\\lambda\\) respectively. We consider the fixed noise levels \\(\\sigma, \\lambda = 10, 25, 50\\). The \\(\\sigma\\) values for Gaussian noise correspond to pixel values in the interval [0,255], while the \\(\\lambda\\) values for Poisson noise correspond to values in the interval [0,1]." }, { "type": "text", "bbox": [ 0.512, 0.614, 0.882, 0.749 ], "angle": 0, "content": "For the dataset based methods, we also consider blind denoising during training with the range of noise levels \\(\\sigma, \\lambda \\in [10, 50]\\). During training, a \\(\\sigma, \\lambda\\) value is sampled uniformly from the given range for each image in each training epoch, unlike the fixed noise levels, where all training images are contaminated with the same noise level. Blind denoising is what is used in practice, since an exact noise level is typically not given, but rather a range of noise levels." }, { "type": "text", "bbox": [ 0.512, 0.751, 0.884, 0.886 ], "angle": 0, "content": "In table 1, we present the denoising performance of the different methods. For the dataset based methods, \\(\\sigma, \\lambda\\) is known, denotes that the network trained on that exact noise level is used for testing, while unknown denotes the blind denoising, where the network trained on the range of noise levels [10,50] is used for testing. BM3D requires as input the value of the noise level. For Gaussian denoising the known \\(\\sigma\\) value was used, while for Possion denoising the noise level was estimated us" }, { "type": "page_footnote", "bbox": [ 0.531, 0.899, 0.768, 0.912 ], "angle": 0, "content": "http://r0k.us/graphics/kodak/" }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.519, 0.963 ], "angle": 0, "content": "14022" } ], [ { "type": "text", "bbox": [ 0.111, 0.091, 0.482, 0.135 ], "angle": 0, "content": "ing the method in [5]. Note that ZS-N2N, DIP, and S2S do not utilize any prior information on the noise distribution or level." }, { "type": "text", "bbox": [ 0.111, 0.138, 0.482, 0.318 ], "angle": 0, "content": "As seen from the results, the dataset based methods often fall slightly short of the dataset free methods. This is due to the fact that they were only trained on 500 images, whereas they reach good performance when trained on larger datasets. In the supplementary material, we show that when N2C is trained on 4000 images, it outperforms all other baselines and its performance can keep improving with more training data. Another drawback of dataset based methods is that they are sensitive to the data they are trained on. They experience a performance drop when trained on a range of noise levels as opposed to a specific noise level as the test set." }, { "type": "text", "bbox": [ 0.111, 0.319, 0.482, 0.408 ], "angle": 0, "content": "Regarding the zero-shot methods, DIP exhibited worse scores in all simulations. BM3D is tailored to work well for Gaussian denoising, where the exact noise variance is known and required as input. However, its performance dropped for Poisson noise, where the noise level was estimated." }, { "type": "text", "bbox": [ 0.111, 0.41, 0.482, 0.575 ], "angle": 0, "content": "ZS-N2N and S2S do not rely on a specific noise model and therefore work consistently well for both Gaussian and Poisson noise. However, S2S suffers from at least two drawbacks. The first is it heavily relies on ensembling to achieve good scores as seen by comparing the results of S2S with \\(\\mathrm{S2S^{*}}\\). Despite improving the scores, ensembling oversmoothens the image causing a loss in some visual features [8]. Note that all other baselines are ensemble free. The second drawback is that it performs worse than all other baselines on low noise levels, as seen in the Gaussian noise with \\(\\sigma = 10\\)." }, { "type": "text", "bbox": [ 0.111, 0.576, 0.482, 0.666 ], "angle": 0, "content": "Considering that DIP performs poorly, that BM3D only works well for Gaussian noise, and that S2S's performance without ensembling and on low noise levels is unsatisfactory, our method, ZS-N2N is the only dataset free denoising algorithm that performs well on different noise distributions and levels." }, { "type": "title", "bbox": [ 0.113, 0.677, 0.285, 0.691 ], "angle": 0, "content": "4.3. Real-World Noise" }, { "type": "text", "bbox": [ 0.111, 0.701, 0.482, 0.806 ], "angle": 0, "content": "Camera noise: Following [24], we evaluate on the PolyU dataset [29] which consists of high-resolution images from various scenes captured by 5 cameras from the 3 leading brands of cameras: Canon, Nikon, and Sony. We also consider the SIDD [1], which consists of images captured by several smartphone cameras under different lighting conditions and noise patterns." }, { "type": "text", "bbox": [ 0.111, 0.807, 0.482, 0.911 ], "angle": 0, "content": "Since the computational cost for running S2S is high, we randomly choose 20 images from both datasets to test on. The SIDD validation set has images of size \\(256 \\times 256\\). For consistency, we center-crop the PolyU images to patches of size \\(256 \\times 256\\). The results are shown in table 2. All methods perform similarly except for BM3D and the ensemble free version of S2S, which" }, { "type": "text", "bbox": [ 0.514, 0.092, 0.75, 0.107 ], "angle": 0, "content": "exhibit a notable performance drop." }, { "type": "table", "bbox": [ 0.515, 0.12, 0.895, 0.17 ], "angle": 0, "content": "<table><tr><td>Dataset</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>S2S*</td><td>BM3D</td></tr><tr><td>PolyU</td><td>36.92</td><td>37.07</td><td>37.01</td><td>33.12</td><td>36.11</td></tr><tr><td>SIDD</td><td>34.07</td><td>34.31</td><td>33.98</td><td>30.77</td><td>28.19</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.516, 0.181, 0.878, 0.194 ], "angle": 0, "content": "Table 2. Denoising PSNR in dB on real world camera noise." }, { "type": "text", "bbox": [ 0.512, 0.217, 0.882, 0.367 ], "angle": 0, "content": "Microscope noise: We additionally evaluate on the Fluorescence Microscopy dataset [33], which contains real grayscale fluorescence images obtained with commercial confocal, two-photon, and wide-field microscopes and representative biological samples such as cells, zebrafish, and mouse brain tissues. We pick random images from the test set to test on. We also compare to Noise2Fast (N2F) [18], for which code for denoising grayscale is available. The results are depicted in table 3." }, { "type": "table", "bbox": [ 0.522, 0.379, 0.875, 0.503 ], "angle": 0, "content": "<table><tr><td>Image</td><td>Photon BPAE</td><td>Photon Mice</td><td>Confocal BPAE</td><td>Average</td></tr><tr><td>ZS-N2N</td><td>30.73</td><td>31.42</td><td>35.85</td><td>32.67</td></tr><tr><td>DIP</td><td>29.22</td><td>30.01</td><td>35.51</td><td>31.58</td></tr><tr><td>S2S</td><td>30.90</td><td>31.51</td><td>31.01</td><td>31.14</td></tr><tr><td>S2S*</td><td>29.49</td><td>29.99</td><td>29.54</td><td>29.67</td></tr><tr><td>BM3D</td><td>27.19</td><td>29.48</td><td>33.23</td><td>29.97</td></tr><tr><td>N2F</td><td>30.93</td><td>31.07</td><td>36.01</td><td>32.67</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.537, 0.515, 0.859, 0.529 ], "angle": 0, "content": "Table 3. PSNR in dB on real world microscope noise." }, { "type": "text", "bbox": [ 0.512, 0.548, 0.882, 0.773 ], "angle": 0, "content": "Our method and Noise2Fast achieve similar scores and slightly outperform the other baselines. Despite the similarity in scores, when inspecting the denoised images visually, we see differences: Our method produces visually sharper images and preserves slightly more details, while the Noise2Fast images are relatively smooth. This is most noticeable on images with fine details, such as MRI images, see Figure 3 for a knee image from the fastMRI dataset [31]. The blurriness in the Noise2Fast images is likely due to the downsampling scheme used, which drops some pixel values, and the ensembling performed to obtain the final image estimate, which oversmoothens the image [8]. Our method, on the other hand, preserves all pixel values during downsampling, and is ensemble free." }, { "type": "title", "bbox": [ 0.513, 0.784, 0.745, 0.8 ], "angle": 0, "content": "4.4. Computational Efficiency" }, { "type": "text", "bbox": [ 0.512, 0.807, 0.882, 0.911 ], "angle": 0, "content": "In this section we focus on the computational efficiency. We consider the denoising time and the memory requirements represented by the number of network parameters. Since in some applications a GPU is not available [9], we additionally consider the denoising time on a CPU. The GPU tested is Quadro RTX 6000 and the CPU is Intel Core i9-9940X 3.30GHz." }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.518, 0.963 ], "angle": 0, "content": "14023" } ], [ { "type": "table", "bbox": [ 0.139, 0.089, 0.86, 0.476 ], "angle": 0, "content": "<table><tr><td>Noise</td><td colspan=\"2\">Method</td><td colspan=\"3\">Kodak24</td><td colspan=\"3\">McMaster18</td></tr><tr><td rowspan=\"12\">Gaussian</td><td rowspan=\"7\">dataset-based</td><td rowspan=\"3\">N2C</td><td>σ known?</td><td>σ = 10</td><td>σ = 25</td><td>σ = 50</td><td>σ = 10</td><td>σ = 25</td></tr><tr><td>yes</td><td>33.45</td><td>28.27</td><td>25.47</td><td>33.03</td><td>28.46</td></tr><tr><td>no</td><td>32.16</td><td>28.18</td><td>24.45</td><td>31.97</td><td>28.26</td></tr><tr><td rowspan=\"2\">NB2NB</td><td>yes</td><td>33.01</td><td>27.90</td><td>25.02</td><td>32.63</td><td>28.01</td></tr><tr><td>no</td><td>31.79</td><td>27.80</td><td>24.15</td><td>31.19</td><td>27.85</td></tr><tr><td rowspan=\"2\">N2V</td><td>yes</td><td>30.19</td><td>26.21</td><td>24.07</td><td>30.95</td><td>26.50</td></tr><tr><td>no</td><td>28.95</td><td>26.03</td><td>23.19</td><td>29.64</td><td>26.31</td></tr><tr><td rowspan=\"5\">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>33.69</td><td>29.07</td><td>24.81</td><td>34.21</td><td>28.80</td></tr><tr><td>DIP</td><td>-</td><td>32.28</td><td>27.38</td><td>23.95</td><td>33.07</td><td>27.61</td></tr><tr><td>S2S</td><td>-</td><td>29.54</td><td>28.39</td><td>26.22</td><td>30.78</td><td>28.71</td></tr><tr><td>S2S*</td><td>-</td><td>26.93</td><td>26.29</td><td>24.83</td><td>27.64</td><td>26.48</td></tr><tr><td>BM3D</td><td>yes</td><td>33.74</td><td>29.02</td><td>25.51</td><td>34.51</td><td>29.21</td></tr><tr><td rowspan=\"12\">Poisson</td><td rowspan=\"7\">dataset-based</td><td rowspan=\"3\">N2C</td><td>λ known?</td><td>λ = 50</td><td>λ = 25</td><td>λ = 10</td><td>λ = 50</td><td>λ = 25</td></tr><tr><td>yes</td><td>29.42</td><td>27.49</td><td>26.25</td><td>29.89</td><td>28.20</td></tr><tr><td>no</td><td>28.92</td><td>27.14</td><td>23.13</td><td>28.62</td><td>27.51</td></tr><tr><td rowspan=\"2\">NB2NB</td><td>yes</td><td>29.19</td><td>27.01</td><td>25.71</td><td>29.41</td><td>27.79</td></tr><tr><td>no</td><td>28.53</td><td>26.88</td><td>23.60</td><td>28.03</td><td>27.66</td></tr><tr><td rowspan=\"2\">N2V</td><td>yes</td><td>27.73</td><td>25.55</td><td>23.77</td><td>27.86</td><td>25.65</td></tr><tr><td>no</td><td>27.04</td><td>25.28</td><td>21.93</td><td>26.34</td><td>25.52</td></tr><tr><td rowspan=\"5\">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>29.45</td><td>27.52</td><td>24.92</td><td>30.36</td><td>28.41</td></tr><tr><td>DIP</td><td>-</td><td>27.51</td><td>25.84</td><td>23.81</td><td>28.73</td><td>27.37</td></tr><tr><td>S2S</td><td>-</td><td>28.89</td><td>28.31</td><td>27.29</td><td>30.11</td><td>29.40</td></tr><tr><td>S2S*</td><td>-</td><td>26.75</td><td>26.40</td><td>25.63</td><td>27.55</td><td>27.24</td></tr><tr><td>BM3D</td><td>no</td><td>28.36</td><td>26.58</td><td>24.20</td><td>27.33</td><td>24.77</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.117, 0.488, 0.882, 0.543 ], "angle": 0, "content": "Table 1. PSNR scores in dB for Gaussian and Poisson denoising. Best result is in bold, second best result is underlined. The dataset based methods are italicized. Note DIP's mediocre scores and BM3D's performance drop between Gaussian and Poisson noise. S2S has significantly lower scores in low noise as seen with \\(\\sigma = 10\\) and its ensemble free version S2S* has inadequate performance. Denoised samples can be found in the supplementary material." }, { "type": "text", "bbox": [ 0.117, 0.57, 0.482, 0.72 ], "angle": 0, "content": "In table 4 we display the time required to denoise one colour image of size \\(256 \\times 256\\) at inference, as well as the total number of trainable parameters of a model. The dataset based methods are trained for long durations, but after training, the network parameters are fixed, and inference is almost instantaneous, since it is just a forward pass through the model. The time taken for denoising is therefore negligible compared to the zero-shot methods, whose parameters are optimized for each test image separately." }, { "type": "text", "bbox": [ 0.117, 0.727, 0.482, 0.816 ], "angle": 0, "content": "In the original implementation of S2S, the authors report a denoising time of 1.2 hours for a \\(256 \\times 256\\) colour image on GPU. However, we noticed that only half of the gradient update iterations are needed for convergence. We therefore report only half of their GPU time." }, { "type": "text", "bbox": [ 0.117, 0.822, 0.482, 0.911 ], "angle": 0, "content": "Concerning the denoising time, dataset based methods are the fastest, since a forward pass through a fixed network requires only milli seconds. Regarding the deep learning based zero-shot methods, ZS-N2N is significantly more computationally efficient. Specifically, on CPU it is 200 times and 35 times faster than S2S and" }, { "type": "text", "bbox": [ 0.517, 0.57, 0.882, 0.615 ], "angle": 0, "content": "DIP respectively and has only \\(2\\%\\) and \\(1\\%\\) of their memory requirements. Only the classical BM3D is computationally more efficient than ZS-N2N." }, { "type": "title", "bbox": [ 0.517, 0.63, 0.63, 0.644 ], "angle": 0, "content": "4.5. Discussion" }, { "type": "text", "bbox": [ 0.517, 0.655, 0.882, 0.759 ], "angle": 0, "content": "Dataset based methods typically achieve state-of-the-art results but our experiments manifested two of their shortcomings: They don't perform well when trained on small datasets, and the performance drops when the test data differs from the training data, as seen by varying the noise levels. This highlights the importance of dataset free denoising algorithms." }, { "type": "text", "bbox": [ 0.517, 0.762, 0.882, 0.911 ], "angle": 0, "content": "Methods that rely on an explicit model of the noise distribution such as Noisier2Noise [23] and Anscombe [20] or those tailored to work well for specific distributions such as BM3D, do not generalize well to other distributions. Their performance therefore degrades when the noise distribution is unknown, or the noise level must be estimated. This has been manifested by BM3D's competitive performance on Gaussian noise, but its failure to keep up with the other baselines on Poisson and real world noise. These findings highlight the advantage" }, { "type": "page_number", "bbox": [ 0.482, 0.953, 0.518, 0.963 ], "angle": 0, "content": "14024" } ], [ { "type": "image", "bbox": [ 0.115, 0.088, 0.271, 0.221 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.318, 0.088, 0.477, 0.222 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.524, 0.088, 0.682, 0.222 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.728, 0.089, 0.886, 0.222 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.115, 0.233, 0.273, 0.352 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.319, 0.233, 0.474, 0.352 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.525, 0.233, 0.68, 0.352 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.729, 0.233, 0.884, 0.352 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.111, 0.378, 0.884, 0.42 ], "angle": 0, "content": "Figure 3. Visual comparison between our method and Noise2Fast for denoising Gaussian noise on a knee MRI. Both methods achieve similar PSNR, but notice how the center and left edge are blurry and oversmooth in Noise2Fast. Our method produces a sharper image with less loss of details." }, { "type": "table", "bbox": [ 0.211, 0.434, 0.789, 0.5 ], "angle": 0, "content": "<table><tr><td>Method</td><td>N2C</td><td>NB2NB</td><td>N2V</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>BM3D</td></tr><tr><td>GPU time</td><td>-</td><td>-</td><td>-</td><td>20 sec.</td><td>3 min.</td><td>35 min.</td><td>4 sec.</td></tr><tr><td>CPU time</td><td>-</td><td>-</td><td>-</td><td>80 sec.</td><td>45 min.</td><td>4.5 hr.</td><td>4 sec.</td></tr><tr><td>Network size</td><td>3.3M</td><td>1.3M</td><td>2.2M</td><td>22k</td><td>2.2M</td><td>1M</td><td>-</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.111, 0.509, 0.884, 0.553 ], "angle": 0, "content": "Table 4. Computational Resources. First and Second Rows: Time taken to denoise one image on average on GPU and CPU. The time for the dataset based methods is discarded, since it is negligible. BM3D does not benefit from the GPU, as there is no optimization involved. Bottom Row: Number of parameters of a network." }, { "type": "text", "bbox": [ 0.111, 0.579, 0.321, 0.594 ], "angle": 0, "content": "of noise model free techniques." }, { "type": "text", "bbox": [ 0.111, 0.595, 0.483, 0.715 ], "angle": 0, "content": "Regarding the three dataset free and noise model free methods considered, DIP was often lagging behind S2S and ZS-N2N, despite using the ground truths to find the best possible early stopping iteration. S2S's performance without ensembling is inadequate, and even with ensembling, it does not work well on low noise levels. Moreover, it requires more than 0.5 hours to denoise an image on a GPU and 4.5 hours on a CPU." }, { "type": "text", "bbox": [ 0.111, 0.717, 0.483, 0.822 ], "angle": 0, "content": "Except for ZS-N2N, all deep learning based baselines have millions of parameters, making them computationally expensive. Considering ZS-N2N's ability to generalize to various denoising conditions with relatively fast denoising time, very few parameters, and CPU compatibility, we can conclude that it offers a good trade-off between denoising quality and computational resources." }, { "type": "title", "bbox": [ 0.113, 0.84, 0.233, 0.856 ], "angle": 0, "content": "5. Conclusion" }, { "type": "text", "bbox": [ 0.111, 0.867, 0.483, 0.913 ], "angle": 0, "content": "We proposed a novel zero-shot image denoising algorithm that does not require any training examples or knowledge of the noise model or level. Our work uses a" }, { "type": "text", "bbox": [ 0.512, 0.579, 0.885, 0.744 ], "angle": 0, "content": "simple 2-layer network, and allows denoising in a relatively short period of time even when executed without a GPU. The method can perform well on simulated noise as well as real-world camera and microscope noise, and achieves a good trade-off between generalization, denoising quality and computational resources compared to existing dataset free methods. A demo of our implementation including our code and hyperparameters can be found in the following colab notebook: https://colab.research.google.com/drive/1i82nyizTdszyHkaHBuKPbWnTzao8HF9b" }, { "type": "title", "bbox": [ 0.514, 0.764, 0.682, 0.781 ], "angle": 0, "content": "Acknowledgements" }, { "type": "text", "bbox": [ 0.512, 0.792, 0.884, 0.911 ], "angle": 0, "content": "The authors are supported by the Institute of Advanced Studies at the Technical University of Munich, the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 456465471, 464123524, the German Federal Ministry of Education and Research, and the Bavarian State Ministry for Science and the Arts. The authors of this work take full responsibility for its content." }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.518, 0.963 ], "angle": 0, "content": "14025" } ], [ { "type": "title", "bbox": [ 0.115, 0.09, 0.21, 0.106 ], "angle": 0, "content": "References" }, { "type": "ref_text", "bbox": [ 0.123, 0.115, 0.484, 0.17 ], "angle": 0, "content": "[1] Abdelrahman Abdelhamed, Stephen Lin, and Michael S. Brown. A high-quality denoising dataset for smartphone cameras. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 6" }, { "type": "ref_text", "bbox": [ 0.123, 0.172, 0.484, 0.254 ], "angle": 0, "content": "[2] Joshua Batson and Loic Royer. Noise2Self: Blind denoising by self-supervision. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 524-533. PMLR, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.123, 0.256, 0.482, 0.323 ], "angle": 0, "content": "[3] Tim Brooks, Ben Mildenhall, Tianfan Xue, Jiawen Chen, Dillon Sharlet, and Jonathan T. Barron. Unprocessing Images for Learned Raw Denoising. In IEEE Conference on Computer Vision and Pattern Recognition, pages 11036-11045, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.123, 0.326, 0.482, 0.379 ], "angle": 0, "content": "[4] Sungmin Cha and Taesup Moon. Fully convolutional pixel adaptive image denoiser. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019. 2, 5" }, { "type": "ref_text", "bbox": [ 0.123, 0.381, 0.482, 0.436 ], "angle": 0, "content": "[5] Guangyong Chen, Fengyuan Zhu, and Pheng Ann Heng. An efficient statistical method for image noise level estimation. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 477-485, 2015. 6" }, { "type": "ref_text", "bbox": [ 0.123, 0.438, 0.482, 0.492 ], "angle": 0, "content": "[6] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15750-15758, 2021. 4" }, { "type": "ref_text", "bbox": [ 0.123, 0.494, 0.482, 0.548 ], "angle": 0, "content": "[7] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian. Image Denoising by Sparse 3-D Transform-Domain Collaborative Filtering. IEEE Transactions on Image Processing, 16(8):2080-2095, 2007. 1, 2, 5" }, { "type": "ref_text", "bbox": [ 0.123, 0.55, 0.482, 0.604 ], "angle": 0, "content": "[8] Mohammad Zalbagi Darestani and Reinhard Heckel. Accelerated mri with un-trained neural networks. IEEE Transactions on Computational Imaging, 7:724-733, 2021. 3, 6" }, { "type": "ref_text", "bbox": [ 0.123, 0.606, 0.482, 0.673 ], "angle": 0, "content": "[9] Mauricio Delbracio, Ignacio Garcia-Dorado, SungJoon Choi, Damien Kelly, and Peyman Milanfar. Polyblur: Removing mild blur by polynomial reblurring. IEEE Transactions on Computational Imaging, 7:837-848, 2021. 6" }, { "type": "ref_text", "bbox": [ 0.115, 0.676, 0.482, 0.731 ], "angle": 0, "content": "[10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 5" }, { "type": "ref_text", "bbox": [ 0.115, 0.732, 0.482, 0.785 ], "angle": 0, "content": "[11] Reinhard Heckel and Paul Hand. Deep decoder: Concise image representations from untrained non-convolutional networks. International Conference on Learning Representations, 2019. 3" }, { "type": "ref_text", "bbox": [ 0.115, 0.788, 0.482, 0.856 ], "angle": 0, "content": "[12] Tao Huang, Songjiang Li, Xu Jia, Huchuan Lu, and Jianzhuang Liu. Neighbor2neighbor: Self-supervised denoising from single noisy images. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14776-14785, 2021. 1, 2, 3, 5" }, { "type": "ref_text", "bbox": [ 0.115, 0.858, 0.482, 0.912 ], "angle": 0, "content": "[13] Sandip M. Kasar and Sachin D. Ruikar. Image demosaicking by nonlocal adaptive thresholding. In 2013 International Conference on Signal Processing, Image Processing Pattern Recognition, pages 34-38, 2013. 5" }, { "type": "list", "bbox": [ 0.115, 0.115, 0.484, 0.912 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.517, 0.093, 0.884, 0.133 ], "angle": 0, "content": "[14] Chaewon Kim, Jaeho Lee, and Jinwoo Shin. Zero-shot blind image denoising via implicit neural representations, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.518, 0.136, 0.884, 0.204 ], "angle": 0, "content": "[15] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2void - learning denoising from single noisy images. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2124-2132, 2019. 1, 2, 5" }, { "type": "ref_text", "bbox": [ 0.518, 0.207, 0.884, 0.289 ], "angle": 0, "content": "[16] Samuli Laine, Tero Karras, Jaakko Lehtinen, and Timo Aila. High-quality self-supervised deep image denoising. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 5" }, { "type": "ref_text", "bbox": [ 0.518, 0.291, 0.884, 0.401 ], "angle": 0, "content": "[17] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2Noise: Learning image restoration without clean data. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2965-2974. PMLR, 2018. 1, 2, 3, 5" }, { "type": "ref_text", "bbox": [ 0.517, 0.404, 0.883, 0.445 ], "angle": 0, "content": "[18] Jason Lequyer, Reuben Philip, Amit Sharma, Wen-Hsin Hsu, and Laurence Pelletier. A fast blind zero-shot denoiser. Nature Machine Intelligence, oct 2022. 2, 6" }, { "type": "ref_text", "bbox": [ 0.518, 0.447, 0.884, 0.529 ], "angle": 0, "content": "[19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10012-10022, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.517, 0.531, 0.883, 0.585 ], "angle": 0, "content": "[20] Markku Makitalo and Alessandro Foi. Optimal inversion of the anscombe transformation in low-countoisson image denoising. IEEE Transactions on Image Processing, 20(1):99-109, 2011. 1, 2, 7" }, { "type": "ref_text", "bbox": [ 0.517, 0.588, 0.883, 0.629 ], "angle": 0, "content": "[21] Youssef Mansour, Kang Lin, and Reinhard Heckel. Image-to-image mlp-mixer for image reconstruction. CoRR, abs/2202.02018, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.518, 0.631, 0.884, 0.713 ], "angle": 0, "content": "[22] Xiaojiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using very deep convolutional encoder-decoder networks with symmetric skip connections. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. 5" }, { "type": "ref_text", "bbox": [ 0.517, 0.716, 0.883, 0.783 ], "angle": 0, "content": "[23] Nick Moran, Dan Schmidt, Yu Zhong, and Patrick Coady. Noisier2noise: Learning to denoise from unpaired noisy data. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12061-12069, 2020. 2, 5, 7" }, { "type": "ref_text", "bbox": [ 0.517, 0.786, 0.883, 0.855 ], "angle": 0, "content": "[24] Yuhui Quan, Mingqin Chen, Tongyao Pang, and Hui Ji. Self2self with dropout: Learning self-supervised denoising from single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 3, 5, 6" }, { "type": "ref_text", "bbox": [ 0.517, 0.857, 0.883, 0.912 ], "angle": 0, "content": "[25] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi, editors," }, { "type": "list", "bbox": [ 0.517, 0.093, 0.884, 0.912 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.52, 0.964 ], "angle": 0, "content": "14026" } ], [ { "type": "ref_text", "bbox": [ 0.145, 0.093, 0.482, 0.135 ], "angle": 0, "content": "Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015, pages 234-241, Cham, 2015. Springer International Publishing. 3, 4" }, { "type": "ref_text", "bbox": [ 0.117, 0.136, 0.483, 0.218 ], "angle": 0, "content": "[26] Shakarim Soltanayev and Se Young Chun. Training deep learning based denoisers without ground truth data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 2" }, { "type": "ref_text", "bbox": [ 0.116, 0.22, 0.483, 0.301 ], "angle": 0, "content": "[27] Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxim: Multi-axis mlp for image processing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5769-5780, June 2022. 2" }, { "type": "ref_text", "bbox": [ 0.116, 0.305, 0.483, 0.358 ], "angle": 0, "content": "[28] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 3, 5" }, { "type": "ref_text", "bbox": [ 0.116, 0.361, 0.482, 0.401 ], "angle": 0, "content": "[29] Jun Xu, Hui Li, Zhetong Liang, David Zhang, and Lei Zhang. Real-world noisy image denoising: A new benchmark, 2018. 6" }, { "type": "ref_text", "bbox": [ 0.116, 0.404, 0.482, 0.485 ], "angle": 0, "content": "[30] Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. Cycleisp: Real image restoration via improved data synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 5" }, { "type": "ref_text", "bbox": [ 0.116, 0.488, 0.482, 0.625 ], "angle": 0, "content": "[31] Jure Zbontar, Florian Knoll, Anuroop Sriram, Tullie Murrell, Zhengnan Huang, Matthew J. Muckley, Aaron Defazio, Ruben Stern, Patricia Johnson, Mary Bruno, Marc Parente, Krzysztof J. Geras, Joe Katsnelson, Hersh Chandarana, Zizhao Zhang, Michal Drozdzal, Adriana Romero, Michael Rabbat, Pascal Vincent, Nafissa Yakubova, James Pinkerton, Duo Wang, Erich Owens, C. Lawrence Zitnick, Michael P. Recht, Daniel K. Sodickson, and Yvonne W. Lui. fastMRI: An open dataset and benchmarks for accelerated MRI. 2018. 6" }, { "type": "ref_text", "bbox": [ 0.116, 0.628, 0.482, 0.682 ], "angle": 0, "content": "[32] K. Zhang, W. Zuo, Y. Chen, D. Meng, and L. Zhang. Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 2, 5" }, { "type": "ref_text", "bbox": [ 0.116, 0.684, 0.482, 0.739 ], "angle": 0, "content": "[33] Yide Zhang, Yinhao Zhu, Evan Nichols, Qingfei Wang, Siyuan Zhang, Cody Smith, and Scott Howard. Aoisson-gaussian denoising dataset with real fluorescence microscopy images. In CVPR, 2019. 6" }, { "type": "ref_text", "bbox": [ 0.116, 0.741, 0.482, 0.837 ], "angle": 0, "content": "[34] Magaiya Zhussip, Shakarim Soltanayev, and Se Young Chun. Extending stein's unbiased risk estimator to train deep denoisers with correlated pairs of noisy images. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2, 5" }, { "type": "list", "bbox": [ 0.116, 0.093, 0.483, 0.837 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.952, 0.519, 0.963 ], "angle": 0, "content": "14027" } ]]123version https://git-lfs.github.com/spec/v1oid sha256:22714e447fe6b118c10e07bbb0dfec478148ce738e49d0303dfdf5d0d21075f5size 757803123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304# Zero-Shot Noise2Noise: Efficient Image Denoising without any Data
Youssef Mansour and Reinhard Heckel Technical University of Munich and Munich Center for Machine Learning Munich, Germany
y.mansour@tum.de, reinhard.heckel@tum.de
# Abstract
Recently, self-supervised neural networks have shown excellent image denoising performance. However, current dataset free methods are either computationally expensive, require a noise model, or have inadequate image quality. In this work we show that a simple 2-layer network, without any training data or knowledge of the noise distribution, can enable high-quality image denoising at low computational cost. Our approach is motivated by Noise2Noise and Neighbor2Neighbor and works well for denoising pixel-wise independent noise. Our experiments on artificial, real-world camera, and microscope noise show that our method termed ZS-N2N (Zero Shot Noise2Noise) often outperforms existing dataset-free methods at a reduced cost, making it suitable for use cases with scarce data availability and limited compute.
# 1. Introduction
Image denoising is the process of removing distortions from images, to enhance them visually and to reconstruct fine details. The latter is especially important for medical images, where fine details are necessary for an accurate diagnosis.
Current state-of-the-art image denoising techniques rely on large data sets of clean-noisy image pairs and often consist of a neural network trained to map the noisy to the clean image. The drawbacks of dataset-based methods are that data collection, even without ground truths, is expensive and time-consuming, and second, a network trained on dataset suffers from a performance drop if the test images come from a different distribution of images. These drawbacks motivate research in dataset-free methods.
All current zero-shot models are either suitable only for specific noise distributions and need previous knowledge of the noise level [7, 20], require a lot of compute (time, memory, GPU) to denoise an image [24], have
poor denoising quality [28], or do not generalise to different noise distributions or levels [15, 24]. We propose a method that builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers and aims to circumvent these issues to reach a good trade-off between denoising quality and computational resources. We make only minimal assumptions on the noise statistics (pixel-wise independence), and do not require training data. Our method does not require an explicit noise model, and is therefore suitable for various noise types and can be employed when the noise distribution or level are unknown. The only assumption we make about the noise is that it is unstructured and has zero mean.
In a nutshell, we convolve the noisy test image with two fixed filters, which yields two downsampled images. We next train a lightweight network with regularization to map one downsampled image to the other. Our strategy builds on the recent Noise2Noise [17] and Neighbour2Neighbour [12] papers, however we take those methods one step further by enabling denoising without any training data. Even with an extremely small network and without any training data, our method achieves good denoising quality and often even outperforms large networks trained on datasets.
The key attributes of our work are as follows:
- Compute. Dataset free neural network based algorithms [24, 28] require solving an optimization problem involving millions of parameters to denoise an image. The huge parameter count requires large memory storage, advanced GPUs, and long denoising times. In this work we show that our method, that utilizes a simple 2 layer network, with only $20\mathrm{k}$ parameters, can often outperform networks with millions of parameters while reducing the computational cost significantly and being easily executable on a CPU.
- Generalisation. Existing zero-shot methods often to do not generalise well. For example, BM3D [7], a classical denoising algorithm does not generalize well to non-Gaussian noise, and blind spot net
 Figure 1. Left and middle plots: PSNR scores for Gaussian and Poisson denoising for different noise levels. Note BM3D's poor performance on Poisson compared to Gaussian noise. Right plot: Time required in seconds to denoise one $256 \times 256$ colour image on CPU and GPU, tested on Poisson noise with $\lambda = 50$ . Except for BM3D, all methods have shorter times on GPU. Only S2S in some cases outperforms our method, however it is about 100 times slower. S2S* denotes the ensemble free version of S2S.
works [15] [24] (discussed later in detail) fail to denoise well in the regime of low noise level. Extensive experiments on different noise distributions and noise levels show that our proposed approach can generalise better to different conditions better than existing methods.
In summary, our proposed method is dataset and noise model-free, and achieves a better trade-off between generalization, denoising quality, and computational resources compared to existing zero-shot methods, as displayed in Figure 1. We compare to the standard zero shot baselines, including BM3D, and the recent neural network-based algorithms DIP [28] and S2S [24]. Only BM3D is faster than our method but achieves poor results on non-Gaussian noise. Only S2S sometimes outperforms our method, but is orders of magnitude slower, often fails on low noise levels [14], and requires assembling to achieve acceptable performance.
# 2. Related Work
Supervised methods achieve state-of-the-art performance by training a network end-to-end to map a noisy image to a clean one. Networks that work well are CNNs [3, 32], vision transformers [19], or MLP based architectures [21, 27].
Noise2Noise [17] yields excellent performance from training on two noisy images of the same static scene, without any ground truth images. Given that the noise has zero mean, training a network to map one noisy image to another noisy image of the same scene performs as well as mapping to the ground truth. While having access to a pair of noisy images of the same scene is in practice hard to achieve, the Noise2Noise method
has motivated further research in self-supervised methods [12] that require only single noisy images.
Self-supervised methods are trained on datasets consisting of only noisy images. Noise2Void [15] and Noise2Self [2] are two blind spot prediction approaches for image denoising. Given a set of noisy images $\{\mathbf{y}^i\}_{1}^n$ , The idea is to minimize the loss $\frac{1}{n}\sum_{i=1}^{n}\mathcal{L}(f_{\theta}(M^i(\mathbf{y}^i)),\mathbf{y}^i)$ , where $\mathcal{L}$ is a loss function, $f_{\theta}$ is a network, and $M^i$ is an operator that masks some pixels, hence the name blind spot. Assuming that the neighbouring pixels of a clean image are highly correlated, and that the noise pixels are independent, a network trained to reconstruct a masked pixel, can only predict the signal value from the neighbouring visible pixels, but not the noise.
Recently, several works [4, 26, 34] attempted to use Stein's unbiased risk estimator for Gaussian denoising. Such methods work well only for Gaussian noise and require the noise level to be known in advance. A more general framework is Noisier2Noise [23] which works for any noise distribution, but the distribution must be known in advance.
The newly proposed Neighbour2Neighbour [12] builds on the Noise2Noise [17] method, where the assumptions are that the noise has zero mean and is pixel-wise independent. Neighbour2Neighbour extends Noise2Noise by enabling training without noisy image pairs. It does so by sub-sampling single noisy images to create pairs of noisy images, where Noise2Noise can be applied.
Zero-Shot/ Dataset free Methods. Most similar to our work is Noise2Fast [18], which also builds on Noise2Noise and Neighbour2Neighbour to achieve dataset-free denoising. However, the method is only evaluated on grayscale images, uses a relatively large network, and requires an early stopping criterion. Our work improves on Noise2Fast by easily denoising grayscale or RGB images, and designing a consistency loss that alleviates the need to early stop. Moreover, we use a much smaller network which saves compute. Specifically, our network is twelve times smaller and a forward pass through it is seven times faster. To the best of our knowledge, our work is the first to utilize a small 2-layer network and achieve competitive quality for image restoration. We show that on grayscale images, our method despite achieving similar scores to Noise2Fast [18], produces better quality images. This is likely due to Noise2Fast dropping pixel values when downsampling, whereas our method always keeps all information retained.
Besides this work, classical non-learning-based methods, such as BM3D [7] and Anscombe [20], work
well for Gaussian and Poisson noise, respectively, and require the noise level as an input.
DIP (Deep Image Prior) [28] and its variants such as the Deep Decoder [11] build on the fact that CNNs have an inductive bias towards natural images, in that they can fit natural images much faster than noise. Therefore, a network trained, with early stopping, to map a random input to the noisy image will denoise the image. The denoising performance of DIP is often poor, and is dependent on the number of training epochs, which is hard to determine in advance.
Self2Self [24] utilizes the idea of the blind spot networks (reconstructing masked pixels) on a single image, but with dropout ensembling. However, this method is not computationally efficient, in that it requires long durations to denoise an image. According to the authors, it takes 1.2 hours to denoise one $256 \times 256$ image on a GPU. Compared to other blind spot networks, Self2Self achieves significantly better denoising scores, since it relies on ensembling, i.e., averaging the output of several networks. However, ensemble learning over smoothens the image, causing a loss of some details, despite the improvement in PSNR scores [8].
Similar to almost all supervised and self-supervised methods, both Self2Self and DIP use a UNet [25] or a variant of it as the backbone network in their architectures. A UNet typically has millions of parameters, making it unsuitable for compute limited applications. Our work departs from this scheme, by designing a shallow and simple network with few parameters.
# 3. Method
Our method builds on the Noise2Noise [17], for training a network on pairs of noisy images, and the Neighbour2Neighbour (NB2NB) [12], which generates such pairs from a single noisy image. Our main idea is to generate a pair of noisy images from a single noisy image and train a small network only on this pair. We start with a brief summary of Noise2Noise and then introduce our method.
# 3.1. Background: Noise2Noise and Neighbour2Neighbour
Supervised denoising methods are typically neural networks $f_{\theta}$ that map a noisy image $\mathbf{y}$ to an estimate $f_{\theta}(\mathbf{y})$ of the clean image $\mathbf{x}$ . Supervised denoising methods are typically trained on pairs of clean images $\mathbf{x}$ and noisy measurements $\mathbf{y} = \mathbf{x} + \mathbf{e}$ , where $\mathbf{e}$ is noise. We refer to supervised denoising as Noise2Clean (N2C).
Neural networks can also be trained on different noisy observations of the same clean image. Noise2Noise (N2N) [17] assumes access to a set of pairs of noisy images $\mathbf{y}_1 = \mathbf{x} + \mathbf{e}_1, \mathbf{y}_2 = \mathbf{x} + \mathbf{e}_2$
where $\mathbf{e}_1, \mathbf{e}_2$ are independent noise vectors. A network $f_{\theta}$ is then trained to minimize the empirical risk $\frac{1}{n} \sum_{i=1}^{n} \left\| f_{\theta}(\mathbf{y}_1^i) - \mathbf{y}_2^i \right\|_2^2$ . This makes sense, since in expectation over such noisy instances, and assuming zero mean noise, training a network in a supervised manner to map a noisy image to another noisy image is equivalent to mapping it to a clean image i.e.,
$$\underset {\theta} {\arg \min } \mathbb {E} \left[ \| f _ {\theta} (\mathbf {y} _ {1}) - \mathbf {x} \| _ {2} ^ {2} \right] = \underset {\theta} {\arg \min } \mathbb {E} \left[ \| f _ {\theta} (\mathbf {y} _ {1}) - \mathbf {y} _ {2} \| _ {2} ^ {2} \right]. \tag {1}$$
The proof is given in the supplementary material.
In theory N2N training reaches the same performance as N2C training if the dataset is infinitely large. In practice, since the training set is limited in size, N2N falls slightly short of N2C. For example, N2N training with a UNet on 50k images gives a performance drop of only about $0.02\mathrm{dB}$ compared to N2C with a UNet.
Despite the great performance of N2N, its usability is often limited, since it is difficult to obtain a pair of noisy images of the same static scene. For instance, the object being captured might be non-static, or the lighting conditions change rapidly.
Neighbour2Neighbour (NB2NB) [12] extends N2N and allows training only on a set of single noisy images, by sub-sampling a noisy image to create a pair of noisy images. Similar to N2N, NB2NB exhibits strong denoising performance when trained on many images.
# 3.2. Zero-Shot Noise2Noise
Our work extends Noise2Noise [17] and Neighbour2Neighbour [12] by enabling training on only one single noisy image. To avoid overfitting to the single image, we use a very shallow network and an explicit regularization term.
Almost all self- or un-supervised denoising methods, including ours, rely on the premise that a clean natural image has different attributes than random noise. As shown in [12], a noisy image can be decomposed into a pair of downsampled images. Based on the premise that nearby pixels of a clean image are highly correlated and often have similar values, while the noise pixels are unstructured and independent, the downsampled pair of noisy images has similar signal but independent noise. This pair can therefore serve as an approximation of two noisy observations of the same scene, where one observation is used as the input, and the other as the target, as in N2N.
Our approach is to first decompose the image into a pair of downsampled images and second train a lightweight network with regularization to map one downsampled image to the other. Applying the so-trained network to a noisy image yields the denoised image. We first explain how we generate the downsampled images, and then how we fit the network.
Image Pair Down sampler The pair down sampler takes as input an image $\mathbf{y}$ of size $H\times W\times C$ and generates two images $D_{1}(\mathbf{y})$ and $D_{2}(\mathbf{y})$ , each of size $H / 2\times W / 2\times C$ . The down sampler generates those images by dividing the image into non-overlapping patches of size $2\times 2$ , taking an average of the diagonal pixels of each patch and assigning it to the first low-resolution image, then the average of the anti-diagonal pixels and assigning it to the second low-resolution image. See Figure 2 for an illustration of the pair down sampler.
The downsample is implemented with convolutions as follows. The first low-resolution image is obtained by applying a 2D convolution with stride two and fixed kernel $\mathbf{k}_1 = \begin{bmatrix} 0 & 0.5 \\ 0.5 & 0 \end{bmatrix}$ to the original image as $D_1(\mathbf{y}) = \mathbf{y} * \mathbf{k}_1$ , and the second image is obtained by applying a 2D convolution with stride two and fixed kernel $\mathbf{k}_2 = \begin{bmatrix} 0.5 & 0 \\ 0 & 0.5 \end{bmatrix}$ to the original image as $D_2(\mathbf{y}) = \mathbf{y} * \mathbf{k}_2$ . The convolutions are implemented channel-wise and therefore the downsampling scheme is applicable to any arbitrary number of input channels.
 Figure 2. The Image Pair Downsampler decomposes an image into two images of half the spatial resolution by averaging diagonal pixels of $2 \times 2$ non-overlapping patches. In the above example the input is a $4 \times 4$ image, and the output is two $2 \times 2$ images.
Zero-shot-image denoising method. Given a test image $\mathbf{y}$ to denoise, our method is conceptually similar to first fitting a small image-to-image neural network $f_{\theta}$ to map the first downsampled image $D_{1}(\mathbf{y})$ to the second one, $D_{2}(\mathbf{y})$ by minimizing the loss
$$\mathcal {L} (\boldsymbol {\theta}) = \left\| f _ {\boldsymbol {\theta}} \left(D _ {1} (\mathbf {y})\right) - D _ {2} (\mathbf {y}) \right\| _ {2} ^ {2}. \tag {2}$$
Once we fitted the network, we can apply it to the original noisy observation to estimate the denoised image as $\hat{\mathbf{x}} = f_{\hat{\theta}}(\mathbf{y})$
However, our experiments showed that residual learning, a symmetric loss, and an additional consistency-enforcing term are critical for good performance. We next explain the elements of our loss function. In residual learning, the network is optimized to fit
the noise instead of the image. The loss then becomes
$$\mathcal {L} (\boldsymbol {\theta}) = \left\| D _ {1} (\mathbf {y}) - f _ {\boldsymbol {\theta}} \left(D _ {1} (\mathbf {y})\right) - D _ {2} (\mathbf {y}) \right\| _ {2} ^ {2}. \tag {3}$$
Following [6], where a symmetric loss was used in the context of self-supervised pretraining of a siamese network, we additionally adopt a symmetric loss, which yields the residual loss:
$$\begin{array}{l} \mathcal {L} _ {\text {r e s .}} (\boldsymbol {\theta}) = \frac {1}{2} \left(\left\| D _ {1} (\mathbf {y}) - f _ {\boldsymbol {\theta}} \left(D _ {1} (\mathbf {y})\right) - D _ {2} (\mathbf {y}) \right\| _ {2} ^ {2} + \right. \\ \left. \left\| D _ {2} (\mathbf {y}) - f _ {\boldsymbol {\theta}} \left(D _ {2} (\mathbf {y})\right) - D _ {1} (\mathbf {y}) \right\| _ {2} ^ {2}\right). \tag {4} \\ \end{array}$$
In addition, we enforce consistency by ensuring that first denoising the image $\mathbf{y}$ and then downsampling it, is similar to what we get when first downsampling $\mathbf{y}$ and then denoising it, i.e., we consider a loss of the form:
$$\mathcal {L} (\boldsymbol {\theta}) = \left\| D (\mathbf {y}) - f _ {\boldsymbol {\theta}} (D (\mathbf {y})) - D (\mathbf {y} - f _ {\boldsymbol {\theta}} (\mathbf {y})) \right\| _ {2} ^ {2}. \tag {5}$$
Again adopting a symmetric loss, the consistency loss becomes:
$$\begin{array}{l} \mathcal {L} _ {\mathrm {c o n s .}} (\pmb {\theta}) = \frac {1}{2} \Big (\| D _ {1} (\mathbf {y}) - f _ {\pmb {\theta}} (D _ {1} (\mathbf {y})) - D _ {1} (\mathbf {y} - f _ {\pmb {\theta}} (\mathbf {y})) \| _ {2} ^ {2} \\ \left. + \left\| D _ {2} (\mathbf {y}) - f _ {\boldsymbol {\theta}} \left(D _ {2} (\mathbf {y})\right) - D _ {2} (\mathbf {y} - f _ {\boldsymbol {\theta}} (\mathbf {y})) \right\| _ {2} ^ {2}\right). \tag {6} \\ \end{array}$$
Note that for the residual loss, the network only has the downsampled images as input. Only in the consistency loss, the network gets to see the image in full spatial resolution. Including the consistency loss enables better denoising performance and helps to avoid overfitting. It can therefore be seen as a regularizing term.
In summary, we minimize the loss $\mathcal{L}(\pmb{\theta}) = \mathcal{L}_{\mathrm{res.}}(\pmb{\theta}) + \mathcal{L}_{\mathrm{cons.}}(\pmb{\theta})$ using gradient descent, which yields the network parameters $\hat{\pmb{\theta}}$ . With those, we estimate the denoised image as $\hat{\mathbf{x}} = \mathbf{y} - f_{\hat{\pmb{\theta}}}(\mathbf{y})$ . Note that only the network parameters $\pmb{\theta}$ are optimized during the gradient descent updates, since the downsampling operations $D_{1}$ and $D_{2}$ are fixed. Convergence typically requires 1k to 2k iterations, which thanks to using a lightweight network takes less than half a minute on a GPU and around one minute on a CPU.
Network Many supervised and self-supervised methods use a relatively large network, often a UNet [25]. Instead, we use a very simple two-layer image-to-image network. It consists of only two convolutional operators with kernel size $3 \times 3$ followed by one operator of $1 \times 1$ convolutions. This network has about $20k$ parameters, which is small compared to typical denoising networks. An exact comparison of the network sizes can be found in section 4.4. There are no normalization or pooling layers. The low parameter count and simple structure enables fast denoising even when deployed on a CPU.
In the ablation studies we show that using a UNet instead of a lightweight network leads to overfitting and much worse denoising performance.
# 4. Experiments
We compare our denoising algorithm (ZS-N2N) to several baselines. The baselines include dataset based methods, as well as other zero-shot methods. For the dataset based methods, we include both supervised (with clean images) and self-supervised (only noisy images) methods. We test all methods on artificial and real-world noise. We provide ablation studies in the supplementary material.
The results highlight the dependency of dataset based methods on the dataset they are trained on and suggest that given a small training set, they are outperformed by dataset free ones. Furthermore, the experiments show that methods based on noise models achieve good performance for the specific noise model, but do not generalise to other distributions.
Concerning the dataset and noise model free methods, our proposed method is either on par or better than other baselines on Gaussian, Poisson, and real world camera and microscope noise. Our method only falls short of Self2Self [24] on high noise levels, however, it requires only $\frac{1}{200}$ of the denoising time of Self2Self and $2\%$ of its memory. Moreover, Self2self's performance on low noise levels is insufficient. Therefore, considering denoising quality, generalisition, and computational resources, our method achieves a better trade-off compared to existing methods as shown in Figure 1.
# 4.1. Baselines
We compare to Noise2Clean (N2C) with a UNet, which is the current state-of-the-art denoising algorithm. There exists several other networks that perform on par with the UNet, such as DnCNN [32] and RED30 [22], but the UNet is orders of magnitude faster, since it is not very deep, and has a multi-resolution structure. The UNet is therefore the standard choice in all recent denoising papers [12, 15, 17, 23].
For the self-supervised methods, we compare to Neighbour2Neighbour (NB2NB) [12] and Noise2Void (N2V) [15]. We exclude the methods that require an explicit noise model, such as [4, 16, 23, 34], since these methods work well on synthetic denoising tasks for the given noise distribution, but fail to generalize to unknown noise distributions or real-world noise [12, 30]. This is due to the fact that the synthetic noise is insufficient for simulating real camera noise, which is signal-dependent and substantially altered by the camera's imaging system.
Regarding the zero-shot methods, which are most
similar to ours, we compare to the deep learning based algorithms: DIP [28] and Self2Self (S2S) [24], and also to the classical algorithm: BM3D [7]. Note that apart of our method (and BM3D), all baselines use a U-Net or a variation of it as a denoising backbone.
The performance of DIP is very sensitive to the number of gradient descent steps. We used the ground truth images to determine the best early stopping iteration. The DIP results can therefore be seen as an over optimistic performance of the method. For a fair comparison, we report the results of the best performing model for the other baselines. A comparison of the sensitivity of the methods to the number of optimization steps can be found in the supplementary material.
The original implementation of S2S uses an ensemble of multiple networks, i.e., averaging the outputs of several networks. All other baselines do not utilize ensembling or averaging. For a fair comparison, we additionally report the results of S2S without any ensembling, which we denote by S2S*. S2S denotes the original implementation with an ensemble of 50 networks.
# 4.2. Synthetic Noise
The dataset based methods (N2C, NB2NB, N2V) are trained on 500 colour images from ImageNet [10]. All methods are tested on the Kodak24 ${}^{1}$ and McMaster18 [13] datasets. All training and test images are centercropped to patches of size ${256} \times {256}$ .
We examine Gaussian and Poisson noise with noise levels $\sigma$ and $\lambda$ respectively. We consider the fixed noise levels $\sigma, \lambda = 10, 25, 50$ . The $\sigma$ values for Gaussian noise correspond to pixel values in the interval [0,255], while the $\lambda$ values for Poisson noise correspond to values in the interval [0,1].
For the dataset based methods, we also consider blind denoising during training with the range of noise levels $\sigma, \lambda \in [10, 50]$ . During training, a $\sigma, \lambda$ value is sampled uniformly from the given range for each image in each training epoch, unlike the fixed noise levels, where all training images are contaminated with the same noise level. Blind denoising is what is used in practice, since an exact noise level is typically not given, but rather a range of noise levels.
In table 1, we present the denoising performance of the different methods. For the dataset based methods, $\sigma, \lambda$ is known, denotes that the network trained on that exact noise level is used for testing, while unknown denotes the blind denoising, where the network trained on the range of noise levels [10,50] is used for testing. BM3D requires as input the value of the noise level. For Gaussian denoising the known $\sigma$ value was used, while for Possion denoising the noise level was estimated us
ing the method in [5]. Note that ZS-N2N, DIP, and S2S do not utilize any prior information on the noise distribution or level.
As seen from the results, the dataset based methods often fall slightly short of the dataset free methods. This is due to the fact that they were only trained on 500 images, whereas they reach good performance when trained on larger datasets. In the supplementary material, we show that when N2C is trained on 4000 images, it outperforms all other baselines and its performance can keep improving with more training data. Another drawback of dataset based methods is that they are sensitive to the data they are trained on. They experience a performance drop when trained on a range of noise levels as opposed to a specific noise level as the test set.
Regarding the zero-shot methods, DIP exhibited worse scores in all simulations. BM3D is tailored to work well for Gaussian denoising, where the exact noise variance is known and required as input. However, its performance dropped for Poisson noise, where the noise level was estimated.
ZS-N2N and S2S do not rely on a specific noise model and therefore work consistently well for both Gaussian and Poisson noise. However, S2S suffers from at least two drawbacks. The first is it heavily relies on ensembling to achieve good scores as seen by comparing the results of S2S with $\mathrm{S2S^{*}}$ . Despite improving the scores, ensembling oversmoothens the image causing a loss in some visual features [8]. Note that all other baselines are ensemble free. The second drawback is that it performs worse than all other baselines on low noise levels, as seen in the Gaussian noise with $\sigma = 10$ .
Considering that DIP performs poorly, that BM3D only works well for Gaussian noise, and that S2S's performance without ensembling and on low noise levels is unsatisfactory, our method, ZS-N2N is the only dataset free denoising algorithm that performs well on different noise distributions and levels.
# 4.3. Real-World Noise
Camera noise: Following [24], we evaluate on the PolyU dataset [29] which consists of high-resolution images from various scenes captured by 5 cameras from the 3 leading brands of cameras: Canon, Nikon, and Sony. We also consider the SIDD [1], which consists of images captured by several smartphone cameras under different lighting conditions and noise patterns.
Since the computational cost for running S2S is high, we randomly choose 20 images from both datasets to test on. The SIDD validation set has images of size $256 \times 256$ . For consistency, we center-crop the PolyU images to patches of size $256 \times 256$ . The results are shown in table 2. All methods perform similarly except for BM3D and the ensemble free version of S2S, which
exhibit a notable performance drop.
<table><tr><td>Dataset</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>S2S*</td><td>BM3D</td></tr><tr><td>PolyU</td><td>36.92</td><td>37.07</td><td>37.01</td><td>33.12</td><td>36.11</td></tr><tr><td>SIDD</td><td>34.07</td><td>34.31</td><td>33.98</td><td>30.77</td><td>28.19</td></tr></table>
Microscope noise: We additionally evaluate on the Fluorescence Microscopy dataset [33], which contains real grayscale fluorescence images obtained with commercial confocal, two-photon, and wide-field microscopes and representative biological samples such as cells, zebrafish, and mouse brain tissues. We pick random images from the test set to test on. We also compare to Noise2Fast (N2F) [18], for which code for denoising grayscale is available. The results are depicted in table 3.
Table 2. Denoising PSNR in dB on real world camera noise.
<table><tr><td>Image</td><td>Photon BPAE</td><td>Photon Mice</td><td>Confocal BPAE</td><td>Average</td></tr><tr><td>ZS-N2N</td><td>30.73</td><td>31.42</td><td>35.85</td><td>32.67</td></tr><tr><td>DIP</td><td>29.22</td><td>30.01</td><td>35.51</td><td>31.58</td></tr><tr><td>S2S</td><td>30.90</td><td>31.51</td><td>31.01</td><td>31.14</td></tr><tr><td>S2S*</td><td>29.49</td><td>29.99</td><td>29.54</td><td>29.67</td></tr><tr><td>BM3D</td><td>27.19</td><td>29.48</td><td>33.23</td><td>29.97</td></tr><tr><td>N2F</td><td>30.93</td><td>31.07</td><td>36.01</td><td>32.67</td></tr></table>
Table 3. PSNR in dB on real world microscope noise.
Our method and Noise2Fast achieve similar scores and slightly outperform the other baselines. Despite the similarity in scores, when inspecting the denoised images visually, we see differences: Our method produces visually sharper images and preserves slightly more details, while the Noise2Fast images are relatively smooth. This is most noticeable on images with fine details, such as MRI images, see Figure 3 for a knee image from the fastMRI dataset [31]. The blurriness in the Noise2Fast images is likely due to the downsampling scheme used, which drops some pixel values, and the ensembling performed to obtain the final image estimate, which oversmoothens the image [8]. Our method, on the other hand, preserves all pixel values during downsampling, and is ensemble free.
# 4.4. Computational Efficiency
In this section we focus on the computational efficiency. We consider the denoising time and the memory requirements represented by the number of network parameters. Since in some applications a GPU is not available [9], we additionally consider the denoising time on a CPU. The GPU tested is Quadro RTX 6000 and the CPU is Intel Core i9-9940X 3.30GHz.
<table><tr><td>Noise</td><td colspan="2">Method</td><td colspan="3">Kodak24</td><td colspan="3">McMaster18</td></tr><tr><td rowspan="12">Gaussian</td><td rowspan="7">dataset-based</td><td rowspan="3">N2C</td><td>σ known?</td><td>σ = 10</td><td>σ = 25</td><td>σ = 50</td><td>σ = 10</td><td>σ = 25</td></tr><tr><td>yes</td><td>33.45</td><td>28.27</td><td>25.47</td><td>33.03</td><td>28.46</td></tr><tr><td>no</td><td>32.16</td><td>28.18</td><td>24.45</td><td>31.97</td><td>28.26</td></tr><tr><td rowspan="2">NB2NB</td><td>yes</td><td>33.01</td><td>27.90</td><td>25.02</td><td>32.63</td><td>28.01</td></tr><tr><td>no</td><td>31.79</td><td>27.80</td><td>24.15</td><td>31.19</td><td>27.85</td></tr><tr><td rowspan="2">N2V</td><td>yes</td><td>30.19</td><td>26.21</td><td>24.07</td><td>30.95</td><td>26.50</td></tr><tr><td>no</td><td>28.95</td><td>26.03</td><td>23.19</td><td>29.64</td><td>26.31</td></tr><tr><td rowspan="5">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>33.69</td><td>29.07</td><td>24.81</td><td>34.21</td><td>28.80</td></tr><tr><td>DIP</td><td>-</td><td>32.28</td><td>27.38</td><td>23.95</td><td>33.07</td><td>27.61</td></tr><tr><td>S2S</td><td>-</td><td>29.54</td><td>28.39</td><td>26.22</td><td>30.78</td><td>28.71</td></tr><tr><td>S2S*</td><td>-</td><td>26.93</td><td>26.29</td><td>24.83</td><td>27.64</td><td>26.48</td></tr><tr><td>BM3D</td><td>yes</td><td>33.74</td><td>29.02</td><td>25.51</td><td>34.51</td><td>29.21</td></tr><tr><td rowspan="12">Poisson</td><td rowspan="7">dataset-based</td><td rowspan="3">N2C</td><td>λ known?</td><td>λ = 50</td><td>λ = 25</td><td>λ = 10</td><td>λ = 50</td><td>λ = 25</td></tr><tr><td>yes</td><td>29.42</td><td>27.49</td><td>26.25</td><td>29.89</td><td>28.20</td></tr><tr><td>no</td><td>28.92</td><td>27.14</td><td>23.13</td><td>28.62</td><td>27.51</td></tr><tr><td rowspan="2">NB2NB</td><td>yes</td><td>29.19</td><td>27.01</td><td>25.71</td><td>29.41</td><td>27.79</td></tr><tr><td>no</td><td>28.53</td><td>26.88</td><td>23.60</td><td>28.03</td><td>27.66</td></tr><tr><td rowspan="2">N2V</td><td>yes</td><td>27.73</td><td>25.55</td><td>23.77</td><td>27.86</td><td>25.65</td></tr><tr><td>no</td><td>27.04</td><td>25.28</td><td>21.93</td><td>26.34</td><td>25.52</td></tr><tr><td rowspan="5">dataset-free</td><td>ZS-N2N (ours)</td><td>-</td><td>29.45</td><td>27.52</td><td>24.92</td><td>30.36</td><td>28.41</td></tr><tr><td>DIP</td><td>-</td><td>27.51</td><td>25.84</td><td>23.81</td><td>28.73</td><td>27.37</td></tr><tr><td>S2S</td><td>-</td><td>28.89</td><td>28.31</td><td>27.29</td><td>30.11</td><td>29.40</td></tr><tr><td>S2S*</td><td>-</td><td>26.75</td><td>26.40</td><td>25.63</td><td>27.55</td><td>27.24</td></tr><tr><td>BM3D</td><td>no</td><td>28.36</td><td>26.58</td><td>24.20</td><td>27.33</td><td>24.77</td></tr></table>
Table 1. PSNR scores in dB for Gaussian and Poisson denoising. Best result is in bold, second best result is underlined. The dataset based methods are italicized. Note DIP's mediocre scores and BM3D's performance drop between Gaussian and Poisson noise. S2S has significantly lower scores in low noise as seen with $\sigma = 10$ and its ensemble free version S2S* has inadequate performance. Denoised samples can be found in the supplementary material.
In table 4 we display the time required to denoise one colour image of size $256 \times 256$ at inference, as well as the total number of trainable parameters of a model. The dataset based methods are trained for long durations, but after training, the network parameters are fixed, and inference is almost instantaneous, since it is just a forward pass through the model. The time taken for denoising is therefore negligible compared to the zero-shot methods, whose parameters are optimized for each test image separately.
In the original implementation of S2S, the authors report a denoising time of 1.2 hours for a $256 \times 256$ colour image on GPU. However, we noticed that only half of the gradient update iterations are needed for convergence. We therefore report only half of their GPU time.
Concerning the denoising time, dataset based methods are the fastest, since a forward pass through a fixed network requires only milli seconds. Regarding the deep learning based zero-shot methods, ZS-N2N is significantly more computationally efficient. Specifically, on CPU it is 200 times and 35 times faster than S2S and
DIP respectively and has only $2\%$ and $1\%$ of their memory requirements. Only the classical BM3D is computationally more efficient than ZS-N2N.
# 4.5. Discussion
Dataset based methods typically achieve state-of-the-art results but our experiments manifested two of their shortcomings: They don't perform well when trained on small datasets, and the performance drops when the test data differs from the training data, as seen by varying the noise levels. This highlights the importance of dataset free denoising algorithms.
Methods that rely on an explicit model of the noise distribution such as Noisier2Noise [23] and Anscombe [20] or those tailored to work well for specific distributions such as BM3D, do not generalize well to other distributions. Their performance therefore degrades when the noise distribution is unknown, or the noise level must be estimated. This has been manifested by BM3D's competitive performance on Gaussian noise, but its failure to keep up with the other baselines on Poisson and real world noise. These findings highlight the advantage




 Figure 3. Visual comparison between our method and Noise2Fast for denoising Gaussian noise on a knee MRI. Both methods achieve similar PSNR, but notice how the center and left edge are blurry and oversmooth in Noise2Fast. Our method produces a sharper image with less loss of details.



<table><tr><td>Method</td><td>N2C</td><td>NB2NB</td><td>N2V</td><td>ZS-N2N</td><td>DIP</td><td>S2S</td><td>BM3D</td></tr><tr><td>GPU time</td><td>-</td><td>-</td><td>-</td><td>20 sec.</td><td>3 min.</td><td>35 min.</td><td>4 sec.</td></tr><tr><td>CPU time</td><td>-</td><td>-</td><td>-</td><td>80 sec.</td><td>45 min.</td><td>4.5 hr.</td><td>4 sec.</td></tr><tr><td>Network size</td><td>3.3M</td><td>1.3M</td><td>2.2M</td><td>22k</td><td>2.2M</td><td>1M</td><td>-</td></tr></table>
Table 4. Computational Resources. First and Second Rows: Time taken to denoise one image on average on GPU and CPU. The time for the dataset based methods is discarded, since it is negligible. BM3D does not benefit from the GPU, as there is no optimization involved. Bottom Row: Number of parameters of a network.
of noise model free techniques.
Regarding the three dataset free and noise model free methods considered, DIP was often lagging behind S2S and ZS-N2N, despite using the ground truths to find the best possible early stopping iteration. S2S's performance without ensembling is inadequate, and even with ensembling, it does not work well on low noise levels. Moreover, it requires more than 0.5 hours to denoise an image on a GPU and 4.5 hours on a CPU.
Except for ZS-N2N, all deep learning based baselines have millions of parameters, making them computationally expensive. Considering ZS-N2N's ability to generalize to various denoising conditions with relatively fast denoising time, very few parameters, and CPU compatibility, we can conclude that it offers a good trade-off between denoising quality and computational resources.
# 5. Conclusion
We proposed a novel zero-shot image denoising algorithm that does not require any training examples or knowledge of the noise model or level. Our work uses a
simple 2-layer network, and allows denoising in a relatively short period of time even when executed without a GPU. The method can perform well on simulated noise as well as real-world camera and microscope noise, and achieves a good trade-off between generalization, denoising quality and computational resources compared to existing dataset free methods. A demo of our implementation including our code and hyperparameters can be found in the following colab notebook: https://colab.research.google.com/drive/1i82nyizTdszyHkaHBuKPbWnTzao8HF9b
# Acknowledgements
The authors are supported by the Institute of Advanced Studies at the Technical University of Munich, the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) - 456465471, 464123524, the German Federal Ministry of Education and Research, and the Bavarian State Ministry for Science and the Arts. The authors of this work take full responsibility for its content.
# References
[1] Abdelrahman Abdelhamed, Stephen Lin, and Michael S. Brown. A high-quality denoising dataset for smartphone cameras. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 6 [2] Joshua Batson and Loic Royer. Noise2Self: Blind denoising by self-supervision. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 524-533. PMLR, 2019. 2 [3] Tim Brooks, Ben Mildenhall, Tianfan Xue, Jiawen Chen, Dillon Sharlet, and Jonathan T. Barron. Unprocessing Images for Learned Raw Denoising. In IEEE Conference on Computer Vision and Pattern Recognition, pages 11036-11045, 2019. 2 [4] Sungmin Cha and Taesup Moon. Fully convolutional pixel adaptive image denoiser. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2019. 2, 5 [5] Guangyong Chen, Fengyuan Zhu, and Pheng Ann Heng. An efficient statistical method for image noise level estimation. In 2015 IEEE International Conference on Computer Vision (ICCV), pages 477-485, 2015. 6 [6] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 15750-15758, 2021. 4 [7] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian. Image Denoising by Sparse 3-D Transform-Domain Collaborative Filtering. IEEE Transactions on Image Processing, 16(8):2080-2095, 2007. 1, 2, 5 [8] Mohammad Zalbagi Darestani and Reinhard Heckel. Accelerated mri with un-trained neural networks. IEEE Transactions on Computational Imaging, 7:724-733, 2021. 3, 6 [9] Mauricio Delbracio, Ignacio Garcia-Dorado, SungJoon Choi, Damien Kelly, and Peyman Milanfar. Polyblur: Removing mild blur by polynomial reblurring. IEEE Transactions on Computational Imaging, 7:837-848, 2021. 6 [10] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 5 [11] Reinhard Heckel and Paul Hand. Deep decoder: Concise image representations from untrained non-convolutional networks. International Conference on Learning Representations, 2019. 3 [12] Tao Huang, Songjiang Li, Xu Jia, Huchuan Lu, and Jianzhuang Liu. Neighbor2neighbor: Self-supervised denoising from single noisy images. In 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14776-14785, 2021. 1, 2, 3, 5 [13] Sandip M. Kasar and Sachin D. Ruikar. Image demosaicking by nonlocal adaptive thresholding. In 2013 International Conference on Signal Processing, Image Processing Pattern Recognition, pages 34-38, 2013. 5
[14] Chaewon Kim, Jaeho Lee, and Jinwoo Shin. Zero-shot blind image denoising via implicit neural representations, 2022. 2 [15] Alexander Krull, Tim-Oliver Buchholz, and Florian Jug. Noise2void - learning denoising from single noisy images. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 2124-2132, 2019. 1, 2, 5 [16] Samuli Laine, Tero Karras, Jaakko Lehtinen, and Timo Aila. High-quality self-supervised deep image denoising. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 5 [17] Jaakko Lehtinen, Jacob Munkberg, Jon Hasselgren, Samuli Laine, Tero Karras, Miika Aittala, and Timo Aila. Noise2Noise: Learning image restoration without clean data. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2965-2974. PMLR, 2018. 1, 2, 3, 5 [18] Jason Lequyer, Reuben Philip, Amit Sharma, Wen-Hsin Hsu, and Laurence Pelletier. A fast blind zero-shot denoiser. Nature Machine Intelligence, oct 2022. 2, 6 [19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 10012-10022, 2021. 2 [20] Markku Makitalo and Alessandro Foi. Optimal inversion of the anscombe transformation in low-countoisson image denoising. IEEE Transactions on Image Processing, 20(1):99-109, 2011. 1, 2, 7 [21] Youssef Mansour, Kang Lin, and Reinhard Heckel. Image-to-image mlp-mixer for image reconstruction. CoRR, abs/2202.02018, 2022. 2 [22] Xiaojiao Mao, Chunhua Shen, and Yu-Bin Yang. Image restoration using very deep convolutional encoder-decoder networks with symmetric skip connections. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. 5 [23] Nick Moran, Dan Schmidt, Yu Zhong, and Patrick Coady. Noisier2noise: Learning to denoise from unpaired noisy data. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12061-12069, 2020. 2, 5, 7 [24] Yuhui Quan, Mingqin Chen, Tongyao Pang, and Hui Ji. Self2self with dropout: Learning self-supervised denoising from single image. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 1, 2, 3, 5, 6 [25] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Nassir Navab, Joachim Hornegger, William M. Wells, and Alejandro F. Frangi, editors,
Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015, pages 234-241, Cham, 2015. Springer International Publishing. 3, 4 [26] Shakarim Soltanayev and Se Young Chun. Training deep learning based denoisers without ground truth data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. 2 [27] Zhengzhong Tu, Hossein Talebi, Han Zhang, Feng Yang, Peyman Milanfar, Alan Bovik, and Yinxiao Li. Maxim: Multi-axis mlp for image processing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5769-5780, June 2022. 2 [28] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 3, 5 [29] Jun Xu, Hui Li, Zhetong Liang, David Zhang, and Lei Zhang. Real-world noisy image denoising: A new benchmark, 2018. 6 [30] Syed Waqas Zamir, Aditya Arora, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, Ming-Hsuan Yang, and Ling Shao. Cycleisp: Real image restoration via improved data synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 5 [31] Jure Zbontar, Florian Knoll, Anuroop Sriram, Tullie Murrell, Zhengnan Huang, Matthew J. Muckley, Aaron Defazio, Ruben Stern, Patricia Johnson, Mary Bruno, Marc Parente, Krzysztof J. Geras, Joe Katsnelson, Hersh Chandarana, Zizhao Zhang, Michal Drozdzal, Adriana Romero, Michael Rabbat, Pascal Vincent, Nafissa Yakubova, James Pinkerton, Duo Wang, Erich Owens, C. Lawrence Zitnick, Michael P. Recht, Daniel K. Sodickson, and Yvonne W. Lui. fastMRI: An open dataset and benchmarks for accelerated MRI. 2018. 6 [32] K. Zhang, W. Zuo, Y. Chen, D. Meng, and L. Zhang. Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising. IEEE Transactions on Image Processing, 26(7):3142-3155, 2017. 2, 5 [33] Yide Zhang, Yinhao Zhu, Evan Nichols, Qingfei Wang, Siyuan Zhang, Cody Smith, and Scott Howard. Aoisson-gaussian denoising dataset with real fluorescence microscopy images. In CVPR, 2019. 6 [34] Magaiya Zhussip, Shakarim Soltanayev, and Se Young Chun. Extending stein's unbiased risk estimator to train deep denoisers with correlated pairs of noisy images. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. 2, 5123version https://git-lfs.github.com/spec/v1oid sha256:44d6a8257f97e0eb63faffdb2a4b7403d7427deddbce3d2d97f807bd8d054ae0size 420682123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692[ { "type": "text", "text": "Zero-Shot Object Counting", "text_level": 1, "bbox": [ 344, 130, 627, 152 ], "page_idx": 0 }, { "type": "text", "text": "Jingyi $\\mathrm{Xu}^{1}$ , Hieu $\\mathrm{Le}^{2}$ , Vu Nguyen $^{1}$ , Viresh Ranjan $^{*3}$ , and Dimitris Samaras $^{1}$", "bbox": [ 184, 191, 781, 213 ], "page_idx": 0 }, { "type": "text", "text": "<sup>1</sup>Stony Brook University <sup>2</sup>EPFL <sup>3</sup>Amazon", "bbox": [ 307, 222, 661, 242 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 233, 286, 313, 301 ], "page_idx": 0 }, { "type": "text", "text": "Class-agnostic object counting aims to count object instances of an arbitrary class at test time. Current methods for this challenging problem require human-annotated exemplars as inputs, which are often unavailable for novel categories, especially for autonomous systems. Thus, we propose zero-shot object counting (ZSC), a new setting where only the class name is available during test time. Such a counting system does not require human annotators in the loop and can operate automatically. Starting from a class name, we propose a method that can accurately identify the optimal patches which can then be used as counting exemplars. Specifically, we first construct a class prototype to select the patches that are likely to contain the objects of interest, namely class-relevant patches. Furthermore, we introduce a model that can quantitatively measure how suitable an arbitrary patch is as a counting exemplar. By applying this model to all the candidate patches, we can select the most suitable patches as exemplars for counting. Experimental results on a recent class-agnostic counting dataset, FSC-147, validate the effectiveness of our method. Code is available at https://github.com/cvlab-stonybrook/zero-shot-counting.", "bbox": [ 75, 319, 473, 652 ], "page_idx": 0 }, { "type": "text", "text": "1. Introduction", "text_level": 1, "bbox": [ 76, 681, 209, 698 ], "page_idx": 0 }, { "type": "text", "text": "Object counting aims to infer the number of objects in an image. Most of the existing methods focus on counting objects from specialized categories such as human crowds [37], cars [29], animals [4], and cells [46]. These methods count only a single category at a time. Recently, class-agnostic counting [28, 34, 38] has been proposed to count objects of arbitrary categories. Several human-annotated bounding boxes of objects are required to specify the objects of interest (see Figure 1a). However, having humans in the loop is not practical for many real-world applications, such as fully automated wildlife monitoring systems or vi", "bbox": [ 75, 708, 468, 875 ], "page_idx": 0 }, { "type": "image", "img_path": "images/0c00134abb2666d7bd32bc16dc84060d555ab990b2ba9dc3c7810e1eea5ab5a2.jpg", "image_caption": [ "(a) Few-shot Counting", "Figure 1. Our proposed task of zero-shot object counting (ZSC). Traditional few-shot counting methods require a few exemplars of the object category (a). We propose zero-shot counting where the counter only needs the class name to count the number of object instances. (b). Few-shot counting methods require human annotators at test time while zero-shot counters can be fully automatic." ], "image_footnote": [], "bbox": [ 558, 285, 684, 434 ], "page_idx": 0 }, { "type": "image", "img_path": "images/6615debf754375cd3058cd6458bfb7a60f5640e9fee3eca317637b25be9849b5.jpg", "image_caption": [ "(b) Zero-Shot Counting" ], "image_footnote": [], "bbox": [ 705, 286, 831, 434 ], "page_idx": 0 }, { "type": "text", "text": "sual anomaly detection systems.", "bbox": [ 500, 551, 715, 566 ], "page_idx": 0 }, { "type": "text", "text": "A more practical setting, exemplar-free class-agnostic counting, has been proposed recently by Ranjan et al. [33]. They introduce RepRPN, which first identifies the objects that occur most frequently in the image, and then uses them as exemplars for object counting. Even though RepRPN does not require any annotated boxes at test time, the method simply counts objects from the class with the highest number of instances. Thus, it can not be used for counting a specific class of interest. The method is only suitable for counting images with a single dominant object class, which limits the potential applicability.", "bbox": [ 496, 566, 890, 733 ], "page_idx": 0 }, { "type": "text", "text": "Our goal is to build an exemplar-free object counter where we can specify what to count. To this end, we introduce a new counting task in which the user only needs to provide the name of the class for counting rather than the exemplars (see Figure 1b). In this way, the counting model can not only operate in an automatic manner but also allow the user to define what to count by simply providing the class name. Note that the class to count during test time can be arbitrary. For cases where the test class is completely unseen to the trained model, the counter needs to adapt to the unseen class without any annotated data. Hence, we", "bbox": [ 496, 734, 892, 900 ], "page_idx": 0 }, { "type": "header", "text": "CVF", "bbox": [ 106, 2, 181, 42 ], "page_idx": 0 }, { "type": "header", "text": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore.", "bbox": [ 236, 0, 807, 46 ], "page_idx": 0 }, { "type": "page_footnote", "text": "*Work done prior to joining Amazon", "bbox": [ 94, 887, 292, 900 ], "page_idx": 0 }, { "type": "page_number", "text": "15548", "bbox": [ 480, 944, 519, 955 ], "page_idx": 0 }, { "type": "text", "text": "name this setting zero-shot object counting (ZSC), inspired by previous zero-shot learning approaches [6, 57].", "bbox": [ 75, 90, 468, 121 ], "page_idx": 1 }, { "type": "text", "text": "To count without any annotated exemplars, our idea is to identify a few patches in the input image containing the target object that can be used as counting exemplars. Here the challenges are twofold: 1) how to localize patches that contain the object of interest based on the provided class name, and 2) how to select good exemplars for counting. Ideally, good object exemplars are visually representative for most instances in the image, which can benefit the object counter. In addition, we want to avoid selecting patches that contain irrelevant objects or backgrounds, which likely lead to incorrect object counts.", "bbox": [ 75, 123, 467, 287 ], "page_idx": 1 }, { "type": "text", "text": "To this end, we propose a two-step method that first localizes the class-relevant patches which contain the objects of interest based on the given class name, and then selects among these patches the optimal exemplars for counting. We use these selected exemplars, together with a pre-trained exemplar-based counting model, to achieve exemplar-free object counting.", "bbox": [ 75, 291, 467, 397 ], "page_idx": 1 }, { "type": "text", "text": "In particular, to localize the patches containing the objects of interest, we first construct a class prototype in a pretrained embedding space based on the given class name. To construct the class prototype, we train a conditional variational autoencoder (VAE) to generate features for an arbitrary class conditioned on its semantic embedding. The class prototype is computed by taking the average of the generated features. We then select the patches whose embeddings are the $k$ -nearest neighbors of the class prototype as the class-relevant patches.", "bbox": [ 75, 398, 467, 549 ], "page_idx": 1 }, { "type": "text", "text": "After obtaining the class-relevant patches, we further select among them the optimal patches to be used as counting exemplars. Here we observe that the feature maps obtained using good exemplars and bad exemplars often exhibit distinguishable differences. An example of the feature maps obtained with different exemplars is shown in Figure 2. The feature map from a good exemplar typically exhibits some repetitive patterns (e.g., the dots on the feature map) that center around the object areas while the patterns from a bad exemplar are more irregular and occur randomly across the image. Based on this observation, we train a model to measure the goodness of an input patch based on its corresponding feature maps. Specifically, given an arbitrary patch and a pre-trained exemplar-based object counter, we train this model to predict the counting error of the counter when using the patch as the exemplar. Here the counting error can indicate the goodness of the exemplar. After this error predictor is trained, we use it to select those patches with the smallest predicted errors as the final exemplars for counting.", "bbox": [ 75, 551, 467, 838 ], "page_idx": 1 }, { "type": "text", "text": "Experiments on the FSC-147 dataset show that our method outperforms the previous exemplar-free counting method [33] by a large margin. We also provide analyses to show that patches selected by our method can be", "bbox": [ 75, 839, 467, 900 ], "page_idx": 1 }, { "type": "image", "img_path": "images/4b39c3d1f8fd9279d469780fddec6dddadcbe6a39a2a530bde83b39226eee0e0.jpg", "image_caption": [ "Figure 2. Feature maps obtained using different exemplars given a pre-trained exemplar-based counting model. The feature maps obtained using good exemplars typically exhibit some repetitive patterns while the patterns from bad exemplars are more irregular." ], "image_footnote": [], "bbox": [ 514, 92, 883, 224 ], "page_idx": 1 }, { "type": "text", "text": "used in other exemplar-based counting methods to achieve exemplar-free counting. In short, our main contributions can be summarized as follows:", "bbox": [ 498, 308, 890, 353 ], "page_idx": 1 }, { "type": "list", "sub_type": "text", "list_items": [ "- We introduce the task of zero-shot object counting that counts the number of instances of a specific class in the input image, given only the class name and without relying on any human-annotated exemplars.", "- We propose a simple yet effective patch selection method that can accurately localize the optimal patches across the query image as exemplars for zero-shot object counting.", "- We verify the effectiveness of our method on the FSC-147 dataset, through extensive ablation studies and visualization results." ], "bbox": [ 517, 364, 890, 532 ], "page_idx": 1 }, { "type": "text", "text": "2. Related Work", "text_level": 1, "bbox": [ 500, 560, 638, 575 ], "page_idx": 1 }, { "type": "text", "text": "2.1. Class-specific Object Counting", "text_level": 1, "bbox": [ 500, 585, 769, 602 ], "page_idx": 1 }, { "type": "text", "text": "Class-specific object counting focuses on counting predefined categories, such as humans [1, 15, 24, 26, 37, 39, 40, 42, 47, 52, 53, 55, 56], animals [4], cells [46], or cars [14, 29]. Generally, existing methods can be categorized into two groups: detection-based methods [8, 14, 18] and regression-based methods [7, 10, 11, 27, 41, 53, 56]. Detection-based methods apply an object detector on the image and count the number of objects based on the detected boxes. Regression-based methods predict a density map for each input image, and the final result is obtained by summing up the pixel values. Both types of methods require abundant training data to learn a good model. Class-specific counters can perform well on trained categories. However, they can not be used to count objects of arbitrary categories at test time.", "bbox": [ 496, 609, 890, 821 ], "page_idx": 1 }, { "type": "text", "text": "2.2. Class-agnostic Object Counting", "text_level": 1, "bbox": [ 500, 830, 777, 848 ], "page_idx": 1 }, { "type": "text", "text": "Class-agnostic object counting aims to count arbitrary categories given only a few exemplars [3, 13, 25, 28, 31, 34, 38, 50, 51]. GMN [28] uses a shared embedding module to", "bbox": [ 498, 854, 890, 900 ], "page_idx": 1 }, { "type": "page_number", "text": "15549", "bbox": [ 480, 944, 517, 955 ], "page_idx": 1 }, { "type": "image", "img_path": "images/6ebfd08a8f53d7e8186002eb73ea2f3d646578d8303afba3c237121bc88582b5.jpg", "image_caption": [ "Figure 3. Overview of the proposed method. We first use a generative model to obtain a class prototype for the given class (e.g. grape) in a pre-trained feature space. Then given an input query image, we randomly sample a number of patches of various sizes and extract the corresponding feature embedding for each patch. We select the patches whose embeddings are the nearest neighbors of the class prototype as class-relevant patches. Then for each of the selected class-relevant patches, we use a pre-trained exemplar-based counting model to obtain the intermediate feature maps. Our proposed error predictor then takes the feature maps as input and predicts the counting error (here we use normalized counting errors). We select the patches with the smallest predicted errors as the final exemplar patches and use them for counting." ], "image_footnote": [], "bbox": [ 107, 90, 848, 315 ], "page_idx": 2 }, { "type": "text", "text": "extract feature maps for both query images and exemplars, which are then concatenated and fed into a matching module to regress the object count. FamNet [34] adopts a similar way to do correlation matching and further applies test-time adaptation. These methods require human-annotated exemplars as inputs. Recently, Ranjan et al. have proposed RepRPN [33], which achieves exemplar-free counting by identifying exemplars from the most frequent objects via a Region Proposal Network (RPN)-based model. However, the class of interest can not be explicitly specified for the RepRPN. In comparison, our proposed method can count instances of a specific class given only the class name.", "bbox": [ 75, 436, 472, 619 ], "page_idx": 2 }, { "type": "text", "text": "2.3. Zero-shot Image Classification", "text_level": 1, "bbox": [ 76, 633, 349, 648 ], "page_idx": 2 }, { "type": "text", "text": "Zero-shot classification aims to classify unseen categories for which data is not available during training [5, 9, 12, 16, 19, 21, 23, 35, 36]. Semantic descriptors are mostly leveraged as a bridge to enable the knowledge transfer between seen and unseen classes. Earlier zero-shot learning (ZSL) works relate the semantic descriptors with visual features in an embedding space and recognize unseen samples by searching their nearest class-level semantic descriptor in this embedding space [17, 36, 43, 54]. Recently, generative models [20, 22, 48, 49] have been widely employed to synthesize unseen class data to facilitate ZSL [30, 44, 45]. Xian et al. [44] use a conditional Wasserstein Generative Adversarial Network (GAN) [2] to generate unseen features which can then be used to train a discriminative classifier for ZSL. In our method, we also train a generative model conditioned on class-specific semantic embedding. Instead", "bbox": [ 75, 659, 472, 900 ], "page_idx": 2 }, { "type": "text", "text": "of using this generative model to hallucinate data, we use it to compute a prototype for each class. This class prototype is then used to select patches that contain objects of interest.", "bbox": [ 498, 436, 893, 483 ], "page_idx": 2 }, { "type": "text", "text": "3. Method", "text_level": 1, "bbox": [ 500, 494, 591, 511 ], "page_idx": 2 }, { "type": "text", "text": "Figure 3 summarizes our proposed method. Given an input query image and a class label, we first use a generative model to construct a class prototype for the given class in a pre-trained feature space. We then randomly sample a number of patches of various sizes and extract the feature embedding for each patch. The class-relevant patches are those patches whose embeddings are the nearest neighbors of the class prototype in the embedding space. We further use an error predictor to select the patches with the smallest predicted errors as the final exemplars for counting. We use the selected exemplars in an exemplar-based object counter to infer the object counts. For the rest of the paper, we denote this exemplar-based counter as the \"base counting model\". We will first describe how we train this base counting model and then present the details of our patch selection method.", "bbox": [ 496, 520, 893, 748 ], "page_idx": 2 }, { "type": "text", "text": "3.1. Training Base Counting Model", "text_level": 1, "bbox": [ 500, 756, 774, 772 ], "page_idx": 2 }, { "type": "text", "text": "We train our base counting model using abundant training images with annotations. Similar to previous works [34, 38], the base counting model uses the input image and the exemplars to obtain a density map for object counting. The model consists of a feature extractor $F$ and a counter $C$ . Given a query image $I$ and an exemplar $B$ of an arbitrary class $c$ , we input $I$ and $B$ to the feature extractor to obtain the corresponding output, denoted as $F(I)$ and $F(B)$ re", "bbox": [ 496, 779, 893, 902 ], "page_idx": 2 }, { "type": "page_number", "text": "15550", "bbox": [ 480, 944, 519, 957 ], "page_idx": 2 }, { "type": "text", "text": "spectively. $F(I)$ is a feature map of size $d * h_{I} * w_{I}$ and $F(B)$ is a feature map of size $d * h_{B} * w_{B}$ . We further perform global average pooling on $F(B)$ to form a feature vector $b$ of $d$ dimensions.", "bbox": [ 76, 90, 468, 150 ], "page_idx": 3 }, { "type": "text", "text": "After feature extraction, we obtain the similarity map $S$ by correlating the exemplar feature vector $b$ with the image feature map $F(I)$ . Specifically, if $w_{ij} = F_{ij}(I)$ is the channel feature at spatial position $(i,j)$ , $S$ can be computed by:", "bbox": [ 76, 151, 468, 212 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\nS _ {i j} (I, B) = w _ {i j} ^ {T} b. \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 210, 224, 468, 244 ], "page_idx": 3 }, { "type": "text", "text": "In the case where $n$ exemplars are given, we use Eq. 1 to calculate $n$ similarity maps, and the final similarity map is the average of these $n$ similarity maps.", "bbox": [ 76, 248, 468, 292 ], "page_idx": 3 }, { "type": "text", "text": "We then concatenate the image feature map $F(I)$ with the similarity map $S$ , and input them into the counter $C$ to predict a density map $D$ . The final predicted count $N$ is obtained by summing over the predicted density map $D$ :", "bbox": [ 76, 294, 468, 354 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\nN = \\sum_ {i, j} D _ {(i, j)}, \\tag {2}\n$$\n", "text_format": "latex", "bbox": [ 215, 363, 468, 395 ], "page_idx": 3 }, { "type": "text", "text": "where $D_{(i,j)}$ denotes the density value for pixel $(i,j)$ . The supervision signal for training the counting model is the $L_{2}$ loss between the predicted density map and the ground truth density map:", "bbox": [ 76, 398, 468, 458 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\nL _ {\\text {c o u n t}} = \\left\\| D (I, B) - D ^ {*} (I) \\right\\| _ {2} ^ {2}, \\tag {3}\n$$\n", "text_format": "latex", "bbox": [ 166, 472, 468, 489 ], "page_idx": 3 }, { "type": "text", "text": "where $D^{*}$ denotes the ground truth density map.", "bbox": [ 76, 494, 395, 510 ], "page_idx": 3 }, { "type": "text", "text": "3.2. Zero-shot Object Counting", "text_level": 1, "bbox": [ 76, 518, 320, 535 ], "page_idx": 3 }, { "type": "text", "text": "In this section, we describe how we count objects of any unseen category given only the class name without access to any exemplar. Our strategy is to select a few patches in the image that can be used as exemplars for the base counting model. These patches are selected such that: 1) they contain the objects that we are counting and 2) they benefit the counting model, i.e., lead to small counting errors.", "bbox": [ 76, 541, 468, 648 ], "page_idx": 3 }, { "type": "text", "text": "3.2.1 Selecting Class-relevant Patches", "text_level": 1, "bbox": [ 76, 665, 354, 680 ], "page_idx": 3 }, { "type": "text", "text": "To select patches that contain the objects of interest, we first generate a class prototype based on the given class name using a conditional VAE model. Then we randomly sample a number of patches across the query image and select the class-relevant patches based on the generated prototype.", "bbox": [ 76, 688, 468, 763 ], "page_idx": 3 }, { "type": "text", "text": "Class prototype generation. Inspired by previous zero-shot learning approaches [44, 45], we train a conditional VAE model to generate features for an arbitrary class based on the semantic embedding of the class. The semantic embedding is obtained from a pre-trained text-vision model [32] given the corresponding class name. Specifically, we train the VAE model to reconstruct features in a pre-trained ImageNet feature space. The VAE is composed of an Encoder $E$ , which maps a visual feature $x$ to a latent code $z$ ,", "bbox": [ 76, 765, 468, 900 ], "page_idx": 3 }, { "type": "text", "text": "and a decoder $G$ which reconstructs $x$ from $z$ . Both $E$ and $G$ are conditioned on the semantic embedding $a$ . The loss function for training this VAE for an input feature $x$ can be defined as:", "bbox": [ 498, 90, 890, 148 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\begin{array}{l} L _ {V} (x) = \\operatorname {K L} (q (z | x, a) | | p (z | a)) \\tag {4} \\\\ - \\mathrm {E} _ {q (z | x, a)} [ \\log p (x | z, a) ]. \\\\ \\end{array}\n$$\n", "text_format": "latex", "bbox": [ 584, 160, 890, 196 ], "page_idx": 3 }, { "type": "text", "text": "The first term is the Kullback-Leibler divergence between the VAE posterior $q(z|x,a)$ and a prior distribution $p(z|a)$ . The second term is the decoder's reconstruction error. $q(z|x,a)$ is modeled as $E(x,a)$ and $p(x|z,a)$ is equal to $G(z,a)$ . The prior distribution is assumed to be $\\mathcal{N}(0,I)$ for all classes.", "bbox": [ 498, 205, 890, 295 ], "page_idx": 3 }, { "type": "text", "text": "We can use the trained VAE to generate the class prototype for an arbitrary target class for counting. Specifically, given the target class name $y$ , we first generate a set of features by inputting the respective semantic vector $a^y$ and a noise vector $z$ to the decoder $G$ :", "bbox": [ 498, 297, 890, 372 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathbb {G} ^ {y} = \\{\\hat {x} | \\hat {x} = G (z, y), z \\sim \\mathcal {N} (0, I) \\}. \\tag {5}\n$$\n", "text_format": "latex", "bbox": [ 568, 385, 890, 402 ], "page_idx": 3 }, { "type": "text", "text": "The class prototype $\\mathfrak{p}^y$ is computed by taking the mean of all the features generated by VAE:", "bbox": [ 498, 412, 890, 443 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathrm {p} ^ {y} = \\frac {1}{| \\mathbb {G} ^ {y} |} \\sum_ {\\hat {x} \\in \\mathbb {G} ^ {y}} \\hat {x} \\tag {6}\n$$\n", "text_format": "latex", "bbox": [ 622, 454, 890, 486 ], "page_idx": 3 }, { "type": "text", "text": "Class-relevant patch selection. The generated class prototype can be considered as a class center representing the distribution of features of the corresponding class in the embedding space. Using the class prototype, we can select the class-relevant patches across the query image. Specifically, we first randomly sample $M$ patches of various sizes $\\{b_1, b_2, \\dots, b_m\\}$ across the query image and extract their corresponding ImageNet features $\\{f_1, f_2, \\dots, f_m\\}$ . To select the class-relevant patches, we calculate the $L_2$ distance between the class prototype and the patch embedding, namely $d_i = \\| f_i - \\mathrm{p}^y\\|_2$ . Then we select the patches whose embeddings are the $k$ -nearest neighbors of the class prototype as the class-relevant patches. Since the ImageNet feature space is highly discriminative, i.e., features close to each other typically belong to the same class, the selected patches are likely to contain the objects of the target class.", "bbox": [ 498, 494, 890, 738 ], "page_idx": 3 }, { "type": "text", "text": "3.2.2 Selecting Exemplars for Counting", "text_level": 1, "bbox": [ 500, 756, 790, 771 ], "page_idx": 3 }, { "type": "text", "text": "Given a set of class-relevant patches and a pre-trained exemplar-based object counter, we aim to select a few exemplars from these patches that are optimal for counting. To do so, we introduce an error prediction network that predicts the counting error of an arbitrary patch when the patch is used as the exemplar. The counting error is calculated from the pre-trained counting model. Specifically, to train this error predictor, given a query image $\\bar{I}$ and an arbitrary patch", "bbox": [ 498, 779, 890, 900 ], "page_idx": 3 }, { "type": "page_number", "text": "15551", "bbox": [ 480, 944, 517, 955 ], "page_idx": 3 }, { "type": "text", "text": "$\\bar{B}$ cropped from $\\bar{I}$ , we first use the base counting model to get the image feature map $F(\\bar{I})$ , similarity map $\\bar{S}$ , and the final predicted density map $\\bar{D}$ . The counting error of the base counting model can be written as:", "bbox": [ 76, 90, 468, 151 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\epsilon = \\left| \\sum_ {i, j} \\bar {D} _ {(i, j)} - \\bar {N} ^ {*} \\right|, \\tag {7}\n$$\n", "text_format": "latex", "bbox": [ 192, 162, 468, 196 ], "page_idx": 4 }, { "type": "text", "text": "where $\\bar{N}^*$ denotes the ground truth object count in image $\\bar{I}$ . $\\epsilon$ can be used to measure the goodness of $\\bar{B}$ as an exemplar for $\\bar{I}$ , i.e., a small $\\epsilon$ indicates that $\\bar{B}$ is a suitable exemplar for counting and vice versa.", "bbox": [ 76, 200, 468, 262 ], "page_idx": 4 }, { "type": "text", "text": "The error predictor $R$ is trained to regress the counting error produced by the base counting model. The input of $R$ is the channel-wise concatenation of the image feature map $F(\\bar{I})$ and the similarity map $\\tilde{S}$ . The training objective is the minimization of the mean squared error between the output of the predictor $R(F(\\bar{I}),\\bar{S})$ and the actual counting error produced by the base counting model $\\epsilon$ .", "bbox": [ 75, 263, 468, 368 ], "page_idx": 4 }, { "type": "text", "text": "After the error predictor is trained, we can use it to select the optimal patches for counting. The candidates for selection here are the class-relevant patches selected by the class prototype in the previous step. For each candidate patch, we use the trained error predictor to infer the counting error when it is being used as the exemplar. The final selected patches for counting are the patches that yield the top- $s$ smallest counting errors.", "bbox": [ 75, 369, 468, 489 ], "page_idx": 4 }, { "type": "text", "text": "3.2.3 Using the Selected Patches as Exemplars", "text_level": 1, "bbox": [ 76, 510, 413, 526 ], "page_idx": 4 }, { "type": "text", "text": "Using the error predictor, we predict the error for each candidate patch and select the patches that lead to the smallest counting errors. The selected patches can then be used as exemplars for the base counting model to get the density map and the final count. We also conduct experiments to show that these selected patches can serve as exemplars for other exemplar-based counting models to achieve exemplar-free class-agnostic counting.", "bbox": [ 75, 534, 468, 656 ], "page_idx": 4 }, { "type": "text", "text": "4. Experiments", "text_level": 1, "bbox": [ 76, 670, 209, 686 ], "page_idx": 4 }, { "type": "text", "text": "4.1. Implementation Details", "text_level": 1, "bbox": [ 76, 695, 294, 710 ], "page_idx": 4 }, { "type": "text", "text": "Network architecture For the base counting model, we use ResNet-50 as the backbone of the feature extractor, initialized with the weights of a pre-trained ImageNet model. The backbone outputs feature maps of 1024 channels. For each query image, the number of channels is reduced to 256 using an $1 \\times 1$ convolution. For each exemplar, the feature maps are first processed with global average pooling and then linearly mapped to obtain a 256-d feature vector. The counter consists of 5 convolutional and bilinear upsampling layers to regress a density map of the same size as the query image. For the feature generation model, both the encoder and the decoder are two-layer fully-connected", "bbox": [ 75, 719, 468, 900 ], "page_idx": 4 }, { "type": "text", "text": "(FC) networks with 4096 hidden units. LeakyReLU and ReLU are the non-linear activation functions in the hidden and output layers, respectively. The dimensions of the latent space and the semantic embeddings are both set to be 512. For the error predictor, 5 convolutional and bilinear upsampling layers are followed by a linear layer to output the counting error.", "bbox": [ 496, 90, 890, 196 ], "page_idx": 4 }, { "type": "text", "text": "Dataset We use the FSC-147 dataset [34] to train the base counting model and the error predictor. FSC-147 is the first large-scale dataset for class-agnostic counting. It includes 6135 images from 147 categories varying from animals, kitchen utensils, to vehicles. The categories in the training, validation, and test sets do not overlap. The feature generator is trained on the MS-COCO detection dataset. Note that the previous exemplar-free method [33] also uses MS-COCO to pre-train their counter.", "bbox": [ 496, 196, 890, 332 ], "page_idx": 4 }, { "type": "text", "text": "Training details Both the base counting model and the error predictor are trained using the AdamW optimizer with a fixed learning rate of $10^{-5}$ . The base counting model is trained for 300 epochs with a batch size of 8. We resize the input query image to a fixed height of 384, and the width is adjusted accordingly to preserve the aspect ratio of the original image. Exemplars are resized to $128 \\times 128$ before being input into the feature extractor. The feature generation model is trained using the Adam optimizer and the learning rate is set to be $10^{-4}$ . The semantic embeddings are extracted from CLIP [32]. To select the class-relevant patches, we randomly sample 450 boxes of various sizes across the input query image and select 10 patches whose embeddings are the 10-nearest neighbors of the class prototype. The final selected patches are those that yield the top-3 smallest counting errors predicted by the error predictor.", "bbox": [ 496, 333, 890, 575 ], "page_idx": 4 }, { "type": "text", "text": "4.2. Evaluation Metrics", "text_level": 1, "bbox": [ 500, 584, 684, 599 ], "page_idx": 4 }, { "type": "text", "text": "We use Mean Average Error (MAE) and Root Mean Squared Error (RMSE) to measure the performance of different object counters. Besides, we follow [31] to report the Normalized Relative Error (NAE) and Squared Relative Error (SRE). In particular, MAE = $\\frac{1}{n}\\sum_{i=1}^{n}|y_i - \\hat{y}_i|$ ; RMSE = $\\sqrt{\\frac{1}{n}\\sum_{i=1}^{n}(y_i - \\hat{y}_i)^2}$ ; NAE = $\\frac{1}{n}\\sum_{i=1}^{n}\\frac{|y_i - \\hat{y}_i|}{y_i}$ ; SRE = $\\sqrt{\\frac{1}{n}\\sum_{i=1}^{n}\\frac{(y_i - \\hat{y}_i)^2}{y_i}}$ where $n$ is the number of test images, and $y_i$ and $\\hat{y}_i$ are the ground truth and the predicted number of objects for image $i$ respectively.", "bbox": [ 496, 607, 890, 762 ], "page_idx": 4 }, { "type": "text", "text": "4.3. Comparing Methods", "text_level": 1, "bbox": [ 500, 771, 694, 787 ], "page_idx": 4 }, { "type": "text", "text": "We compare our method with the previous works on class-agnostic counting. RepRPN-Counter [33] is the only previous class-agnostic counting method that does not require human-annotated exemplars as input. In order to make other exemplar based class-agnostic methods including GMN (General Matching Network [28]), FamNet (Few-shot adaptation and matching Network [34]) and BMNet", "bbox": [ 496, 795, 890, 900 ], "page_idx": 4 }, { "type": "page_number", "text": "15552", "bbox": [ 480, 944, 517, 955 ], "page_idx": 4 }, { "type": "table", "img_path": "images/a1d0ad93004fb7f7365ac0106411ed0f96180ca75cccb8b3964276fcb238c793.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">Method</td><td rowspan=\"2\">Exemplars</td><td colspan=\"4\">Val Set</td><td colspan=\"4\">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td rowspan=\"2\">GMN [28]</td><td>GT</td><td>29.66</td><td>89.81</td><td>-</td><td>-</td><td>26.52</td><td>124.57</td><td>-</td><td>-</td></tr><tr><td>RPN</td><td>40.96</td><td>108.47</td><td>-</td><td>-</td><td>39.72</td><td>142.81</td><td>-</td><td>-</td></tr><tr><td rowspan=\"2\">FamNet+ [34]</td><td>GT</td><td>23.75</td><td>69.07</td><td>0.52</td><td>4.25</td><td>22.08</td><td>99.54</td><td>0.44</td><td>6.45</td></tr><tr><td>RPN</td><td>42.85</td><td>121.59</td><td>0.75</td><td>6.94</td><td>42.70</td><td>146.08</td><td>0.74</td><td>7.14</td></tr><tr><td rowspan=\"2\">BMNet [38]</td><td>GT</td><td>19.06</td><td>67.95</td><td>0.26</td><td>4.39</td><td>16.71</td><td>103.31</td><td>0.26</td><td>3.32</td></tr><tr><td>RPN</td><td>37.26</td><td>108.54</td><td>0.42</td><td>5.43</td><td>37.22</td><td>143.13</td><td>0.41</td><td>5.31</td></tr><tr><td rowspan=\"2\">BMNet+ [38]</td><td>GT</td><td>15.74</td><td>58.53</td><td>0.27</td><td>6.57</td><td>14.62</td><td>91.83</td><td>0.25</td><td>2.74</td></tr><tr><td>RPN</td><td>35.15</td><td>106.07</td><td>0.41</td><td>5.28</td><td>34.52</td><td>132.64</td><td>0.39</td><td>5.26</td></tr><tr><td>RepRPN-Counter [33]</td><td>-</td><td>30.40</td><td>98.73</td><td>-</td><td>-</td><td>27.45</td><td>129.69</td><td>-</td><td>-</td></tr><tr><td rowspan=\"3\">Ours (Base)</td><td>GT</td><td>18.55</td><td>61.12</td><td>0.30</td><td>3.18</td><td>20.68</td><td>109.14</td><td>0.36</td><td>7.63</td></tr><tr><td>RPN</td><td>32.19</td><td>99.21</td><td>0.38</td><td>4.80</td><td>29.25</td><td>130.65</td><td>0.35</td><td>4.35</td></tr><tr><td>Patch-Selection</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>", "bbox": [ 191, 88, 781, 295 ], "page_idx": 5 }, { "type": "text", "text": "Table 1. Quantitative comparisons on the FSC-147 dataset. \"GT\" denotes using human-annotated boxes as exemplars. \"RPN\" denotes using the top-3 RPN proposals with the highest objectness scores as exemplars. \"Patch-Selection\" denotes using our selected patches as exemplars.", "bbox": [ 75, 299, 893, 340 ], "page_idx": 5 }, { "type": "text", "text": "(Bilinear Matching Network [38]) work in the exemplar-free setup, we replace the human-provided exemplars with the exemplars generated by a pre-trained object detector. Specifically, we use the RPN of Faster RCNN pre-trained on MS-COCO dataset and select the top-3 proposals with the highest objectness score as the exemplars. We also include the performance of these methods using human-annotated exemplars for a complete comparison.", "bbox": [ 75, 357, 472, 478 ], "page_idx": 5 }, { "type": "text", "text": "4.4. Results", "text_level": 1, "bbox": [ 76, 494, 171, 508 ], "page_idx": 5 }, { "type": "text", "text": "Quantitative results. As shown in Table 1, our proposed method outperforms the previous exemplar-free counting method [33] by a large margin, resulting in a reduction of 10.10 w.r.t. the validation RMSE and 14.52 w.r.t. the test RMSE. We also notice that the performance of all exemplar-based counting methods drops significantly when replacing human-annotated exemplars with RPN generated proposals. The state-of-the-art exemplar-based method BMNet+ [38], for example, shows an 19.90 error increase w.r.t. the test MAE and a 40.81 increase w.r.t. the test RMSE. In comparison, the performance gap is much smaller when using our selected patches as exemplars, as reflected by a 1.41 increase w.r.t. the test MAE and a 6.03 increase w.r.t. the test RMSE. Noticeably, the NAE and the SRE on the test set are even reduced when using our selected patches compared with the human-annotated exemplars.", "bbox": [ 75, 520, 468, 762 ], "page_idx": 5 }, { "type": "text", "text": "Qualitative analysis. In Figure 4, we present a few input images, the image patches selected by our method, and the corresponding density maps. Our method effectively identifies the patches that are suitable for object counting. The density maps produced by our selected patches are meaningful and close to the density maps produced by human-annotated patches. The counting model with random image patches as exemplars, in comparison, fails to output meaningful density maps and infers incorrect object counts.", "bbox": [ 75, 763, 470, 902 ], "page_idx": 5 }, { "type": "text", "text": "5. Analyses", "text_level": 1, "bbox": [ 500, 354, 599, 372 ], "page_idx": 5 }, { "type": "text", "text": "5.1. Ablation Studies", "text_level": 1, "bbox": [ 500, 381, 663, 397 ], "page_idx": 5 }, { "type": "text", "text": "Our proposed patch selection method consists of two steps: the selection of class-relevant patches via a generated class prototype and the selection of the optimal patches via an error predictor. We analyze the contribution of each step quantitatively and qualitatively. Quantitative results are in Table 2. We first evaluate the performance of our baseline, i.e. using 3 randomly sampled patches as exemplars without any selection step. As shown in Table 2, using the class prototype to select class-relevant patches reduces the error rate by 7.19 and 6.07 on the validation and test set of MAE, respectively. Applying the error predictor can improve the baseline performance by 7.22 on the validation MAE and 7.57 on the test MAE. Finally, applying the two components together further boosts performance, achieving 26.93 on the validation MAE and 22.09 on the test MAE.", "bbox": [ 496, 407, 890, 632 ], "page_idx": 5 }, { "type": "text", "text": "We provide further qualitative analysis by visualizing the selected patches. As shown in Figure 5, for each input query image, we show 10 class-relevant patches selected using our generated prototype, ranked by their predicted counting error (from low to high). All the 10 selected class-relevant patches exhibit some class specific features. However, not all these patches are suitable to be used as counting exemplars, i.e., some patches only contain parts of the object, and some patches contain some background. By further applying our proposed error predictor, we can identify the most suitable patches with the smallest predicted counting errors.", "bbox": [ 496, 635, 890, 801 ], "page_idx": 5 }, { "type": "text", "text": "5.2. Generalization to Exemplar-based Methods", "text_level": 1, "bbox": [ 498, 815, 870, 830 ], "page_idx": 5 }, { "type": "text", "text": "Our proposed method can be considered as a general patch selection method that is applicable to other visual counters to achieve exemplar-free counting. To verify that, we use our selected patches as the exemplars for three", "bbox": [ 496, 840, 890, 900 ], "page_idx": 5 }, { "type": "page_number", "text": "15553", "bbox": [ 480, 944, 517, 955 ], "page_idx": 5 }, { "type": "image", "img_path": "images/fe4a6ef528c84641fb0e5dd34b44a7a8276d88d070b0e4c619d7316609b7c106.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 178, 90, 285, 167 ], "page_idx": 6 }, { "type": "image", "img_path": "images/8ca765e47c0c7daa9642f1120b10640503f129a405c3ea0307f1142e0fc7fcdb.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 315, 90, 457, 166 ], "page_idx": 6 }, { "type": "image", "img_path": "images/d1909e34066588d405bc4d78523cb7389e762ed28ac84e5b336bbde8d1ade92a.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 475, 90, 616, 167 ], "page_idx": 6 }, { "type": "image", "img_path": "images/94bdd630442b3b673505ae494ab3ffa239ebd0023791386d504855f8c24bc4f2.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 633, 90, 774, 167 ], "page_idx": 6 }, { "type": "image", "img_path": "images/eb3009146f36d56ad021f85e0b4771c8f06a5c28b738f5771aa15c3230cbd957.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 178, 172, 285, 253 ], "page_idx": 6 }, { "type": "image", "img_path": "images/f374c2dfeec04c74b949d57f39d8a02f9f0835f1b3f4d6a9028d61dca898e190.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 315, 172, 457, 253 ], "page_idx": 6 }, { "type": "image", "img_path": "images/8b309d9a73c65e4e982e77d9e88ec2e160d479f751387141841d308fcf13b8b8.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 475, 172, 616, 252 ], "page_idx": 6 }, { "type": "image", "img_path": "images/29b47f7e9b6a9d5ea8fdf3d200a38bfe0d9b75ca54f0b71e926e53ca6fb5f1d6.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 633, 172, 772, 252 ], "page_idx": 6 }, { "type": "image", "img_path": "images/4bc34c2ca1145c11f19f0a3e9fc03a84e2f29e8d5859ac7cd3b0be5486b693f2.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 178, 262, 285, 325 ], "page_idx": 6 }, { "type": "image", "img_path": "images/a44cff7de693c74ae8f4bfd3d996ad58aa1ae282811b5b9f872751ffde832b3b.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 316, 258, 457, 332 ], "page_idx": 6 }, { "type": "image", "img_path": "images/531c80e23d0421edb6b176462146e43fb76a7e403dba021f57de93950817aaf1.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 475, 258, 616, 332 ], "page_idx": 6 }, { "type": "image", "img_path": "images/6b2b203afd898aae2fa9579837ebd56b1f319d0c70f9cab13d61a3f08683ae32.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 633, 258, 772, 332 ], "page_idx": 6 }, { "type": "image", "img_path": "images/330cdba23ac7d59f52bf378aadf8438e3bcadeb2a7bd0b1e8c7b423755924c50.jpg", "image_caption": [ "Figure 4. Qualitative results on the FSC-147 dataset. We show the counting exemplars and the corresponding density maps of ground truth boxes, randomly selected patches, and our selected patches respectively. Predicted counting results are shown at the top-right corner. Our method accurately identifies suitable patches for counting and the predicted density maps are close to the ground truth density maps." ], "image_footnote": [], "bbox": [ 178, 337, 282, 410 ], "page_idx": 6 }, { "type": "image", "img_path": "images/69dbf44a6ceaf9a2dcb2374ab289efdabb0dfd9300461637ca541da95e0d99b0.jpg", "image_caption": [ "Ground Truth" ], "image_footnote": [], "bbox": [ 316, 335, 457, 409 ], "page_idx": 6 }, { "type": "image", "img_path": "images/9158edf2d16c61e5c3520586e1b488792e3cffbdd9fdd417458ba156bad48009.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 475, 335, 616, 409 ], "page_idx": 6 }, { "type": "image", "img_path": "images/289d8be36828979647e6e733900eba80a45585256e711c64af9db544502c13a4.jpg", "image_caption": [ "Ours" ], "image_footnote": [], "bbox": [ 633, 335, 772, 409 ], "page_idx": 6 }, { "type": "image", "img_path": "images/2bf6900cbb2c147be150f90b4bc4c32a82b1862130611c1fbf3e2a15615a7e57.jpg", "image_caption": [ "Figure 5. Qualitative ablation analysis. All the 10 selected class-relevant patches exhibit some class-specific attributes. They are ranked by the predicted counting errors and the final selected patches with the smallest errors are framed in green." ], "image_footnote": [], "bbox": [ 168, 481, 802, 667 ], "page_idx": 6 }, { "type": "table", "img_path": "images/c1827ed886ca7a02a6055278c94d46bb4b724acc6a035c02b093ab5e21bfc5d1.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">Prototype</td><td rowspan=\"2\">Predictor</td><td colspan=\"4\">Val Set</td><td colspan=\"4\">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td>-</td><td>-</td><td>35.20</td><td>106.70</td><td>0.61</td><td>6.68</td><td>31.37</td><td>134.98</td><td>0.52</td><td>5.92</td></tr><tr><td>✓</td><td>-</td><td>28.01</td><td>88.29</td><td>0.39</td><td>4.66</td><td>25.30</td><td>113.82</td><td>0.40</td><td>4.88</td></tr><tr><td>-</td><td>✓</td><td>27.98</td><td>88.62</td><td>0.43</td><td>4.59</td><td>23.80</td><td>128.36</td><td>0.40</td><td>4.43</td></tr><tr><td>✓</td><td>✓</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>", "bbox": [ 78, 719, 470, 791 ], "page_idx": 6 }, { "type": "text", "text": "Table 2. Ablation study on each component's contribution to the final results. We show the effectiveness of the two steps of our framework: selecting class-relevant patches via a generated class prototype and selecting optimal patches via an error predictor.", "bbox": [ 75, 801, 470, 859 ], "page_idx": 6 }, { "type": "text", "text": "other different exemplar-based methods: FamNet [34], BMNet and BMNet+ [38]. Figure 6 (a) shows the results on the FSC-147 validation set. The baseline uses three randomly sampled patches as the exemplars for the pre-trained exemplar-based counter. By using the generated class prototype to select class-relevant patches, the error rate is reduced by 5.18, 8.59 and 5.60 on FamNet, BMNet and BMNet+, respectively. In addition, as the error predictor is additionally adopted, the error rate is further reduced by 1.76, 1.00 and 1.08 on FamNet, BMNet and BMNet+, respectively. Similarly, Figure 6 (b) shows the results on the FSC", "bbox": [ 496, 720, 893, 888 ], "page_idx": 6 }, { "type": "page_number", "text": "15554", "bbox": [ 480, 944, 519, 957 ], "page_idx": 6 }, { "type": "text", "text": "147 test set. Our method achieves consistent performance improvements for all three methods.", "bbox": [ 76, 90, 468, 121 ], "page_idx": 7 }, { "type": "image", "img_path": "images/d2b04911282de7979d4bf2835d8b21d7e9590aa789438c8d8521920c00a25814.jpg", "image_caption": [ "(a)" ], "image_footnote": [], "bbox": [ 94, 142, 433, 284 ], "page_idx": 7 }, { "type": "image", "img_path": "images/9871b996fafadca835a82c199766ca8c4307f6aff46fadae7410b9f81c06a48b.jpg", "image_caption": [ "(b)" ], "image_footnote": [], "bbox": [ 94, 309, 433, 450 ], "page_idx": 7 }, { "type": "text", "text": "5.3. Multi-class Object Counting", "text_level": 1, "bbox": [ 76, 604, 331, 619 ], "page_idx": 7 }, { "type": "text", "text": "Our method can count instances of a specific class given the class name, which is particularly useful when there are multiple classes in the same image. In this section, we show some visualization results in this multi-class scenario. As seen in Figure 7, our method selects patches according to the given class name and count instances from that specific class in the input image. Correspondingly, the heatmap highlights the image regions that are most relevant to the specified class. Here the heatmaps are obtained by correlating the exemplar feature vector with the image feature map in a pre-trained ImageNet feature space. Note that we mask out the image region where the activation value in the heatmap is below a threshold for counting purpose. We also show the patches selected using another exemplar-free counting method, RepRPN [33]. The class of RepRPN selected patches can not be explicitly specified. It simply selects patches from the class with the highest number of instances in the image according to the repetition score.", "bbox": [ 75, 628, 470, 900 ], "page_idx": 7 }, { "type": "image", "img_path": "images/efee905dc8491de7e8ab72a66f303efe9a7bfd45def19d6566416ca8dafa8c6a.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 506, 90, 867, 232 ], "page_idx": 7 }, { "type": "image", "img_path": "images/b2057ff667537b23fb5a12c10c5f78d9a862efe17544dad0c261cde14cdd70eb.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 506, 234, 867, 375 ], "page_idx": 7 }, { "type": "image", "img_path": "images/a21535710190b515d0cc1b8add4a36c28d21c85ccb4ca6cf656c6e1b9f73716e.jpg", "image_caption": [ "Figure 6. Using our selected patches as exemplars for other exemplar-based class-agnostic counting methods (FamNet, BMNet and BMNet+) on FSC-147 dataset. Blue bars are the MAEs of using three randomly sampled patches. Orange bars are the MAEs of using the class prototype to select class-relevant patches as exemplars. Green bars are the MAEs of using the class prototype and error predictor to select optimal patches as exemplars.", "Figure 7. Visualization results of our method in some multi-class examples. Our method selects patches according to the given class name and the corresponding heatmap highlights the relevant areas." ], "image_footnote": [], "bbox": [ 506, 380, 867, 518 ], "page_idx": 7 }, { "type": "text", "text": "6. Conclusion", "text_level": 1, "bbox": [ 500, 607, 617, 622 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we proposed a new task, zero-shot object counting, to count instances of a specific class given only the class name without access to any exemplars. To address this, we developed a simple yet effective method that accurately localizes the optimal patches across the query image that can be used as counting exemplars. Specifically, we construct a class prototype in a pre-trained feature space and use the prototype to select patches that contain objects of interest; then we use an error predictor to select those patches with the smallest predicted errors as the final exemplars for counting. Extensive results demonstrate the effectiveness of our method. We also conduct experiments to show that our selected patches can be used for other exemplar-based counting methods to achieve exemplar-free counting.", "bbox": [ 496, 631, 890, 843 ], "page_idx": 7 }, { "type": "text", "text": "Acknowledgements. This research was partially supported by NSF grants IIS-2123920 and IIS-2212046 and the NASA Biodiversity program (Award 80NSSC21K1027).", "bbox": [ 498, 849, 890, 893 ], "page_idx": 7 }, { "type": "page_number", "text": "15555", "bbox": [ 480, 944, 517, 955 ], "page_idx": 7 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 78, 89, 174, 106 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[1] Shahira Abousamra, Minh Hoai, Dimitris Samaras, and Chao Chen. Localization in the crowd with topological constraints. In AAAI, 2021. 2", "[2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. In ICML, 2017. 3", "[3] Carlos Arteta, Victor S. Lempitsky, Julia Alison Noble, and Andrew Zisserman. Interactive object counting. In ECCV, 2014. 2", "[4] Carlos Arteta, Victor S. Lempitsky, and Andrew Zisserman. Counting in the wild. In ECCV, 2016. 1, 2", "[5] Yuval Atzmon and Gal Chechik. Adaptive confidence smoothing for generalized zero-shot learning. In CVPR, 2019. 3", "[6] Ankan Bansal, Karan Sikka, Gaurav Sharma, Rama Chellappa, and Ajay Divakaran. Zero-shot object detection. In ECCV, 2018. 2", "[7] Antoni B. Chan, Zhang-Sheng John Liang, and Nuno Vasconcelos. Privacy preserving crowd monitoring: Counting people without people models or tracking. In CVPR, 2008. 2", "[8] Prithvijit Chattopadhyay, Ramakrishna Vedantam, Ramprasaath R. Selvaraju, Dhruv Batra, and Devi Parikh. Counting everyday objects in everyday scenes. CVPR, 2017. 2", "[9] Long Chen, Hanwang Zhang, Jun Xiao, W. Liu, and Shih-Fu Chang. Zero-shot visual recognition using semantics-preserving adversarial embedding networks. In CVPR, 2018. 3", "[10] Hisham Cholakkal, Guolei Sun, Fahad Shahbaz Khan, and Ling Shao. Object counting and instance segmentation with image-level supervision. In CVPR, 2019. 2", "[11] Hisham Cholakkal, Guolei Sun, Salman Hameed Khan, Fahad Shahbaz Khan, Ling Shao, and Luc Van Gool. Towards partial supervision for generic object counting in natural scenes. volume 44, 2022. 2", "[12] Andrea Frome, Gregory S. Corrado, Jonathon Shlens, Samy Bengio, Jeffrey Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NIPS, 2013. 3", "[13] Shenjian Gong, Shanshan Zhang, Jian Yang, Dengxin Dai, and Bernt Schiele. Class-agnostic object counting robust to intraclass diversity. In ECCV, 2022. 2", "[14] Meng-Ru Hsieh, Yen-Liang Lin, and Winston H. Hsu. Drone-based object counting by spatially regularized regional proposal network. In ICCV, 2017. 2", "[15] Haroon Idrees, Muhammad Tayyab, Kishan Athrey, Dong Zhang, Somaya Ali Al-Maadeed, Nasir M. Rajpoot, and Mubarak Shah. Composition loss for counting, density map estimation and localization in dense crowds. In ECCV, 2018. 2", "[16] Dinesh Jayaraman and Kristen Grauman. Zero-shot recognition with unreliable attributes. In NIPS, 2014. 3", "[17] Christoph H. Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. CVPR, 2009. 3" ], "bbox": [ 78, 116, 468, 898 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[18] Issam H. Laradji, Negar Rostamzadeh, Pedro H. O. Pinheiro, David Vázquez, and Mark W. Schmidt. Where are the blobs: Counting by localization with point supervision. In ECCV, 2018. 2", "[19] Hieu Le, Bento Goncalves, Dimitris Samaras, and Heather Lynch. Weakly labeling the antarctic: The penguin colony case. In CVPR Workshops, June 2019. 3", "[20] Hieu Le and Dimitris Samaras. Physics-based shadow image decomposition for shadow removal. Los Alamitos, CA, USA. IEEE Computer Society. 3", "[21] Hieu Le and Dimitris Samaras. From shadow segmentation to shadow removal. In ECCV, 2020. 3", "[22] Hieu Le, Tomas F. Yago Vicente, Vu Nguyen, Minh Hoai, and Dimitris Samaras. A+D Net: Training a shadow detector with adversarial shadow attenuation. In ECCV, 2018. 3", "[23] Hieu Le, Chen-Ping Yu, Gregory Zelinsky, and Dimitris Samaras. Co-localization with category-consistent features and geodesic distance propagation. In ICCV Workshop, 2017. 3", "[24] Dongze Lian, Jing Li, Jia Zheng, Weixin Luo, and Shenghua Gao. Density map regression guided detection network for rgb-d crowd counting and localization. CVPR, 2019. 2", "[25] Chang Liu, Yujie Zhong, Andrew Zisserman, and Weidi Xie. Countr: Transformer-based generalised visual counting. In BMVC, 2022. 2", "[26] Weizhe Liu, N. Durasov, and P. Fua. Leveraging self-supervision for cross-domain crowd counting. In CVPR, 2022. 2", "[27] Weizhe Liu, Mathieu Salzmann, and Pascal V. Fua. Context-aware crowd counting. In CVPR, 2019. 2", "[28] Erika Lu, Weidi Xie, and Andrew Zisserman. Class-agnostic counting. In ACCV, 2018. 1, 2, 5, 6", "[29] Terrell N. Mundhenk, Goran Konjevod, Wesam A. Sakla, and Kofi Boakye. A large contextual dataset for classification, detection and counting of cars with deep learning. In ECCV, 2016. 1, 2", "[30] Sanath Narayan, Akshita Gupta, Fahad Shahbaz Khan, Cees G. M. Snoek, and Ling Shao. Latent embedding feedback and discriminative features for zero-shot classification. In ECCV, 2020. 3", "[31] Thanh Nguyen, Chau Pham, Khoi Nguyen, and Minh Hoai. Few-shot object counting and detection. In ECCV, 2022. 2, 5", "[32] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 4, 5", "[33] Viresh Ranjan and Minh Hoai. Exemplar free class agnostic counting. In ACCV, 2022. 1, 2, 3, 5, 6, 8", "[34] Viresh Ranjan, Udbhav Sharma, Thua Nguyen, and Minh Hoai. Learning to count everything. In CVPR, 2021. 1, 2, 3, 5, 6, 7", "[35] Mahdi Rezaei and Mahsa Shahidi. Zero-shot learning and its applications from autonomous vehicles to Covid-19 diagnosis: A review. In Intelligence-Based Medicine, volume 3, 2020. 3" ], "bbox": [ 501, 92, 890, 898 ], "page_idx": 8 }, { "type": "page_number", "text": "15556", "bbox": [ 480, 945, 519, 955 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[36] Bernardino Romero-Paredes and Philip H. S. Torr. An embarrassingly simple approach to zero-shot learning. In ICML, 2015. 3", "[37] Deepak Babu Sam, Abhinav Agarwalla, Jimmy Joseph, Vishwanath A. Sindagi, R. Venkatesh Babu, and Vishal M. Patel. Completely self-supervised crowd counting via distribution matching. In ECCV, 2022. 1, 2", "[38] Min Shi, Hao Lu, Chen Feng, Chengxin Liu, and Zhiguo Cao. Represent, compare, and learn: A similarity-aware framework for class-agnostic counting. In CVPR, 2022. 1, 2, 3, 6, 7", "[39] Vishwanath A. Sindagi, Rajeev Yasarla, and Vishal M. Patel. Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method. In ICCV, 2019. 2", "[40] Jia Wan, Ziquan Liu, and Antoni B. Chan. A generalized loss function for crowd counting and localization. In CVPR, 2021. 2", "[41] Boyu Wang, Huidong Liu, Dimitris Samaras, and Minh Hoai Nguyen. Distribution matching for crowd counting. In NeurIPS, 2020. 2", "[42] Qi Wang, Junyu Gao, Wei Lin, and Xuelong Li. Nwpu-crowd: A large-scale benchmark for crowd counting and localization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43, 2021. 2", "[43] Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh N. Nguyen, Matthias Hein, and Bernt Schiele. Latent embeddings for zero-shot classification. In CVPR, 2016. 3", "[44] Yongqin Xian, Christoph H. Lampert, Bernt Schiele, and Zeynep Akata. Zero-shot learning—a comprehensive evaluation of the good, the bad and the ugly. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41, 2019. 3, 4", "[45] Yongqin Xian, Saurabh Sharma, Bernt Schiele, and Zeynep Akata. F-vaegan-d2: A feature generating framework for any-shot learning. In CVPR, 2019. 3, 4", "[46] Weidi Xie, J. Alison Noble, and Andrew Zisserman. Microscopy cell counting and detection with fully convolutional regression networks. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 6, 2018. 1, 2", "[47] Haipeng Xiong and Angela Yao. Discrete-constrained regression for local counting models. In ECCV, 2022. 2", "[48] Jingyi Xu and Hieu Le. Generating representative samples for few-shot classification. In CVPR, 2022. 3", "[49] Jingyi Xu, Hieu Le, Mingzhen Huang, ShahRukh Athar, and Dimitris Samaras. Variational feature disentangling for fine-grained few-shot classification. In ICCV, 2021. 3", "[50] Shuo Yang, Hung-Ting Su, Winston H. Hsu, and Wen-Chin Chen. Class-agnostic few-shot object counting. In WACV, 2021. 2", "[51] Zhiyuan You, Kai Yang, Wenhan Luo, Xin Lu, Lei Cui, and Xinyi Le. Few-shot object counting with similarity-aware feature enhancement. In WACV, 2023. 2", "[52] Anran Zhang, Lei Yue, Jiayi Shen, Fan Zhu, Xiantong Zhen, Xianbin Cao, and Ling Shao. Attentional neural fields for crowd counting. In ICCV, 2019. 2" ], "bbox": [ 78, 90, 468, 898 ], "page_idx": 9 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[53] Cong Zhang, Hongsheng Li, Xiaogang Wang, and Xiaokang Yang. Cross-scene crowd counting via deep convolutional neural networks. In CVPR, 2015. 2", "[54] Li Zhang, Tao Xiang, and Shaogang Gong. Learning a deep embedding model for zero-shot learning. In CVPR, 2017. 3", "[55] Qi Zhang and Antoni Chan. Calibration-free multi-view crowd counting. In ECCV, 2022. 2", "[56] Yingying Zhang, Desen Zhou, Siqin Chen, Shenghua Gao, and Yi Ma. Single-image crowd counting via multi-column convolutional neural network. In CVPR, 2016. 2", "[57] Ye Zheng, Jiahong Wu, Yongqiang Qin, Faen Zhang, and Li Cui. Zero-shot instance segmentation. In CVPR, 2021. 2" ], "bbox": [ 501, 92, 890, 263 ], "page_idx": 9 }, { "type": "page_number", "text": "15557", "bbox": [ 480, 945, 517, 955 ], "page_idx": 9 }]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332[ [ { "type": "header", "bbox": [ 0.107, 0.003, 0.182, 0.043 ], "angle": 0, "content": "CVF" }, { "type": "header", "bbox": [ 0.237, 0.001, 0.808, 0.047 ], "angle": 0, "content": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore." }, { "type": "title", "bbox": [ 0.345, 0.131, 0.628, 0.154 ], "angle": 0, "content": "Zero-Shot Object Counting" }, { "type": "text", "bbox": [ 0.185, 0.193, 0.782, 0.214 ], "angle": 0, "content": "Jingyi \\(\\mathrm{Xu}^{1}\\), Hieu \\(\\mathrm{Le}^{2}\\), Vu Nguyen\\(^{1}\\), Viresh Ranjan\\(^{*3}\\), and Dimitris Samaras\\(^{1}\\)" }, { "type": "text", "bbox": [ 0.308, 0.223, 0.662, 0.243 ], "angle": 0, "content": "<sup>1</sup>Stony Brook University <sup>2</sup>EPFL <sup>3</sup>Amazon" }, { "type": "title", "bbox": [ 0.235, 0.287, 0.314, 0.303 ], "angle": 0, "content": "Abstract" }, { "type": "text", "bbox": [ 0.076, 0.32, 0.474, 0.653 ], "angle": 0, "content": "Class-agnostic object counting aims to count object instances of an arbitrary class at test time. Current methods for this challenging problem require human-annotated exemplars as inputs, which are often unavailable for novel categories, especially for autonomous systems. Thus, we propose zero-shot object counting (ZSC), a new setting where only the class name is available during test time. Such a counting system does not require human annotators in the loop and can operate automatically. Starting from a class name, we propose a method that can accurately identify the optimal patches which can then be used as counting exemplars. Specifically, we first construct a class prototype to select the patches that are likely to contain the objects of interest, namely class-relevant patches. Furthermore, we introduce a model that can quantitatively measure how suitable an arbitrary patch is as a counting exemplar. By applying this model to all the candidate patches, we can select the most suitable patches as exemplars for counting. Experimental results on a recent class-agnostic counting dataset, FSC-147, validate the effectiveness of our method. Code is available at https://github.com/cvlab-stonybrook/zero-shot-counting." }, { "type": "title", "bbox": [ 0.078, 0.683, 0.21, 0.699 ], "angle": 0, "content": "1. Introduction" }, { "type": "text", "bbox": [ 0.076, 0.709, 0.47, 0.876 ], "angle": 0, "content": "Object counting aims to infer the number of objects in an image. Most of the existing methods focus on counting objects from specialized categories such as human crowds [37], cars [29], animals [4], and cells [46]. These methods count only a single category at a time. Recently, class-agnostic counting [28, 34, 38] has been proposed to count objects of arbitrary categories. Several human-annotated bounding boxes of objects are required to specify the objects of interest (see Figure 1a). However, having humans in the loop is not practical for many real-world applications, such as fully automated wildlife monitoring systems or vi" }, { "type": "image", "bbox": [ 0.56, 0.286, 0.686, 0.435 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.531, 0.438, 0.681, 0.453 ], "angle": 0, "content": "(a) Few-shot Counting" }, { "type": "image", "bbox": [ 0.706, 0.287, 0.832, 0.435 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.707, 0.438, 0.865, 0.453 ], "angle": 0, "content": "(b) Zero-Shot Counting" }, { "type": "image_caption", "bbox": [ 0.498, 0.458, 0.895, 0.542 ], "angle": 0, "content": "Figure 1. Our proposed task of zero-shot object counting (ZSC). Traditional few-shot counting methods require a few exemplars of the object category (a). We propose zero-shot counting where the counter only needs the class name to count the number of object instances. (b). Few-shot counting methods require human annotators at test time while zero-shot counters can be fully automatic." }, { "type": "text", "bbox": [ 0.5, 0.553, 0.717, 0.568 ], "angle": 0, "content": "sual anomaly detection systems." }, { "type": "text", "bbox": [ 0.498, 0.568, 0.892, 0.734 ], "angle": 0, "content": "A more practical setting, exemplar-free class-agnostic counting, has been proposed recently by Ranjan et al. [33]. They introduce RepRPN, which first identifies the objects that occur most frequently in the image, and then uses them as exemplars for object counting. Even though RepRPN does not require any annotated boxes at test time, the method simply counts objects from the class with the highest number of instances. Thus, it can not be used for counting a specific class of interest. The method is only suitable for counting images with a single dominant object class, which limits the potential applicability." }, { "type": "text", "bbox": [ 0.498, 0.735, 0.893, 0.901 ], "angle": 0, "content": "Our goal is to build an exemplar-free object counter where we can specify what to count. To this end, we introduce a new counting task in which the user only needs to provide the name of the class for counting rather than the exemplars (see Figure 1b). In this way, the counting model can not only operate in an automatic manner but also allow the user to define what to count by simply providing the class name. Note that the class to count during test time can be arbitrary. For cases where the test class is completely unseen to the trained model, the counter needs to adapt to the unseen class without any annotated data. Hence, we" }, { "type": "page_footnote", "bbox": [ 0.096, 0.888, 0.294, 0.901 ], "angle": 0, "content": "*Work done prior to joining Amazon" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.52, 0.957 ], "angle": 0, "content": "15548" } ], [ { "type": "text", "bbox": [ 0.076, 0.092, 0.47, 0.122 ], "angle": 0, "content": "name this setting zero-shot object counting (ZSC), inspired by previous zero-shot learning approaches [6, 57]." }, { "type": "text", "bbox": [ 0.076, 0.124, 0.468, 0.289 ], "angle": 0, "content": "To count without any annotated exemplars, our idea is to identify a few patches in the input image containing the target object that can be used as counting exemplars. Here the challenges are twofold: 1) how to localize patches that contain the object of interest based on the provided class name, and 2) how to select good exemplars for counting. Ideally, good object exemplars are visually representative for most instances in the image, which can benefit the object counter. In addition, we want to avoid selecting patches that contain irrelevant objects or backgrounds, which likely lead to incorrect object counts." }, { "type": "text", "bbox": [ 0.076, 0.292, 0.468, 0.398 ], "angle": 0, "content": "To this end, we propose a two-step method that first localizes the class-relevant patches which contain the objects of interest based on the given class name, and then selects among these patches the optimal exemplars for counting. We use these selected exemplars, together with a pre-trained exemplar-based counting model, to achieve exemplar-free object counting." }, { "type": "text", "bbox": [ 0.076, 0.399, 0.468, 0.55 ], "angle": 0, "content": "In particular, to localize the patches containing the objects of interest, we first construct a class prototype in a pretrained embedding space based on the given class name. To construct the class prototype, we train a conditional variational autoencoder (VAE) to generate features for an arbitrary class conditioned on its semantic embedding. The class prototype is computed by taking the average of the generated features. We then select the patches whose embeddings are the \\(k\\)-nearest neighbors of the class prototype as the class-relevant patches." }, { "type": "text", "bbox": [ 0.076, 0.552, 0.468, 0.839 ], "angle": 0, "content": "After obtaining the class-relevant patches, we further select among them the optimal patches to be used as counting exemplars. Here we observe that the feature maps obtained using good exemplars and bad exemplars often exhibit distinguishable differences. An example of the feature maps obtained with different exemplars is shown in Figure 2. The feature map from a good exemplar typically exhibits some repetitive patterns (e.g., the dots on the feature map) that center around the object areas while the patterns from a bad exemplar are more irregular and occur randomly across the image. Based on this observation, we train a model to measure the goodness of an input patch based on its corresponding feature maps. Specifically, given an arbitrary patch and a pre-trained exemplar-based object counter, we train this model to predict the counting error of the counter when using the patch as the exemplar. Here the counting error can indicate the goodness of the exemplar. After this error predictor is trained, we use it to select those patches with the smallest predicted errors as the final exemplars for counting." }, { "type": "text", "bbox": [ 0.076, 0.84, 0.468, 0.901 ], "angle": 0, "content": "Experiments on the FSC-147 dataset show that our method outperforms the previous exemplar-free counting method [33] by a large margin. We also provide analyses to show that patches selected by our method can be" }, { "type": "image", "bbox": [ 0.515, 0.093, 0.885, 0.226 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.499, 0.24, 0.892, 0.297 ], "angle": 0, "content": "Figure 2. Feature maps obtained using different exemplars given a pre-trained exemplar-based counting model. The feature maps obtained using good exemplars typically exhibit some repetitive patterns while the patterns from bad exemplars are more irregular." }, { "type": "text", "bbox": [ 0.499, 0.309, 0.892, 0.354 ], "angle": 0, "content": "used in other exemplar-based counting methods to achieve exemplar-free counting. In short, our main contributions can be summarized as follows:" }, { "type": "text", "bbox": [ 0.518, 0.366, 0.892, 0.426 ], "angle": 0, "content": "- We introduce the task of zero-shot object counting that counts the number of instances of a specific class in the input image, given only the class name and without relying on any human-annotated exemplars." }, { "type": "text", "bbox": [ 0.518, 0.429, 0.892, 0.488 ], "angle": 0, "content": "- We propose a simple yet effective patch selection method that can accurately localize the optimal patches across the query image as exemplars for zero-shot object counting." }, { "type": "text", "bbox": [ 0.518, 0.49, 0.892, 0.534 ], "angle": 0, "content": "- We verify the effectiveness of our method on the FSC-147 dataset, through extensive ablation studies and visualization results." }, { "type": "list", "bbox": [ 0.518, 0.366, 0.892, 0.534 ], "angle": 0, "content": null }, { "type": "title", "bbox": [ 0.5, 0.561, 0.64, 0.577 ], "angle": 0, "content": "2. Related Work" }, { "type": "title", "bbox": [ 0.5, 0.587, 0.771, 0.603 ], "angle": 0, "content": "2.1. Class-specific Object Counting" }, { "type": "text", "bbox": [ 0.498, 0.61, 0.892, 0.822 ], "angle": 0, "content": "Class-specific object counting focuses on counting predefined categories, such as humans [1, 15, 24, 26, 37, 39, 40, 42, 47, 52, 53, 55, 56], animals [4], cells [46], or cars [14, 29]. Generally, existing methods can be categorized into two groups: detection-based methods [8, 14, 18] and regression-based methods [7, 10, 11, 27, 41, 53, 56]. Detection-based methods apply an object detector on the image and count the number of objects based on the detected boxes. Regression-based methods predict a density map for each input image, and the final result is obtained by summing up the pixel values. Both types of methods require abundant training data to learn a good model. Class-specific counters can perform well on trained categories. However, they can not be used to count objects of arbitrary categories at test time." }, { "type": "title", "bbox": [ 0.5, 0.832, 0.779, 0.849 ], "angle": 0, "content": "2.2. Class-agnostic Object Counting" }, { "type": "text", "bbox": [ 0.499, 0.856, 0.892, 0.901 ], "angle": 0, "content": "Class-agnostic object counting aims to count arbitrary categories given only a few exemplars [3, 13, 25, 28, 31, 34, 38, 50, 51]. GMN [28] uses a shared embedding module to" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "15549" } ], [ { "type": "image", "bbox": [ 0.109, 0.092, 0.849, 0.316 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.076, 0.322, 0.896, 0.42 ], "angle": 0, "content": "Figure 3. Overview of the proposed method. We first use a generative model to obtain a class prototype for the given class (e.g. grape) in a pre-trained feature space. Then given an input query image, we randomly sample a number of patches of various sizes and extract the corresponding feature embedding for each patch. We select the patches whose embeddings are the nearest neighbors of the class prototype as class-relevant patches. Then for each of the selected class-relevant patches, we use a pre-trained exemplar-based counting model to obtain the intermediate feature maps. Our proposed error predictor then takes the feature maps as input and predicts the counting error (here we use normalized counting errors). We select the patches with the smallest predicted errors as the final exemplar patches and use them for counting." }, { "type": "text", "bbox": [ 0.076, 0.438, 0.473, 0.62 ], "angle": 0, "content": "extract feature maps for both query images and exemplars, which are then concatenated and fed into a matching module to regress the object count. FamNet [34] adopts a similar way to do correlation matching and further applies test-time adaptation. These methods require human-annotated exemplars as inputs. Recently, Ranjan et al. have proposed RepRPN [33], which achieves exemplar-free counting by identifying exemplars from the most frequent objects via a Region Proposal Network (RPN)-based model. However, the class of interest can not be explicitly specified for the RepRPN. In comparison, our proposed method can count instances of a specific class given only the class name." }, { "type": "title", "bbox": [ 0.078, 0.634, 0.35, 0.65 ], "angle": 0, "content": "2.3. Zero-shot Image Classification" }, { "type": "text", "bbox": [ 0.076, 0.66, 0.473, 0.901 ], "angle": 0, "content": "Zero-shot classification aims to classify unseen categories for which data is not available during training [5, 9, 12, 16, 19, 21, 23, 35, 36]. Semantic descriptors are mostly leveraged as a bridge to enable the knowledge transfer between seen and unseen classes. Earlier zero-shot learning (ZSL) works relate the semantic descriptors with visual features in an embedding space and recognize unseen samples by searching their nearest class-level semantic descriptor in this embedding space [17, 36, 43, 54]. Recently, generative models [20, 22, 48, 49] have been widely employed to synthesize unseen class data to facilitate ZSL [30, 44, 45]. Xian et al. [44] use a conditional Wasserstein Generative Adversarial Network (GAN) [2] to generate unseen features which can then be used to train a discriminative classifier for ZSL. In our method, we also train a generative model conditioned on class-specific semantic embedding. Instead" }, { "type": "text", "bbox": [ 0.499, 0.437, 0.895, 0.484 ], "angle": 0, "content": "of using this generative model to hallucinate data, we use it to compute a prototype for each class. This class prototype is then used to select patches that contain objects of interest." }, { "type": "title", "bbox": [ 0.5, 0.496, 0.593, 0.512 ], "angle": 0, "content": "3. Method" }, { "type": "text", "bbox": [ 0.498, 0.521, 0.895, 0.749 ], "angle": 0, "content": "Figure 3 summarizes our proposed method. Given an input query image and a class label, we first use a generative model to construct a class prototype for the given class in a pre-trained feature space. We then randomly sample a number of patches of various sizes and extract the feature embedding for each patch. The class-relevant patches are those patches whose embeddings are the nearest neighbors of the class prototype in the embedding space. We further use an error predictor to select the patches with the smallest predicted errors as the final exemplars for counting. We use the selected exemplars in an exemplar-based object counter to infer the object counts. For the rest of the paper, we denote this exemplar-based counter as the \"base counting model\". We will first describe how we train this base counting model and then present the details of our patch selection method." }, { "type": "title", "bbox": [ 0.5, 0.757, 0.776, 0.773 ], "angle": 0, "content": "3.1. Training Base Counting Model" }, { "type": "text", "bbox": [ 0.498, 0.78, 0.895, 0.903 ], "angle": 0, "content": "We train our base counting model using abundant training images with annotations. Similar to previous works [34, 38], the base counting model uses the input image and the exemplars to obtain a density map for object counting. The model consists of a feature extractor \\( F \\) and a counter \\( C \\). Given a query image \\( I \\) and an exemplar \\( B \\) of an arbitrary class \\( c \\), we input \\( I \\) and \\( B \\) to the feature extractor to obtain the corresponding output, denoted as \\( F(I) \\) and \\( F(B) \\) re" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.52, 0.958 ], "angle": 0, "content": "15550" } ], [ { "type": "text", "bbox": [ 0.077, 0.092, 0.47, 0.151 ], "angle": 0, "content": "spectively. \\( F(I) \\) is a feature map of size \\( d * h_{I} * w_{I} \\) and \\( F(B) \\) is a feature map of size \\( d * h_{B} * w_{B} \\). We further perform global average pooling on \\( F(B) \\) to form a feature vector \\( b \\) of \\( d \\) dimensions." }, { "type": "text", "bbox": [ 0.077, 0.152, 0.47, 0.213 ], "angle": 0, "content": "After feature extraction, we obtain the similarity map \\(S\\) by correlating the exemplar feature vector \\(b\\) with the image feature map \\(F(I)\\). Specifically, if \\(w_{ij} = F_{ij}(I)\\) is the channel feature at spatial position \\((i,j)\\), \\(S\\) can be computed by:" }, { "type": "equation", "bbox": [ 0.211, 0.226, 0.469, 0.245 ], "angle": 0, "content": "\\[\nS _ {i j} (I, B) = w _ {i j} ^ {T} b. \\tag {1}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.249, 0.469, 0.294 ], "angle": 0, "content": "In the case where \\( n \\) exemplars are given, we use Eq. 1 to calculate \\( n \\) similarity maps, and the final similarity map is the average of these \\( n \\) similarity maps." }, { "type": "text", "bbox": [ 0.077, 0.295, 0.469, 0.355 ], "angle": 0, "content": "We then concatenate the image feature map \\( F(I) \\) with the similarity map \\( S \\), and input them into the counter \\( C \\) to predict a density map \\( D \\). The final predicted count \\( N \\) is obtained by summing over the predicted density map \\( D \\):" }, { "type": "equation", "bbox": [ 0.217, 0.364, 0.469, 0.396 ], "angle": 0, "content": "\\[\nN = \\sum_ {i, j} D _ {(i, j)}, \\tag {2}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.399, 0.469, 0.459 ], "angle": 0, "content": "where \\(D_{(i,j)}\\) denotes the density value for pixel \\((i,j)\\). The supervision signal for training the counting model is the \\(L_{2}\\) loss between the predicted density map and the ground truth density map:" }, { "type": "equation", "bbox": [ 0.168, 0.473, 0.469, 0.49 ], "angle": 0, "content": "\\[\nL _ {\\text {c o u n t}} = \\left\\| D (I, B) - D ^ {*} (I) \\right\\| _ {2} ^ {2}, \\tag {3}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.495, 0.397, 0.511 ], "angle": 0, "content": "where \\(D^{*}\\) denotes the ground truth density map." }, { "type": "title", "bbox": [ 0.077, 0.519, 0.321, 0.536 ], "angle": 0, "content": "3.2. Zero-shot Object Counting" }, { "type": "text", "bbox": [ 0.077, 0.542, 0.469, 0.649 ], "angle": 0, "content": "In this section, we describe how we count objects of any unseen category given only the class name without access to any exemplar. Our strategy is to select a few patches in the image that can be used as exemplars for the base counting model. These patches are selected such that: 1) they contain the objects that we are counting and 2) they benefit the counting model, i.e., lead to small counting errors." }, { "type": "title", "bbox": [ 0.077, 0.666, 0.355, 0.681 ], "angle": 0, "content": "3.2.1 Selecting Class-relevant Patches" }, { "type": "text", "bbox": [ 0.077, 0.689, 0.469, 0.765 ], "angle": 0, "content": "To select patches that contain the objects of interest, we first generate a class prototype based on the given class name using a conditional VAE model. Then we randomly sample a number of patches across the query image and select the class-relevant patches based on the generated prototype." }, { "type": "text", "bbox": [ 0.077, 0.766, 0.469, 0.901 ], "angle": 0, "content": "Class prototype generation. Inspired by previous zero-shot learning approaches [44, 45], we train a conditional VAE model to generate features for an arbitrary class based on the semantic embedding of the class. The semantic embedding is obtained from a pre-trained text-vision model [32] given the corresponding class name. Specifically, we train the VAE model to reconstruct features in a pre-trained ImageNet feature space. The VAE is composed of an Encoder \\( E \\), which maps a visual feature \\( x \\) to a latent code \\( z \\)," }, { "type": "text", "bbox": [ 0.499, 0.092, 0.892, 0.15 ], "angle": 0, "content": "and a decoder \\( G \\) which reconstructs \\( x \\) from \\( z \\). Both \\( E \\) and \\( G \\) are conditioned on the semantic embedding \\( a \\). The loss function for training this VAE for an input feature \\( x \\) can be defined as:" }, { "type": "equation", "bbox": [ 0.586, 0.161, 0.892, 0.198 ], "angle": 0, "content": "\\[\n\\begin{array}{l} L _ {V} (x) = \\operatorname {K L} (q (z | x, a) | | p (z | a)) \\tag {4} \\\\ - \\mathrm {E} _ {q (z | x, a)} [ \\log p (x | z, a) ]. \\\\ \\end{array}\n\\]" }, { "type": "text", "bbox": [ 0.499, 0.207, 0.892, 0.296 ], "angle": 0, "content": "The first term is the Kullback-Leibler divergence between the VAE posterior \\( q(z|x,a) \\) and a prior distribution \\( p(z|a) \\). The second term is the decoder's reconstruction error. \\( q(z|x,a) \\) is modeled as \\( E(x,a) \\) and \\( p(x|z,a) \\) is equal to \\( G(z,a) \\). The prior distribution is assumed to be \\( \\mathcal{N}(0,I) \\) for all classes." }, { "type": "text", "bbox": [ 0.499, 0.298, 0.892, 0.373 ], "angle": 0, "content": "We can use the trained VAE to generate the class prototype for an arbitrary target class for counting. Specifically, given the target class name \\( y \\), we first generate a set of features by inputting the respective semantic vector \\( a^y \\) and a noise vector \\( z \\) to the decoder \\( G \\):" }, { "type": "equation", "bbox": [ 0.57, 0.386, 0.892, 0.403 ], "angle": 0, "content": "\\[\n\\mathbb {G} ^ {y} = \\{\\hat {x} | \\hat {x} = G (z, y), z \\sim \\mathcal {N} (0, I) \\}. \\tag {5}\n\\]" }, { "type": "text", "bbox": [ 0.499, 0.414, 0.892, 0.444 ], "angle": 0, "content": "The class prototype \\(\\mathfrak{p}^y\\) is computed by taking the mean of all the features generated by VAE:" }, { "type": "equation", "bbox": [ 0.624, 0.455, 0.892, 0.487 ], "angle": 0, "content": "\\[\n\\mathrm {p} ^ {y} = \\frac {1}{| \\mathbb {G} ^ {y} |} \\sum_ {\\hat {x} \\in \\mathbb {G} ^ {y}} \\hat {x} \\tag {6}\n\\]" }, { "type": "text", "bbox": [ 0.499, 0.496, 0.892, 0.739 ], "angle": 0, "content": "Class-relevant patch selection. The generated class prototype can be considered as a class center representing the distribution of features of the corresponding class in the embedding space. Using the class prototype, we can select the class-relevant patches across the query image. Specifically, we first randomly sample \\( M \\) patches of various sizes \\( \\{b_1, b_2, \\dots, b_m\\} \\) across the query image and extract their corresponding ImageNet features \\( \\{f_1, f_2, \\dots, f_m\\} \\). To select the class-relevant patches, we calculate the \\( L_2 \\) distance between the class prototype and the patch embedding, namely \\( d_i = \\| f_i - \\mathrm{p}^y\\|_2 \\). Then we select the patches whose embeddings are the \\( k \\)-nearest neighbors of the class prototype as the class-relevant patches. Since the ImageNet feature space is highly discriminative, i.e., features close to each other typically belong to the same class, the selected patches are likely to contain the objects of the target class." }, { "type": "title", "bbox": [ 0.5, 0.757, 0.791, 0.772 ], "angle": 0, "content": "3.2.2 Selecting Exemplars for Counting" }, { "type": "text", "bbox": [ 0.499, 0.78, 0.892, 0.901 ], "angle": 0, "content": "Given a set of class-relevant patches and a pre-trained exemplar-based object counter, we aim to select a few exemplars from these patches that are optimal for counting. To do so, we introduce an error prediction network that predicts the counting error of an arbitrary patch when the patch is used as the exemplar. The counting error is calculated from the pre-trained counting model. Specifically, to train this error predictor, given a query image \\(\\bar{I}\\) and an arbitrary patch" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.518, 0.957 ], "angle": 0, "content": "15551" } ], [ { "type": "text", "bbox": [ 0.077, 0.091, 0.47, 0.152 ], "angle": 0, "content": "\\(\\bar{B}\\) cropped from \\(\\bar{I}\\), we first use the base counting model to get the image feature map \\(F(\\bar{I})\\), similarity map \\(\\bar{S}\\), and the final predicted density map \\(\\bar{D}\\). The counting error of the base counting model can be written as:" }, { "type": "equation", "bbox": [ 0.193, 0.164, 0.47, 0.197 ], "angle": 0, "content": "\\[\n\\epsilon = \\left| \\sum_ {i, j} \\bar {D} _ {(i, j)} - \\bar {N} ^ {*} \\right|, \\tag {7}\n\\]" }, { "type": "text", "bbox": [ 0.077, 0.202, 0.469, 0.263 ], "angle": 0, "content": "where \\(\\bar{N}^*\\) denotes the ground truth object count in image \\(\\bar{I}\\). \\(\\epsilon\\) can be used to measure the goodness of \\(\\bar{B}\\) as an exemplar for \\(\\bar{I}\\), i.e., a small \\(\\epsilon\\) indicates that \\(\\bar{B}\\) is a suitable exemplar for counting and vice versa." }, { "type": "text", "bbox": [ 0.076, 0.264, 0.469, 0.369 ], "angle": 0, "content": "The error predictor \\( R \\) is trained to regress the counting error produced by the base counting model. The input of \\( R \\) is the channel-wise concatenation of the image feature map \\( F(\\bar{I}) \\) and the similarity map \\( \\tilde{S} \\). The training objective is the minimization of the mean squared error between the output of the predictor \\( R(F(\\bar{I}),\\bar{S}) \\) and the actual counting error produced by the base counting model \\( \\epsilon \\)." }, { "type": "text", "bbox": [ 0.076, 0.37, 0.469, 0.491 ], "angle": 0, "content": "After the error predictor is trained, we can use it to select the optimal patches for counting. The candidates for selection here are the class-relevant patches selected by the class prototype in the previous step. For each candidate patch, we use the trained error predictor to infer the counting error when it is being used as the exemplar. The final selected patches for counting are the patches that yield the top-\\(s\\) smallest counting errors." }, { "type": "title", "bbox": [ 0.077, 0.511, 0.414, 0.527 ], "angle": 0, "content": "3.2.3 Using the Selected Patches as Exemplars" }, { "type": "text", "bbox": [ 0.076, 0.535, 0.469, 0.657 ], "angle": 0, "content": "Using the error predictor, we predict the error for each candidate patch and select the patches that lead to the smallest counting errors. The selected patches can then be used as exemplars for the base counting model to get the density map and the final count. We also conduct experiments to show that these selected patches can serve as exemplars for other exemplar-based counting models to achieve exemplar-free class-agnostic counting." }, { "type": "title", "bbox": [ 0.077, 0.671, 0.21, 0.688 ], "angle": 0, "content": "4. Experiments" }, { "type": "title", "bbox": [ 0.077, 0.696, 0.295, 0.712 ], "angle": 0, "content": "4.1. Implementation Details" }, { "type": "text", "bbox": [ 0.076, 0.72, 0.469, 0.901 ], "angle": 0, "content": "Network architecture For the base counting model, we use ResNet-50 as the backbone of the feature extractor, initialized with the weights of a pre-trained ImageNet model. The backbone outputs feature maps of 1024 channels. For each query image, the number of channels is reduced to 256 using an \\(1 \\times 1\\) convolution. For each exemplar, the feature maps are first processed with global average pooling and then linearly mapped to obtain a 256-d feature vector. The counter consists of 5 convolutional and bilinear upsampling layers to regress a density map of the same size as the query image. For the feature generation model, both the encoder and the decoder are two-layer fully-connected" }, { "type": "text", "bbox": [ 0.498, 0.092, 0.892, 0.198 ], "angle": 0, "content": "(FC) networks with 4096 hidden units. LeakyReLU and ReLU are the non-linear activation functions in the hidden and output layers, respectively. The dimensions of the latent space and the semantic embeddings are both set to be 512. For the error predictor, 5 convolutional and bilinear upsampling layers are followed by a linear layer to output the counting error." }, { "type": "text", "bbox": [ 0.498, 0.198, 0.892, 0.333 ], "angle": 0, "content": "Dataset We use the FSC-147 dataset [34] to train the base counting model and the error predictor. FSC-147 is the first large-scale dataset for class-agnostic counting. It includes 6135 images from 147 categories varying from animals, kitchen utensils, to vehicles. The categories in the training, validation, and test sets do not overlap. The feature generator is trained on the MS-COCO detection dataset. Note that the previous exemplar-free method [33] also uses MS-COCO to pre-train their counter." }, { "type": "text", "bbox": [ 0.498, 0.334, 0.892, 0.576 ], "angle": 0, "content": "Training details Both the base counting model and the error predictor are trained using the AdamW optimizer with a fixed learning rate of \\(10^{-5}\\). The base counting model is trained for 300 epochs with a batch size of 8. We resize the input query image to a fixed height of 384, and the width is adjusted accordingly to preserve the aspect ratio of the original image. Exemplars are resized to \\(128 \\times 128\\) before being input into the feature extractor. The feature generation model is trained using the Adam optimizer and the learning rate is set to be \\(10^{-4}\\). The semantic embeddings are extracted from CLIP [32]. To select the class-relevant patches, we randomly sample 450 boxes of various sizes across the input query image and select 10 patches whose embeddings are the 10-nearest neighbors of the class prototype. The final selected patches are those that yield the top-3 smallest counting errors predicted by the error predictor." }, { "type": "title", "bbox": [ 0.5, 0.585, 0.685, 0.6 ], "angle": 0, "content": "4.2. Evaluation Metrics" }, { "type": "text", "bbox": [ 0.498, 0.608, 0.892, 0.763 ], "angle": 0, "content": "We use Mean Average Error (MAE) and Root Mean Squared Error (RMSE) to measure the performance of different object counters. Besides, we follow [31] to report the Normalized Relative Error (NAE) and Squared Relative Error (SRE). In particular, MAE = \\(\\frac{1}{n}\\sum_{i=1}^{n}|y_i - \\hat{y}_i|\\); RMSE = \\(\\sqrt{\\frac{1}{n}\\sum_{i=1}^{n}(y_i - \\hat{y}_i)^2}\\); NAE = \\(\\frac{1}{n}\\sum_{i=1}^{n}\\frac{|y_i - \\hat{y}_i|}{y_i}\\); SRE = \\(\\sqrt{\\frac{1}{n}\\sum_{i=1}^{n}\\frac{(y_i - \\hat{y}_i)^2}{y_i}}\\) where \\(n\\) is the number of test images, and \\(y_i\\) and \\(\\hat{y}_i\\) are the ground truth and the predicted number of objects for image \\(i\\) respectively." }, { "type": "title", "bbox": [ 0.5, 0.772, 0.696, 0.789 ], "angle": 0, "content": "4.3. Comparing Methods" }, { "type": "text", "bbox": [ 0.498, 0.796, 0.892, 0.901 ], "angle": 0, "content": "We compare our method with the previous works on class-agnostic counting. RepRPN-Counter [33] is the only previous class-agnostic counting method that does not require human-annotated exemplars as input. In order to make other exemplar based class-agnostic methods including GMN (General Matching Network [28]), FamNet (Few-shot adaptation and matching Network [34]) and BMNet" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "15552" } ], [ { "type": "table", "bbox": [ 0.192, 0.089, 0.782, 0.296 ], "angle": 0, "content": "<table><tr><td rowspan=\"2\">Method</td><td rowspan=\"2\">Exemplars</td><td colspan=\"4\">Val Set</td><td colspan=\"4\">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td rowspan=\"2\">GMN [28]</td><td>GT</td><td>29.66</td><td>89.81</td><td>-</td><td>-</td><td>26.52</td><td>124.57</td><td>-</td><td>-</td></tr><tr><td>RPN</td><td>40.96</td><td>108.47</td><td>-</td><td>-</td><td>39.72</td><td>142.81</td><td>-</td><td>-</td></tr><tr><td rowspan=\"2\">FamNet+ [34]</td><td>GT</td><td>23.75</td><td>69.07</td><td>0.52</td><td>4.25</td><td>22.08</td><td>99.54</td><td>0.44</td><td>6.45</td></tr><tr><td>RPN</td><td>42.85</td><td>121.59</td><td>0.75</td><td>6.94</td><td>42.70</td><td>146.08</td><td>0.74</td><td>7.14</td></tr><tr><td rowspan=\"2\">BMNet [38]</td><td>GT</td><td>19.06</td><td>67.95</td><td>0.26</td><td>4.39</td><td>16.71</td><td>103.31</td><td>0.26</td><td>3.32</td></tr><tr><td>RPN</td><td>37.26</td><td>108.54</td><td>0.42</td><td>5.43</td><td>37.22</td><td>143.13</td><td>0.41</td><td>5.31</td></tr><tr><td rowspan=\"2\">BMNet+ [38]</td><td>GT</td><td>15.74</td><td>58.53</td><td>0.27</td><td>6.57</td><td>14.62</td><td>91.83</td><td>0.25</td><td>2.74</td></tr><tr><td>RPN</td><td>35.15</td><td>106.07</td><td>0.41</td><td>5.28</td><td>34.52</td><td>132.64</td><td>0.39</td><td>5.26</td></tr><tr><td>RepRPN-Counter [33]</td><td>-</td><td>30.40</td><td>98.73</td><td>-</td><td>-</td><td>27.45</td><td>129.69</td><td>-</td><td>-</td></tr><tr><td rowspan=\"3\">Ours (Base)</td><td>GT</td><td>18.55</td><td>61.12</td><td>0.30</td><td>3.18</td><td>20.68</td><td>109.14</td><td>0.36</td><td>7.63</td></tr><tr><td>RPN</td><td>32.19</td><td>99.21</td><td>0.38</td><td>4.80</td><td>29.25</td><td>130.65</td><td>0.35</td><td>4.35</td></tr><tr><td>Patch-Selection</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.076, 0.3, 0.895, 0.342 ], "angle": 0, "content": "Table 1. Quantitative comparisons on the FSC-147 dataset. \"GT\" denotes using human-annotated boxes as exemplars. \"RPN\" denotes using the top-3 RPN proposals with the highest objectness scores as exemplars. \"Patch-Selection\" denotes using our selected patches as exemplars." }, { "type": "text", "bbox": [ 0.076, 0.358, 0.473, 0.479 ], "angle": 0, "content": "(Bilinear Matching Network [38]) work in the exemplar-free setup, we replace the human-provided exemplars with the exemplars generated by a pre-trained object detector. Specifically, we use the RPN of Faster RCNN pre-trained on MS-COCO dataset and select the top-3 proposals with the highest objectness score as the exemplars. We also include the performance of these methods using human-annotated exemplars for a complete comparison." }, { "type": "title", "bbox": [ 0.077, 0.495, 0.172, 0.51 ], "angle": 0, "content": "4.4. Results" }, { "type": "text", "bbox": [ 0.076, 0.521, 0.47, 0.763 ], "angle": 0, "content": "Quantitative results. As shown in Table 1, our proposed method outperforms the previous exemplar-free counting method [33] by a large margin, resulting in a reduction of 10.10 w.r.t. the validation RMSE and 14.52 w.r.t. the test RMSE. We also notice that the performance of all exemplar-based counting methods drops significantly when replacing human-annotated exemplars with RPN generated proposals. The state-of-the-art exemplar-based method BMNet+ [38], for example, shows an 19.90 error increase w.r.t. the test MAE and a 40.81 increase w.r.t. the test RMSE. In comparison, the performance gap is much smaller when using our selected patches as exemplars, as reflected by a 1.41 increase w.r.t. the test MAE and a 6.03 increase w.r.t. the test RMSE. Noticeably, the NAE and the SRE on the test set are even reduced when using our selected patches compared with the human-annotated exemplars." }, { "type": "text", "bbox": [ 0.076, 0.765, 0.471, 0.903 ], "angle": 0, "content": "Qualitative analysis. In Figure 4, we present a few input images, the image patches selected by our method, and the corresponding density maps. Our method effectively identifies the patches that are suitable for object counting. The density maps produced by our selected patches are meaningful and close to the density maps produced by human-annotated patches. The counting model with random image patches as exemplars, in comparison, fails to output meaningful density maps and infers incorrect object counts." }, { "type": "title", "bbox": [ 0.5, 0.356, 0.6, 0.373 ], "angle": 0, "content": "5. Analyses" }, { "type": "title", "bbox": [ 0.5, 0.382, 0.665, 0.398 ], "angle": 0, "content": "5.1. Ablation Studies" }, { "type": "text", "bbox": [ 0.498, 0.408, 0.892, 0.633 ], "angle": 0, "content": "Our proposed patch selection method consists of two steps: the selection of class-relevant patches via a generated class prototype and the selection of the optimal patches via an error predictor. We analyze the contribution of each step quantitatively and qualitatively. Quantitative results are in Table 2. We first evaluate the performance of our baseline, i.e. using 3 randomly sampled patches as exemplars without any selection step. As shown in Table 2, using the class prototype to select class-relevant patches reduces the error rate by 7.19 and 6.07 on the validation and test set of MAE, respectively. Applying the error predictor can improve the baseline performance by 7.22 on the validation MAE and 7.57 on the test MAE. Finally, applying the two components together further boosts performance, achieving 26.93 on the validation MAE and 22.09 on the test MAE." }, { "type": "text", "bbox": [ 0.498, 0.636, 0.892, 0.803 ], "angle": 0, "content": "We provide further qualitative analysis by visualizing the selected patches. As shown in Figure 5, for each input query image, we show 10 class-relevant patches selected using our generated prototype, ranked by their predicted counting error (from low to high). All the 10 selected class-relevant patches exhibit some class specific features. However, not all these patches are suitable to be used as counting exemplars, i.e., some patches only contain parts of the object, and some patches contain some background. By further applying our proposed error predictor, we can identify the most suitable patches with the smallest predicted counting errors." }, { "type": "title", "bbox": [ 0.499, 0.816, 0.871, 0.832 ], "angle": 0, "content": "5.2. Generalization to Exemplar-based Methods" }, { "type": "text", "bbox": [ 0.498, 0.841, 0.892, 0.901 ], "angle": 0, "content": "Our proposed method can be considered as a general patch selection method that is applicable to other visual counters to achieve exemplar-free counting. To verify that, we use our selected patches as the exemplars for three" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.519, 0.957 ], "angle": 0, "content": "15553" } ], [ { "type": "image", "bbox": [ 0.179, 0.092, 0.286, 0.168 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.316, 0.092, 0.459, 0.167 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.476, 0.092, 0.617, 0.168 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.634, 0.092, 0.775, 0.169 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.179, 0.174, 0.286, 0.255 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.316, 0.174, 0.459, 0.254 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.476, 0.174, 0.617, 0.253 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.634, 0.174, 0.774, 0.253 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.179, 0.263, 0.286, 0.326 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.317, 0.259, 0.459, 0.333 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.476, 0.259, 0.617, 0.333 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.634, 0.259, 0.774, 0.333 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.179, 0.338, 0.284, 0.411 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.317, 0.337, 0.459, 0.41 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.476, 0.337, 0.617, 0.41 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.634, 0.337, 0.774, 0.41 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.358, 0.414, 0.441, 0.426 ], "angle": 0, "content": "Ground Truth" }, { "type": "image_caption", "bbox": [ 0.69, 0.414, 0.722, 0.426 ], "angle": 0, "content": "Ours" }, { "type": "image_caption", "bbox": [ 0.076, 0.43, 0.895, 0.473 ], "angle": 0, "content": "Figure 4. Qualitative results on the FSC-147 dataset. We show the counting exemplars and the corresponding density maps of ground truth boxes, randomly selected patches, and our selected patches respectively. Predicted counting results are shown at the top-right corner. Our method accurately identifies suitable patches for counting and the predicted density maps are close to the ground truth density maps." }, { "type": "image", "bbox": [ 0.169, 0.482, 0.803, 0.668 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.076, 0.674, 0.893, 0.703 ], "angle": 0, "content": "Figure 5. Qualitative ablation analysis. All the 10 selected class-relevant patches exhibit some class-specific attributes. They are ranked by the predicted counting errors and the final selected patches with the smallest errors are framed in green." }, { "type": "table", "bbox": [ 0.08, 0.72, 0.472, 0.792 ], "angle": 0, "content": "<table><tr><td rowspan=\"2\">Prototype</td><td rowspan=\"2\">Predictor</td><td colspan=\"4\">Val Set</td><td colspan=\"4\">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td>-</td><td>-</td><td>35.20</td><td>106.70</td><td>0.61</td><td>6.68</td><td>31.37</td><td>134.98</td><td>0.52</td><td>5.92</td></tr><tr><td>✓</td><td>-</td><td>28.01</td><td>88.29</td><td>0.39</td><td>4.66</td><td>25.30</td><td>113.82</td><td>0.40</td><td>4.88</td></tr><tr><td>-</td><td>✓</td><td>27.98</td><td>88.62</td><td>0.43</td><td>4.59</td><td>23.80</td><td>128.36</td><td>0.40</td><td>4.43</td></tr><tr><td>✓</td><td>✓</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>" }, { "type": "table_caption", "bbox": [ 0.076, 0.803, 0.471, 0.86 ], "angle": 0, "content": "Table 2. Ablation study on each component's contribution to the final results. We show the effectiveness of the two steps of our framework: selecting class-relevant patches via a generated class prototype and selecting optimal patches via an error predictor." }, { "type": "text", "bbox": [ 0.498, 0.721, 0.895, 0.889 ], "angle": 0, "content": "other different exemplar-based methods: FamNet [34], BMNet and BMNet+ [38]. Figure 6 (a) shows the results on the FSC-147 validation set. The baseline uses three randomly sampled patches as the exemplars for the pre-trained exemplar-based counter. By using the generated class prototype to select class-relevant patches, the error rate is reduced by 5.18, 8.59 and 5.60 on FamNet, BMNet and BMNet+, respectively. In addition, as the error predictor is additionally adopted, the error rate is further reduced by 1.76, 1.00 and 1.08 on FamNet, BMNet and BMNet+, respectively. Similarly, Figure 6 (b) shows the results on the FSC" }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.52, 0.958 ], "angle": 0, "content": "15554" } ], [ { "type": "text", "bbox": [ 0.078, 0.092, 0.47, 0.122 ], "angle": 0, "content": "147 test set. Our method achieves consistent performance improvements for all three methods." }, { "type": "image", "bbox": [ 0.096, 0.143, 0.434, 0.285 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.267, 0.293, 0.284, 0.304 ], "angle": 0, "content": "(a)" }, { "type": "image", "bbox": [ 0.096, 0.31, 0.434, 0.452 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.266, 0.459, 0.284, 0.47 ], "angle": 0, "content": "(b)" }, { "type": "image_caption", "bbox": [ 0.076, 0.483, 0.47, 0.581 ], "angle": 0, "content": "Figure 6. Using our selected patches as exemplars for other exemplar-based class-agnostic counting methods (FamNet, BMNet and BMNet+) on FSC-147 dataset. Blue bars are the MAEs of using three randomly sampled patches. Orange bars are the MAEs of using the class prototype to select class-relevant patches as exemplars. Green bars are the MAEs of using the class prototype and error predictor to select optimal patches as exemplars." }, { "type": "title", "bbox": [ 0.077, 0.605, 0.332, 0.621 ], "angle": 0, "content": "5.3. Multi-class Object Counting" }, { "type": "text", "bbox": [ 0.076, 0.629, 0.471, 0.901 ], "angle": 0, "content": "Our method can count instances of a specific class given the class name, which is particularly useful when there are multiple classes in the same image. In this section, we show some visualization results in this multi-class scenario. As seen in Figure 7, our method selects patches according to the given class name and count instances from that specific class in the input image. Correspondingly, the heatmap highlights the image regions that are most relevant to the specified class. Here the heatmaps are obtained by correlating the exemplar feature vector with the image feature map in a pre-trained ImageNet feature space. Note that we mask out the image region where the activation value in the heatmap is below a threshold for counting purpose. We also show the patches selected using another exemplar-free counting method, RepRPN [33]. The class of RepRPN selected patches can not be explicitly specified. It simply selects patches from the class with the highest number of instances in the image according to the repetition score." }, { "type": "image", "bbox": [ 0.507, 0.092, 0.869, 0.233 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.508, 0.236, 0.869, 0.375 ], "angle": 0, "content": null }, { "type": "image", "bbox": [ 0.508, 0.381, 0.869, 0.52 ], "angle": 0, "content": null }, { "type": "image_caption", "bbox": [ 0.499, 0.54, 0.892, 0.584 ], "angle": 0, "content": "Figure 7. Visualization results of our method in some multi-class examples. Our method selects patches according to the given class name and the corresponding heatmap highlights the relevant areas." }, { "type": "title", "bbox": [ 0.5, 0.608, 0.619, 0.623 ], "angle": 0, "content": "6. Conclusion" }, { "type": "text", "bbox": [ 0.498, 0.632, 0.892, 0.844 ], "angle": 0, "content": "In this paper, we proposed a new task, zero-shot object counting, to count instances of a specific class given only the class name without access to any exemplars. To address this, we developed a simple yet effective method that accurately localizes the optimal patches across the query image that can be used as counting exemplars. Specifically, we construct a class prototype in a pre-trained feature space and use the prototype to select patches that contain objects of interest; then we use an error predictor to select those patches with the smallest predicted errors as the final exemplars for counting. Extensive results demonstrate the effectiveness of our method. We also conduct experiments to show that our selected patches can be used for other exemplar-based counting methods to achieve exemplar-free counting." }, { "type": "text", "bbox": [ 0.499, 0.85, 0.892, 0.895 ], "angle": 0, "content": "Acknowledgements. This research was partially supported by NSF grants IIS-2123920 and IIS-2212046 and the NASA Biodiversity program (Award 80NSSC21K1027)." }, { "type": "page_number", "bbox": [ 0.481, 0.945, 0.518, 0.957 ], "angle": 0, "content": "15555" } ], [ { "type": "title", "bbox": [ 0.08, 0.09, 0.175, 0.107 ], "angle": 0, "content": "References" }, { "type": "ref_text", "bbox": [ 0.087, 0.117, 0.47, 0.158 ], "angle": 0, "content": "[1] Shahira Abousamra, Minh Hoai, Dimitris Samaras, and Chao Chen. Localization in the crowd with topological constraints. In AAAI, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.16, 0.468, 0.188 ], "angle": 0, "content": "[2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. In ICML, 2017. 3" }, { "type": "ref_text", "bbox": [ 0.087, 0.19, 0.468, 0.231 ], "angle": 0, "content": "[3] Carlos Arteta, Victor S. Lempitsky, Julia Alison Noble, and Andrew Zisserman. Interactive object counting. In ECCV, 2014. 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.234, 0.468, 0.261 ], "angle": 0, "content": "[4] Carlos Arteta, Victor S. Lempitsky, and Andrew Zisserman. Counting in the wild. In ECCV, 2016. 1, 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.264, 0.468, 0.304 ], "angle": 0, "content": "[5] Yuval Atzmon and Gal Chechik. Adaptive confidence smoothing for generalized zero-shot learning. In CVPR, 2019. 3" }, { "type": "ref_text", "bbox": [ 0.087, 0.308, 0.468, 0.348 ], "angle": 0, "content": "[6] Ankan Bansal, Karan Sikka, Gaurav Sharma, Rama Chellappa, and Ajay Divakaran. Zero-shot object detection. In ECCV, 2018. 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.352, 0.468, 0.405 ], "angle": 0, "content": "[7] Antoni B. Chan, Zhang-Sheng John Liang, and Nuno Vasconcelos. Privacy preserving crowd monitoring: Counting people without people models or tracking. In CVPR, 2008. 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.409, 0.468, 0.451 ], "angle": 0, "content": "[8] Prithvijit Chattopadhyay, Ramakrishna Vedantam, Ramprasaath R. Selvaraju, Dhruv Batra, and Devi Parikh. Counting everyday objects in everyday scenes. CVPR, 2017. 2" }, { "type": "ref_text", "bbox": [ 0.087, 0.453, 0.468, 0.507 ], "angle": 0, "content": "[9] Long Chen, Hanwang Zhang, Jun Xiao, W. Liu, and Shih-Fu Chang. Zero-shot visual recognition using semantics-preserving adversarial embedding networks. In CVPR, 2018. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.511, 0.468, 0.552 ], "angle": 0, "content": "[10] Hisham Cholakkal, Guolei Sun, Fahad Shahbaz Khan, and Ling Shao. Object counting and instance segmentation with image-level supervision. In CVPR, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.555, 0.468, 0.609 ], "angle": 0, "content": "[11] Hisham Cholakkal, Guolei Sun, Salman Hameed Khan, Fahad Shahbaz Khan, Ling Shao, and Luc Van Gool. Towards partial supervision for generic object counting in natural scenes. volume 44, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.612, 0.468, 0.667 ], "angle": 0, "content": "[12] Andrea Frome, Gregory S. Corrado, Jonathon Shlens, Samy Bengio, Jeffrey Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NIPS, 2013. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.67, 0.468, 0.711 ], "angle": 0, "content": "[13] Shenjian Gong, Shanshan Zhang, Jian Yang, Dengxin Dai, and Bernt Schiele. Class-agnostic object counting robust to intraclass diversity. In ECCV, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.714, 0.468, 0.755 ], "angle": 0, "content": "[14] Meng-Ru Hsieh, Yen-Liang Lin, and Winston H. Hsu. Drone-based object counting by spatially regularized regional proposal network. In ICCV, 2017. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.758, 0.468, 0.826 ], "angle": 0, "content": "[15] Haroon Idrees, Muhammad Tayyab, Kishan Athrey, Dong Zhang, Somaya Ali Al-Maadeed, Nasir M. Rajpoot, and Mubarak Shah. Composition loss for counting, density map estimation and localization in dense crowds. In ECCV, 2018. 2" }, { "type": "ref_text", "bbox": [ 0.08, 0.829, 0.468, 0.856 ], "angle": 0, "content": "[16] Dinesh Jayaraman and Kristen Grauman. Zero-shot recognition with unreliable attributes. In NIPS, 2014. 3" }, { "type": "ref_text", "bbox": [ 0.08, 0.859, 0.468, 0.9 ], "angle": 0, "content": "[17] Christoph H. Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. CVPR, 2009. 3" }, { "type": "list", "bbox": [ 0.08, 0.117, 0.47, 0.9 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.503, 0.093, 0.892, 0.147 ], "angle": 0, "content": "[18] Issam H. Laradji, Negar Rostamzadeh, Pedro H. O. Pinheiro, David Vázquez, and Mark W. Schmidt. Where are the blobs: Counting by localization with point supervision. In ECCV, 2018. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.149, 0.892, 0.189 ], "angle": 0, "content": "[19] Hieu Le, Bento Goncalves, Dimitris Samaras, and Heather Lynch. Weakly labeling the antarctic: The penguin colony case. In CVPR Workshops, June 2019. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.19, 0.892, 0.232 ], "angle": 0, "content": "[20] Hieu Le and Dimitris Samaras. Physics-based shadow image decomposition for shadow removal. Los Alamitos, CA, USA. IEEE Computer Society. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.233, 0.892, 0.259 ], "angle": 0, "content": "[21] Hieu Le and Dimitris Samaras. From shadow segmentation to shadow removal. In ECCV, 2020. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.261, 0.892, 0.3 ], "angle": 0, "content": "[22] Hieu Le, Tomas F. Yago Vicente, Vu Nguyen, Minh Hoai, and Dimitris Samaras. A+D Net: Training a shadow detector with adversarial shadow attenuation. In ECCV, 2018. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.302, 0.892, 0.355 ], "angle": 0, "content": "[23] Hieu Le, Chen-Ping Yu, Gregory Zelinsky, and Dimitris Samaras. Co-localization with category-consistent features and geodesic distance propagation. In ICCV Workshop, 2017. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.357, 0.892, 0.399 ], "angle": 0, "content": "[24] Dongze Lian, Jing Li, Jia Zheng, Weixin Luo, and Shenghua Gao. Density map regression guided detection network for rgb-d crowd counting and localization. CVPR, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.4, 0.892, 0.44 ], "angle": 0, "content": "[25] Chang Liu, Yujie Zhong, Andrew Zisserman, and Weidi Xie. Countr: Transformer-based generalised visual counting. In BMVC, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.442, 0.892, 0.481 ], "angle": 0, "content": "[26] Weizhe Liu, N. Durasov, and P. Fua. Leveraging self-supervision for cross-domain crowd counting. In CVPR, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.483, 0.892, 0.51 ], "angle": 0, "content": "[27] Weizhe Liu, Mathieu Salzmann, and Pascal V. Fua. Context-aware crowd counting. In CVPR, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.511, 0.892, 0.539 ], "angle": 0, "content": "[28] Erika Lu, Weidi Xie, and Andrew Zisserman. Class-agnostic counting. In ACCV, 2018. 1, 2, 5, 6" }, { "type": "ref_text", "bbox": [ 0.503, 0.54, 0.892, 0.594 ], "angle": 0, "content": "[29] Terrell N. Mundhenk, Goran Konjevod, Wesam A. Sakla, and Kofi Boakye. A large contextual dataset for classification, detection and counting of cars with deep learning. In ECCV, 2016. 1, 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.596, 0.892, 0.649 ], "angle": 0, "content": "[30] Sanath Narayan, Akshita Gupta, Fahad Shahbaz Khan, Cees G. M. Snoek, and Ling Shao. Latent embedding feedback and discriminative features for zero-shot classification. In ECCV, 2020. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.651, 0.892, 0.691 ], "angle": 0, "content": "[31] Thanh Nguyen, Chau Pham, Khoi Nguyen, and Minh Hoai. Few-shot object counting and detection. In ECCV, 2022. 2, 5" }, { "type": "ref_text", "bbox": [ 0.503, 0.692, 0.892, 0.774 ], "angle": 0, "content": "[32] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 4, 5" }, { "type": "ref_text", "bbox": [ 0.503, 0.776, 0.892, 0.802 ], "angle": 0, "content": "[33] Viresh Ranjan and Minh Hoai. Exemplar free class agnostic counting. In ACCV, 2022. 1, 2, 3, 5, 6, 8" }, { "type": "ref_text", "bbox": [ 0.503, 0.804, 0.892, 0.844 ], "angle": 0, "content": "[34] Viresh Ranjan, Udbhav Sharma, Thua Nguyen, and Minh Hoai. Learning to count everything. In CVPR, 2021. 1, 2, 3, 5, 6, 7" }, { "type": "ref_text", "bbox": [ 0.503, 0.846, 0.892, 0.899 ], "angle": 0, "content": "[35] Mahdi Rezaei and Mahsa Shahidi. Zero-shot learning and its applications from autonomous vehicles to Covid-19 diagnosis: A review. In Intelligence-Based Medicine, volume 3, 2020. 3" }, { "type": "list", "bbox": [ 0.503, 0.093, 0.892, 0.899 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.946, 0.52, 0.957 ], "angle": 0, "content": "15556" } ], [ { "type": "ref_text", "bbox": [ 0.08, 0.092, 0.469, 0.133 ], "angle": 0, "content": "[36] Bernardino Romero-Paredes and Philip H. S. Torr. An embarrassingly simple approach to zero-shot learning. In ICML, 2015. 3" }, { "type": "ref_text", "bbox": [ 0.081, 0.136, 0.469, 0.192 ], "angle": 0, "content": "[37] Deepak Babu Sam, Abhinav Agarwalla, Jimmy Joseph, Vishwanath A. Sindagi, R. Venkatesh Babu, and Vishal M. Patel. Completely self-supervised crowd counting via distribution matching. In ECCV, 2022. 1, 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.194, 0.469, 0.248 ], "angle": 0, "content": "[38] Min Shi, Hao Lu, Chen Feng, Chengxin Liu, and Zhiguo Cao. Represent, compare, and learn: A similarity-aware framework for class-agnostic counting. In CVPR, 2022. 1, 2, 3, 6, 7" }, { "type": "ref_text", "bbox": [ 0.081, 0.251, 0.468, 0.292 ], "angle": 0, "content": "[39] Vishwanath A. Sindagi, Rajeev Yasarla, and Vishal M. Patel. Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method. In ICCV, 2019. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.295, 0.468, 0.335 ], "angle": 0, "content": "[40] Jia Wan, Ziquan Liu, and Antoni B. Chan. A generalized loss function for crowd counting and localization. In CVPR, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.338, 0.468, 0.379 ], "angle": 0, "content": "[41] Boyu Wang, Huidong Liu, Dimitris Samaras, and Minh Hoai Nguyen. Distribution matching for crowd counting. In NeurIPS, 2020. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.382, 0.468, 0.436 ], "angle": 0, "content": "[42] Qi Wang, Junyu Gao, Wei Lin, and Xuelong Li. Nwpu-crowd: A large-scale benchmark for crowd counting and localization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.439, 0.468, 0.481 ], "angle": 0, "content": "[43] Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh N. Nguyen, Matthias Hein, and Bernt Schiele. Latent embeddings for zero-shot classification. In CVPR, 2016. 3" }, { "type": "ref_text", "bbox": [ 0.081, 0.483, 0.468, 0.55 ], "angle": 0, "content": "[44] Yongqin Xian, Christoph H. Lampert, Bernt Schiele, and Zeynep Akata. Zero-shot learning—a comprehensive evaluation of the good, the bad and the ugly. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41, 2019. 3, 4" }, { "type": "ref_text", "bbox": [ 0.081, 0.554, 0.468, 0.595 ], "angle": 0, "content": "[45] Yongqin Xian, Saurabh Sharma, Bernt Schiele, and Zeynep Akata. F-vaegan-d2: A feature generating framework for any-shot learning. In CVPR, 2019. 3, 4" }, { "type": "ref_text", "bbox": [ 0.081, 0.598, 0.468, 0.666 ], "angle": 0, "content": "[46] Weidi Xie, J. Alison Noble, and Andrew Zisserman. Microscopy cell counting and detection with fully convolutional regression networks. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 6, 2018. 1, 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.669, 0.468, 0.697 ], "angle": 0, "content": "[47] Haipeng Xiong and Angela Yao. Discrete-constrained regression for local counting models. In ECCV, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.699, 0.468, 0.725 ], "angle": 0, "content": "[48] Jingyi Xu and Hieu Le. Generating representative samples for few-shot classification. In CVPR, 2022. 3" }, { "type": "ref_text", "bbox": [ 0.081, 0.728, 0.468, 0.77 ], "angle": 0, "content": "[49] Jingyi Xu, Hieu Le, Mingzhen Huang, ShahRukh Athar, and Dimitris Samaras. Variational feature disentangling for fine-grained few-shot classification. In ICCV, 2021. 3" }, { "type": "ref_text", "bbox": [ 0.081, 0.772, 0.468, 0.812 ], "angle": 0, "content": "[50] Shuo Yang, Hung-Ting Su, Winston H. Hsu, and Wen-Chin Chen. Class-agnostic few-shot object counting. In WACV, 2021. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.816, 0.468, 0.856 ], "angle": 0, "content": "[51] Zhiyuan You, Kai Yang, Wenhan Luo, Xin Lu, Lei Cui, and Xinyi Le. Few-shot object counting with similarity-aware feature enhancement. In WACV, 2023. 2" }, { "type": "ref_text", "bbox": [ 0.081, 0.859, 0.468, 0.9 ], "angle": 0, "content": "[52] Anran Zhang, Lei Yue, Jiayi Shen, Fan Zhu, Xiantong Zhen, Xianbin Cao, and Ling Shao. Attentional neural fields for crowd counting. In ICCV, 2019. 2" }, { "type": "list", "bbox": [ 0.08, 0.092, 0.469, 0.9 ], "angle": 0, "content": null }, { "type": "ref_text", "bbox": [ 0.503, 0.093, 0.892, 0.134 ], "angle": 0, "content": "[53] Cong Zhang, Hongsheng Li, Xiaogang Wang, and Xiaokang Yang. Cross-scene crowd counting via deep convolutional neural networks. In CVPR, 2015. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.136, 0.892, 0.163 ], "angle": 0, "content": "[54] Li Zhang, Tao Xiang, and Shaogang Gong. Learning a deep embedding model for zero-shot learning. In CVPR, 2017. 3" }, { "type": "ref_text", "bbox": [ 0.503, 0.165, 0.892, 0.192 ], "angle": 0, "content": "[55] Qi Zhang and Antoni Chan. Calibration-free multi-view crowd counting. In ECCV, 2022. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.194, 0.892, 0.234 ], "angle": 0, "content": "[56] Yingying Zhang, Desen Zhou, Siqin Chen, Shenghua Gao, and Yi Ma. Single-image crowd counting via multi-column convolutional neural network. In CVPR, 2016. 2" }, { "type": "ref_text", "bbox": [ 0.503, 0.236, 0.892, 0.264 ], "angle": 0, "content": "[57] Ye Zheng, Jiahong Wu, Yongqiang Qin, Faen Zhang, and Li Cui. Zero-shot instance segmentation. In CVPR, 2021. 2" }, { "type": "list", "bbox": [ 0.503, 0.093, 0.892, 0.264 ], "angle": 0, "content": null }, { "type": "page_number", "bbox": [ 0.481, 0.946, 0.519, 0.957 ], "angle": 0, "content": "15557" } ]]123version https://git-lfs.github.com/spec/v1oid sha256:b4466ce9f89b2e75aee34b841fec50415b02114fe1a9a936f48ec076344e5ddfsize 3309044123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329# Zero-Shot Object Counting
Jingyi $\mathrm{Xu}^{1}$ , Hieu $\mathrm{Le}^{2}$ , Vu Nguyen $^{1}$ , Viresh Ranjan $^{*3}$ , and Dimitris Samaras $^{1}$
<sup>1</sup>Stony Brook University <sup>2</sup>EPFL <sup>3</sup>Amazon
# Abstract
Class-agnostic object counting aims to count object instances of an arbitrary class at test time. Current methods for this challenging problem require human-annotated exemplars as inputs, which are often unavailable for novel categories, especially for autonomous systems. Thus, we propose zero-shot object counting (ZSC), a new setting where only the class name is available during test time. Such a counting system does not require human annotators in the loop and can operate automatically. Starting from a class name, we propose a method that can accurately identify the optimal patches which can then be used as counting exemplars. Specifically, we first construct a class prototype to select the patches that are likely to contain the objects of interest, namely class-relevant patches. Furthermore, we introduce a model that can quantitatively measure how suitable an arbitrary patch is as a counting exemplar. By applying this model to all the candidate patches, we can select the most suitable patches as exemplars for counting. Experimental results on a recent class-agnostic counting dataset, FSC-147, validate the effectiveness of our method. Code is available at https://github.com/cvlab-stonybrook/zero-shot-counting.
# 1. Introduction
Object counting aims to infer the number of objects in an image. Most of the existing methods focus on counting objects from specialized categories such as human crowds [37], cars [29], animals [4], and cells [46]. These methods count only a single category at a time. Recently, class-agnostic counting [28, 34, 38] has been proposed to count objects of arbitrary categories. Several human-annotated bounding boxes of objects are required to specify the objects of interest (see Figure 1a). However, having humans in the loop is not practical for many real-world applications, such as fully automated wildlife monitoring systems or vi
 (a) Few-shot Counting Figure 1. Our proposed task of zero-shot object counting (ZSC). Traditional few-shot counting methods require a few exemplars of the object category (a). We propose zero-shot counting where the counter only needs the class name to count the number of object instances. (b). Few-shot counting methods require human annotators at test time while zero-shot counters can be fully automatic.
 (b) Zero-Shot Counting
sual anomaly detection systems.
A more practical setting, exemplar-free class-agnostic counting, has been proposed recently by Ranjan et al. [33]. They introduce RepRPN, which first identifies the objects that occur most frequently in the image, and then uses them as exemplars for object counting. Even though RepRPN does not require any annotated boxes at test time, the method simply counts objects from the class with the highest number of instances. Thus, it can not be used for counting a specific class of interest. The method is only suitable for counting images with a single dominant object class, which limits the potential applicability.
Our goal is to build an exemplar-free object counter where we can specify what to count. To this end, we introduce a new counting task in which the user only needs to provide the name of the class for counting rather than the exemplars (see Figure 1b). In this way, the counting model can not only operate in an automatic manner but also allow the user to define what to count by simply providing the class name. Note that the class to count during test time can be arbitrary. For cases where the test class is completely unseen to the trained model, the counter needs to adapt to the unseen class without any annotated data. Hence, we
name this setting zero-shot object counting (ZSC), inspired by previous zero-shot learning approaches [6, 57].
To count without any annotated exemplars, our idea is to identify a few patches in the input image containing the target object that can be used as counting exemplars. Here the challenges are twofold: 1) how to localize patches that contain the object of interest based on the provided class name, and 2) how to select good exemplars for counting. Ideally, good object exemplars are visually representative for most instances in the image, which can benefit the object counter. In addition, we want to avoid selecting patches that contain irrelevant objects or backgrounds, which likely lead to incorrect object counts.
To this end, we propose a two-step method that first localizes the class-relevant patches which contain the objects of interest based on the given class name, and then selects among these patches the optimal exemplars for counting. We use these selected exemplars, together with a pre-trained exemplar-based counting model, to achieve exemplar-free object counting.
In particular, to localize the patches containing the objects of interest, we first construct a class prototype in a pretrained embedding space based on the given class name. To construct the class prototype, we train a conditional variational autoencoder (VAE) to generate features for an arbitrary class conditioned on its semantic embedding. The class prototype is computed by taking the average of the generated features. We then select the patches whose embeddings are the $k$ -nearest neighbors of the class prototype as the class-relevant patches.
After obtaining the class-relevant patches, we further select among them the optimal patches to be used as counting exemplars. Here we observe that the feature maps obtained using good exemplars and bad exemplars often exhibit distinguishable differences. An example of the feature maps obtained with different exemplars is shown in Figure 2. The feature map from a good exemplar typically exhibits some repetitive patterns (e.g., the dots on the feature map) that center around the object areas while the patterns from a bad exemplar are more irregular and occur randomly across the image. Based on this observation, we train a model to measure the goodness of an input patch based on its corresponding feature maps. Specifically, given an arbitrary patch and a pre-trained exemplar-based object counter, we train this model to predict the counting error of the counter when using the patch as the exemplar. Here the counting error can indicate the goodness of the exemplar. After this error predictor is trained, we use it to select those patches with the smallest predicted errors as the final exemplars for counting.
Experiments on the FSC-147 dataset show that our method outperforms the previous exemplar-free counting method [33] by a large margin. We also provide analyses to show that patches selected by our method can be
 Figure 2. Feature maps obtained using different exemplars given a pre-trained exemplar-based counting model. The feature maps obtained using good exemplars typically exhibit some repetitive patterns while the patterns from bad exemplars are more irregular.
used in other exemplar-based counting methods to achieve exemplar-free counting. In short, our main contributions can be summarized as follows:
- We introduce the task of zero-shot object counting that counts the number of instances of a specific class in the input image, given only the class name and without relying on any human-annotated exemplars. - We propose a simple yet effective patch selection method that can accurately localize the optimal patches across the query image as exemplars for zero-shot object counting. - We verify the effectiveness of our method on the FSC-147 dataset, through extensive ablation studies and visualization results.
# 2. Related Work
# 2.1. Class-specific Object Counting
Class-specific object counting focuses on counting predefined categories, such as humans [1, 15, 24, 26, 37, 39, 40, 42, 47, 52, 53, 55, 56], animals [4], cells [46], or cars [14, 29]. Generally, existing methods can be categorized into two groups: detection-based methods [8, 14, 18] and regression-based methods [7, 10, 11, 27, 41, 53, 56]. Detection-based methods apply an object detector on the image and count the number of objects based on the detected boxes. Regression-based methods predict a density map for each input image, and the final result is obtained by summing up the pixel values. Both types of methods require abundant training data to learn a good model. Class-specific counters can perform well on trained categories. However, they can not be used to count objects of arbitrary categories at test time.
# 2.2. Class-agnostic Object Counting
Class-agnostic object counting aims to count arbitrary categories given only a few exemplars [3, 13, 25, 28, 31, 34, 38, 50, 51]. GMN [28] uses a shared embedding module to
 Figure 3. Overview of the proposed method. We first use a generative model to obtain a class prototype for the given class (e.g. grape) in a pre-trained feature space. Then given an input query image, we randomly sample a number of patches of various sizes and extract the corresponding feature embedding for each patch. We select the patches whose embeddings are the nearest neighbors of the class prototype as class-relevant patches. Then for each of the selected class-relevant patches, we use a pre-trained exemplar-based counting model to obtain the intermediate feature maps. Our proposed error predictor then takes the feature maps as input and predicts the counting error (here we use normalized counting errors). We select the patches with the smallest predicted errors as the final exemplar patches and use them for counting.
extract feature maps for both query images and exemplars, which are then concatenated and fed into a matching module to regress the object count. FamNet [34] adopts a similar way to do correlation matching and further applies test-time adaptation. These methods require human-annotated exemplars as inputs. Recently, Ranjan et al. have proposed RepRPN [33], which achieves exemplar-free counting by identifying exemplars from the most frequent objects via a Region Proposal Network (RPN)-based model. However, the class of interest can not be explicitly specified for the RepRPN. In comparison, our proposed method can count instances of a specific class given only the class name.
# 2.3. Zero-shot Image Classification
Zero-shot classification aims to classify unseen categories for which data is not available during training [5, 9, 12, 16, 19, 21, 23, 35, 36]. Semantic descriptors are mostly leveraged as a bridge to enable the knowledge transfer between seen and unseen classes. Earlier zero-shot learning (ZSL) works relate the semantic descriptors with visual features in an embedding space and recognize unseen samples by searching their nearest class-level semantic descriptor in this embedding space [17, 36, 43, 54]. Recently, generative models [20, 22, 48, 49] have been widely employed to synthesize unseen class data to facilitate ZSL [30, 44, 45]. Xian et al. [44] use a conditional Wasserstein Generative Adversarial Network (GAN) [2] to generate unseen features which can then be used to train a discriminative classifier for ZSL. In our method, we also train a generative model conditioned on class-specific semantic embedding. Instead
of using this generative model to hallucinate data, we use it to compute a prototype for each class. This class prototype is then used to select patches that contain objects of interest.
# 3. Method
Figure 3 summarizes our proposed method. Given an input query image and a class label, we first use a generative model to construct a class prototype for the given class in a pre-trained feature space. We then randomly sample a number of patches of various sizes and extract the feature embedding for each patch. The class-relevant patches are those patches whose embeddings are the nearest neighbors of the class prototype in the embedding space. We further use an error predictor to select the patches with the smallest predicted errors as the final exemplars for counting. We use the selected exemplars in an exemplar-based object counter to infer the object counts. For the rest of the paper, we denote this exemplar-based counter as the "base counting model". We will first describe how we train this base counting model and then present the details of our patch selection method.
# 3.1. Training Base Counting Model
We train our base counting model using abundant training images with annotations. Similar to previous works [34, 38], the base counting model uses the input image and the exemplars to obtain a density map for object counting. The model consists of a feature extractor $F$ and a counter $C$ . Given a query image $I$ and an exemplar $B$ of an arbitrary class $c$ , we input $I$ and $B$ to the feature extractor to obtain the corresponding output, denoted as $F(I)$ and $F(B)$ re
spectively. $F(I)$ is a feature map of size $d * h_{I} * w_{I}$ and $F(B)$ is a feature map of size $d * h_{B} * w_{B}$ . We further perform global average pooling on $F(B)$ to form a feature vector $b$ of $d$ dimensions.
After feature extraction, we obtain the similarity map $S$ by correlating the exemplar feature vector $b$ with the image feature map $F(I)$ . Specifically, if $w_{ij} = F_{ij}(I)$ is the channel feature at spatial position $(i,j)$ , $S$ can be computed by:
$$S _ {i j} (I, B) = w _ {i j} ^ {T} b. \tag {1}$$
In the case where $n$ exemplars are given, we use Eq. 1 to calculate $n$ similarity maps, and the final similarity map is the average of these $n$ similarity maps.
We then concatenate the image feature map $F(I)$ with the similarity map $S$ , and input them into the counter $C$ to predict a density map $D$ . The final predicted count $N$ is obtained by summing over the predicted density map $D$ :
$$N = \sum_ {i, j} D _ {(i, j)}, \tag {2}$$
where $D_{(i,j)}$ denotes the density value for pixel $(i,j)$ . The supervision signal for training the counting model is the $L_{2}$ loss between the predicted density map and the ground truth density map:
$$L _ {\text {c o u n t}} = \left\| D (I, B) - D ^ {*} (I) \right\| _ {2} ^ {2}, \tag {3}$$
where $D^{*}$ denotes the ground truth density map.
# 3.2. Zero-shot Object Counting
In this section, we describe how we count objects of any unseen category given only the class name without access to any exemplar. Our strategy is to select a few patches in the image that can be used as exemplars for the base counting model. These patches are selected such that: 1) they contain the objects that we are counting and 2) they benefit the counting model, i.e., lead to small counting errors.
# 3.2.1 Selecting Class-relevant Patches
To select patches that contain the objects of interest, we first generate a class prototype based on the given class name using a conditional VAE model. Then we randomly sample a number of patches across the query image and select the class-relevant patches based on the generated prototype.
Class prototype generation. Inspired by previous zero-shot learning approaches [44, 45], we train a conditional VAE model to generate features for an arbitrary class based on the semantic embedding of the class. The semantic embedding is obtained from a pre-trained text-vision model [32] given the corresponding class name. Specifically, we train the VAE model to reconstruct features in a pre-trained ImageNet feature space. The VAE is composed of an Encoder $E$ , which maps a visual feature $x$ to a latent code $z$ ,
and a decoder $G$ which reconstructs $x$ from $z$ . Both $E$ and $G$ are conditioned on the semantic embedding $a$ . The loss function for training this VAE for an input feature $x$ can be defined as:
$$\begin{array}{l} L _ {V} (x) = \operatorname {K L} (q (z | x, a) | | p (z | a)) \tag {4} \\ - \mathrm {E} _ {q (z | x, a)} [ \log p (x | z, a) ]. \\ \end{array}$$
The first term is the Kullback-Leibler divergence between the VAE posterior $q(z|x,a)$ and a prior distribution $p(z|a)$ . The second term is the decoder's reconstruction error. $q(z|x,a)$ is modeled as $E(x,a)$ and $p(x|z,a)$ is equal to $G(z,a)$ . The prior distribution is assumed to be $\mathcal{N}(0,I)$ for all classes.
We can use the trained VAE to generate the class prototype for an arbitrary target class for counting. Specifically, given the target class name $y$ , we first generate a set of features by inputting the respective semantic vector $a^y$ and a noise vector $z$ to the decoder $G$ :
$$\mathbb {G} ^ {y} = \{\hat {x} | \hat {x} = G (z, y), z \sim \mathcal {N} (0, I) \}. \tag {5}$$
The class prototype $\mathfrak{p}^y$ is computed by taking the mean of all the features generated by VAE:
$$\mathrm {p} ^ {y} = \frac {1}{| \mathbb {G} ^ {y} |} \sum_ {\hat {x} \in \mathbb {G} ^ {y}} \hat {x} \tag {6}$$
Class-relevant patch selection. The generated class prototype can be considered as a class center representing the distribution of features of the corresponding class in the embedding space. Using the class prototype, we can select the class-relevant patches across the query image. Specifically, we first randomly sample $M$ patches of various sizes $\{b_1, b_2, \dots, b_m\}$ across the query image and extract their corresponding ImageNet features $\{f_1, f_2, \dots, f_m\}$ . To select the class-relevant patches, we calculate the $L_2$ distance between the class prototype and the patch embedding, namely $d_i = \| f_i - \mathrm{p}^y\|_2$ . Then we select the patches whose embeddings are the $k$ -nearest neighbors of the class prototype as the class-relevant patches. Since the ImageNet feature space is highly discriminative, i.e., features close to each other typically belong to the same class, the selected patches are likely to contain the objects of the target class.
# 3.2.2 Selecting Exemplars for Counting
Given a set of class-relevant patches and a pre-trained exemplar-based object counter, we aim to select a few exemplars from these patches that are optimal for counting. To do so, we introduce an error prediction network that predicts the counting error of an arbitrary patch when the patch is used as the exemplar. The counting error is calculated from the pre-trained counting model. Specifically, to train this error predictor, given a query image $\bar{I}$ and an arbitrary patch
$\bar{B}$ cropped from $\bar{I}$ , we first use the base counting model to get the image feature map $F(\bar{I})$ , similarity map $\bar{S}$ , and the final predicted density map $\bar{D}$ . The counting error of the base counting model can be written as:
$$\epsilon = \left| \sum_ {i, j} \bar {D} _ {(i, j)} - \bar {N} ^ {*} \right|, \tag {7}$$
where $\bar{N}^*$ denotes the ground truth object count in image $\bar{I}$ . $\epsilon$ can be used to measure the goodness of $\bar{B}$ as an exemplar for $\bar{I}$ , i.e., a small $\epsilon$ indicates that $\bar{B}$ is a suitable exemplar for counting and vice versa.
The error predictor $R$ is trained to regress the counting error produced by the base counting model. The input of $R$ is the channel-wise concatenation of the image feature map $F(\bar{I})$ and the similarity map $\tilde{S}$ . The training objective is the minimization of the mean squared error between the output of the predictor $R(F(\bar{I}),\bar{S})$ and the actual counting error produced by the base counting model $\epsilon$ .
After the error predictor is trained, we can use it to select the optimal patches for counting. The candidates for selection here are the class-relevant patches selected by the class prototype in the previous step. For each candidate patch, we use the trained error predictor to infer the counting error when it is being used as the exemplar. The final selected patches for counting are the patches that yield the top- $s$ smallest counting errors.
# 3.2.3 Using the Selected Patches as Exemplars
Using the error predictor, we predict the error for each candidate patch and select the patches that lead to the smallest counting errors. The selected patches can then be used as exemplars for the base counting model to get the density map and the final count. We also conduct experiments to show that these selected patches can serve as exemplars for other exemplar-based counting models to achieve exemplar-free class-agnostic counting.
# 4. Experiments
# 4.1. Implementation Details
Network architecture For the base counting model, we use ResNet-50 as the backbone of the feature extractor, initialized with the weights of a pre-trained ImageNet model. The backbone outputs feature maps of 1024 channels. For each query image, the number of channels is reduced to 256 using an $1 \times 1$ convolution. For each exemplar, the feature maps are first processed with global average pooling and then linearly mapped to obtain a 256-d feature vector. The counter consists of 5 convolutional and bilinear upsampling layers to regress a density map of the same size as the query image. For the feature generation model, both the encoder and the decoder are two-layer fully-connected
(FC) networks with 4096 hidden units. LeakyReLU and ReLU are the non-linear activation functions in the hidden and output layers, respectively. The dimensions of the latent space and the semantic embeddings are both set to be 512. For the error predictor, 5 convolutional and bilinear upsampling layers are followed by a linear layer to output the counting error.
Dataset We use the FSC-147 dataset [34] to train the base counting model and the error predictor. FSC-147 is the first large-scale dataset for class-agnostic counting. It includes 6135 images from 147 categories varying from animals, kitchen utensils, to vehicles. The categories in the training, validation, and test sets do not overlap. The feature generator is trained on the MS-COCO detection dataset. Note that the previous exemplar-free method [33] also uses MS-COCO to pre-train their counter.
Training details Both the base counting model and the error predictor are trained using the AdamW optimizer with a fixed learning rate of $10^{-5}$ . The base counting model is trained for 300 epochs with a batch size of 8. We resize the input query image to a fixed height of 384, and the width is adjusted accordingly to preserve the aspect ratio of the original image. Exemplars are resized to $128 \times 128$ before being input into the feature extractor. The feature generation model is trained using the Adam optimizer and the learning rate is set to be $10^{-4}$ . The semantic embeddings are extracted from CLIP [32]. To select the class-relevant patches, we randomly sample 450 boxes of various sizes across the input query image and select 10 patches whose embeddings are the 10-nearest neighbors of the class prototype. The final selected patches are those that yield the top-3 smallest counting errors predicted by the error predictor.
# 4.2. Evaluation Metrics
We use Mean Average Error (MAE) and Root Mean Squared Error (RMSE) to measure the performance of different object counters. Besides, we follow [31] to report the Normalized Relative Error (NAE) and Squared Relative Error (SRE). In particular, MAE = $\frac{1}{n}\sum_{i=1}^{n}|y_i - \hat{y}_i|$ ; RMSE = $\sqrt{\frac{1}{n}\sum_{i=1}^{n}(y_i - \hat{y}_i)^2}$ ; NAE = $\frac{1}{n}\sum_{i=1}^{n}\frac{|y_i - \hat{y}_i|}{y_i}$ ; SRE = $\sqrt{\frac{1}{n}\sum_{i=1}^{n}\frac{(y_i - \hat{y}_i)^2}{y_i}}$ where $n$ is the number of test images, and $y_i$ and $\hat{y}_i$ are the ground truth and the predicted number of objects for image $i$ respectively.
# 4.3. Comparing Methods
We compare our method with the previous works on class-agnostic counting. RepRPN-Counter [33] is the only previous class-agnostic counting method that does not require human-annotated exemplars as input. In order to make other exemplar based class-agnostic methods including GMN (General Matching Network [28]), FamNet (Few-shot adaptation and matching Network [34]) and BMNet
<table><tr><td rowspan="2">Method</td><td rowspan="2">Exemplars</td><td colspan="4">Val Set</td><td colspan="4">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td rowspan="2">GMN [28]</td><td>GT</td><td>29.66</td><td>89.81</td><td>-</td><td>-</td><td>26.52</td><td>124.57</td><td>-</td><td>-</td></tr><tr><td>RPN</td><td>40.96</td><td>108.47</td><td>-</td><td>-</td><td>39.72</td><td>142.81</td><td>-</td><td>-</td></tr><tr><td rowspan="2">FamNet+ [34]</td><td>GT</td><td>23.75</td><td>69.07</td><td>0.52</td><td>4.25</td><td>22.08</td><td>99.54</td><td>0.44</td><td>6.45</td></tr><tr><td>RPN</td><td>42.85</td><td>121.59</td><td>0.75</td><td>6.94</td><td>42.70</td><td>146.08</td><td>0.74</td><td>7.14</td></tr><tr><td rowspan="2">BMNet [38]</td><td>GT</td><td>19.06</td><td>67.95</td><td>0.26</td><td>4.39</td><td>16.71</td><td>103.31</td><td>0.26</td><td>3.32</td></tr><tr><td>RPN</td><td>37.26</td><td>108.54</td><td>0.42</td><td>5.43</td><td>37.22</td><td>143.13</td><td>0.41</td><td>5.31</td></tr><tr><td rowspan="2">BMNet+ [38]</td><td>GT</td><td>15.74</td><td>58.53</td><td>0.27</td><td>6.57</td><td>14.62</td><td>91.83</td><td>0.25</td><td>2.74</td></tr><tr><td>RPN</td><td>35.15</td><td>106.07</td><td>0.41</td><td>5.28</td><td>34.52</td><td>132.64</td><td>0.39</td><td>5.26</td></tr><tr><td>RepRPN-Counter [33]</td><td>-</td><td>30.40</td><td>98.73</td><td>-</td><td>-</td><td>27.45</td><td>129.69</td><td>-</td><td>-</td></tr><tr><td rowspan="3">Ours (Base)</td><td>GT</td><td>18.55</td><td>61.12</td><td>0.30</td><td>3.18</td><td>20.68</td><td>109.14</td><td>0.36</td><td>7.63</td></tr><tr><td>RPN</td><td>32.19</td><td>99.21</td><td>0.38</td><td>4.80</td><td>29.25</td><td>130.65</td><td>0.35</td><td>4.35</td></tr><tr><td>Patch-Selection</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>
Table 1. Quantitative comparisons on the FSC-147 dataset. "GT" denotes using human-annotated boxes as exemplars. "RPN" denotes using the top-3 RPN proposals with the highest objectness scores as exemplars. "Patch-Selection" denotes using our selected patches as exemplars.
(Bilinear Matching Network [38]) work in the exemplar-free setup, we replace the human-provided exemplars with the exemplars generated by a pre-trained object detector. Specifically, we use the RPN of Faster RCNN pre-trained on MS-COCO dataset and select the top-3 proposals with the highest objectness score as the exemplars. We also include the performance of these methods using human-annotated exemplars for a complete comparison.
# 4.4. Results
Quantitative results. As shown in Table 1, our proposed method outperforms the previous exemplar-free counting method [33] by a large margin, resulting in a reduction of 10.10 w.r.t. the validation RMSE and 14.52 w.r.t. the test RMSE. We also notice that the performance of all exemplar-based counting methods drops significantly when replacing human-annotated exemplars with RPN generated proposals. The state-of-the-art exemplar-based method BMNet+ [38], for example, shows an 19.90 error increase w.r.t. the test MAE and a 40.81 increase w.r.t. the test RMSE. In comparison, the performance gap is much smaller when using our selected patches as exemplars, as reflected by a 1.41 increase w.r.t. the test MAE and a 6.03 increase w.r.t. the test RMSE. Noticeably, the NAE and the SRE on the test set are even reduced when using our selected patches compared with the human-annotated exemplars.
Qualitative analysis. In Figure 4, we present a few input images, the image patches selected by our method, and the corresponding density maps. Our method effectively identifies the patches that are suitable for object counting. The density maps produced by our selected patches are meaningful and close to the density maps produced by human-annotated patches. The counting model with random image patches as exemplars, in comparison, fails to output meaningful density maps and infers incorrect object counts.
# 5. Analyses
# 5.1. Ablation Studies
Our proposed patch selection method consists of two steps: the selection of class-relevant patches via a generated class prototype and the selection of the optimal patches via an error predictor. We analyze the contribution of each step quantitatively and qualitatively. Quantitative results are in Table 2. We first evaluate the performance of our baseline, i.e. using 3 randomly sampled patches as exemplars without any selection step. As shown in Table 2, using the class prototype to select class-relevant patches reduces the error rate by 7.19 and 6.07 on the validation and test set of MAE, respectively. Applying the error predictor can improve the baseline performance by 7.22 on the validation MAE and 7.57 on the test MAE. Finally, applying the two components together further boosts performance, achieving 26.93 on the validation MAE and 22.09 on the test MAE.
We provide further qualitative analysis by visualizing the selected patches. As shown in Figure 5, for each input query image, we show 10 class-relevant patches selected using our generated prototype, ranked by their predicted counting error (from low to high). All the 10 selected class-relevant patches exhibit some class specific features. However, not all these patches are suitable to be used as counting exemplars, i.e., some patches only contain parts of the object, and some patches contain some background. By further applying our proposed error predictor, we can identify the most suitable patches with the smallest predicted counting errors.
# 5.2. Generalization to Exemplar-based Methods
Our proposed method can be considered as a general patch selection method that is applicable to other visual counters to achieve exemplar-free counting. To verify that, we use our selected patches as the exemplars for three












 Figure 4. Qualitative results on the FSC-147 dataset. We show the counting exemplars and the corresponding density maps of ground truth boxes, randomly selected patches, and our selected patches respectively. Predicted counting results are shown at the top-right corner. Our method accurately identifies suitable patches for counting and the predicted density maps are close to the ground truth density maps.
 Ground Truth

 Ours
 Figure 5. Qualitative ablation analysis. All the 10 selected class-relevant patches exhibit some class-specific attributes. They are ranked by the predicted counting errors and the final selected patches with the smallest errors are framed in green.
<table><tr><td rowspan="2">Prototype</td><td rowspan="2">Predictor</td><td colspan="4">Val Set</td><td colspan="4">Test Set</td></tr><tr><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td><td>MAE</td><td>RMSE</td><td>NAE</td><td>SRE</td></tr><tr><td>-</td><td>-</td><td>35.20</td><td>106.70</td><td>0.61</td><td>6.68</td><td>31.37</td><td>134.98</td><td>0.52</td><td>5.92</td></tr><tr><td>✓</td><td>-</td><td>28.01</td><td>88.29</td><td>0.39</td><td>4.66</td><td>25.30</td><td>113.82</td><td>0.40</td><td>4.88</td></tr><tr><td>-</td><td>✓</td><td>27.98</td><td>88.62</td><td>0.43</td><td>4.59</td><td>23.80</td><td>128.36</td><td>0.40</td><td>4.43</td></tr><tr><td>✓</td><td>✓</td><td>26.93</td><td>88.63</td><td>0.36</td><td>4.26</td><td>22.09</td><td>115.17</td><td>0.34</td><td>3.74</td></tr></table>
Table 2. Ablation study on each component's contribution to the final results. We show the effectiveness of the two steps of our framework: selecting class-relevant patches via a generated class prototype and selecting optimal patches via an error predictor.
other different exemplar-based methods: FamNet [34], BMNet and BMNet+ [38]. Figure 6 (a) shows the results on the FSC-147 validation set. The baseline uses three randomly sampled patches as the exemplars for the pre-trained exemplar-based counter. By using the generated class prototype to select class-relevant patches, the error rate is reduced by 5.18, 8.59 and 5.60 on FamNet, BMNet and BMNet+, respectively. In addition, as the error predictor is additionally adopted, the error rate is further reduced by 1.76, 1.00 and 1.08 on FamNet, BMNet and BMNet+, respectively. Similarly, Figure 6 (b) shows the results on the FSC
147 test set. Our method achieves consistent performance improvements for all three methods.
 (a)
 (b)
# 5.3. Multi-class Object Counting
Our method can count instances of a specific class given the class name, which is particularly useful when there are multiple classes in the same image. In this section, we show some visualization results in this multi-class scenario. As seen in Figure 7, our method selects patches according to the given class name and count instances from that specific class in the input image. Correspondingly, the heatmap highlights the image regions that are most relevant to the specified class. Here the heatmaps are obtained by correlating the exemplar feature vector with the image feature map in a pre-trained ImageNet feature space. Note that we mask out the image region where the activation value in the heatmap is below a threshold for counting purpose. We also show the patches selected using another exemplar-free counting method, RepRPN [33]. The class of RepRPN selected patches can not be explicitly specified. It simply selects patches from the class with the highest number of instances in the image according to the repetition score.


 Figure 6. Using our selected patches as exemplars for other exemplar-based class-agnostic counting methods (FamNet, BMNet and BMNet+) on FSC-147 dataset. Blue bars are the MAEs of using three randomly sampled patches. Orange bars are the MAEs of using the class prototype to select class-relevant patches as exemplars. Green bars are the MAEs of using the class prototype and error predictor to select optimal patches as exemplars. Figure 7. Visualization results of our method in some multi-class examples. Our method selects patches according to the given class name and the corresponding heatmap highlights the relevant areas.
# 6. Conclusion
In this paper, we proposed a new task, zero-shot object counting, to count instances of a specific class given only the class name without access to any exemplars. To address this, we developed a simple yet effective method that accurately localizes the optimal patches across the query image that can be used as counting exemplars. Specifically, we construct a class prototype in a pre-trained feature space and use the prototype to select patches that contain objects of interest; then we use an error predictor to select those patches with the smallest predicted errors as the final exemplars for counting. Extensive results demonstrate the effectiveness of our method. We also conduct experiments to show that our selected patches can be used for other exemplar-based counting methods to achieve exemplar-free counting.
Acknowledgements. This research was partially supported by NSF grants IIS-2123920 and IIS-2212046 and the NASA Biodiversity program (Award 80NSSC21K1027).
# References
[1] Shahira Abousamra, Minh Hoai, Dimitris Samaras, and Chao Chen. Localization in the crowd with topological constraints. In AAAI, 2021. 2 [2] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. In ICML, 2017. 3 [3] Carlos Arteta, Victor S. Lempitsky, Julia Alison Noble, and Andrew Zisserman. Interactive object counting. In ECCV, 2014. 2 [4] Carlos Arteta, Victor S. Lempitsky, and Andrew Zisserman. Counting in the wild. In ECCV, 2016. 1, 2 [5] Yuval Atzmon and Gal Chechik. Adaptive confidence smoothing for generalized zero-shot learning. In CVPR, 2019. 3 [6] Ankan Bansal, Karan Sikka, Gaurav Sharma, Rama Chellappa, and Ajay Divakaran. Zero-shot object detection. In ECCV, 2018. 2 [7] Antoni B. Chan, Zhang-Sheng John Liang, and Nuno Vasconcelos. Privacy preserving crowd monitoring: Counting people without people models or tracking. In CVPR, 2008. 2 [8] Prithvijit Chattopadhyay, Ramakrishna Vedantam, Ramprasaath R. Selvaraju, Dhruv Batra, and Devi Parikh. Counting everyday objects in everyday scenes. CVPR, 2017. 2 [9] Long Chen, Hanwang Zhang, Jun Xiao, W. Liu, and Shih-Fu Chang. Zero-shot visual recognition using semantics-preserving adversarial embedding networks. In CVPR, 2018. 3 [10] Hisham Cholakkal, Guolei Sun, Fahad Shahbaz Khan, and Ling Shao. Object counting and instance segmentation with image-level supervision. In CVPR, 2019. 2 [11] Hisham Cholakkal, Guolei Sun, Salman Hameed Khan, Fahad Shahbaz Khan, Ling Shao, and Luc Van Gool. Towards partial supervision for generic object counting in natural scenes. volume 44, 2022. 2 [12] Andrea Frome, Gregory S. Corrado, Jonathon Shlens, Samy Bengio, Jeffrey Dean, Marc'Aurelio Ranzato, and Tomas Mikolov. Devise: A deep visual-semantic embedding model. In NIPS, 2013. 3 [13] Shenjian Gong, Shanshan Zhang, Jian Yang, Dengxin Dai, and Bernt Schiele. Class-agnostic object counting robust to intraclass diversity. In ECCV, 2022. 2 [14] Meng-Ru Hsieh, Yen-Liang Lin, and Winston H. Hsu. Drone-based object counting by spatially regularized regional proposal network. In ICCV, 2017. 2 [15] Haroon Idrees, Muhammad Tayyab, Kishan Athrey, Dong Zhang, Somaya Ali Al-Maadeed, Nasir M. Rajpoot, and Mubarak Shah. Composition loss for counting, density map estimation and localization in dense crowds. In ECCV, 2018. 2 [16] Dinesh Jayaraman and Kristen Grauman. Zero-shot recognition with unreliable attributes. In NIPS, 2014. 3 [17] Christoph H. Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. CVPR, 2009. 3
[18] Issam H. Laradji, Negar Rostamzadeh, Pedro H. O. Pinheiro, David Vázquez, and Mark W. Schmidt. Where are the blobs: Counting by localization with point supervision. In ECCV, 2018. 2 [19] Hieu Le, Bento Goncalves, Dimitris Samaras, and Heather Lynch. Weakly labeling the antarctic: The penguin colony case. In CVPR Workshops, June 2019. 3 [20] Hieu Le and Dimitris Samaras. Physics-based shadow image decomposition for shadow removal. Los Alamitos, CA, USA. IEEE Computer Society. 3 [21] Hieu Le and Dimitris Samaras. From shadow segmentation to shadow removal. In ECCV, 2020. 3 [22] Hieu Le, Tomas F. Yago Vicente, Vu Nguyen, Minh Hoai, and Dimitris Samaras. A+D Net: Training a shadow detector with adversarial shadow attenuation. In ECCV, 2018. 3 [23] Hieu Le, Chen-Ping Yu, Gregory Zelinsky, and Dimitris Samaras. Co-localization with category-consistent features and geodesic distance propagation. In ICCV Workshop, 2017. 3 [24] Dongze Lian, Jing Li, Jia Zheng, Weixin Luo, and Shenghua Gao. Density map regression guided detection network for rgb-d crowd counting and localization. CVPR, 2019. 2 [25] Chang Liu, Yujie Zhong, Andrew Zisserman, and Weidi Xie. Countr: Transformer-based generalised visual counting. In BMVC, 2022. 2 [26] Weizhe Liu, N. Durasov, and P. Fua. Leveraging self-supervision for cross-domain crowd counting. In CVPR, 2022. 2 [27] Weizhe Liu, Mathieu Salzmann, and Pascal V. Fua. Context-aware crowd counting. In CVPR, 2019. 2 [28] Erika Lu, Weidi Xie, and Andrew Zisserman. Class-agnostic counting. In ACCV, 2018. 1, 2, 5, 6 [29] Terrell N. Mundhenk, Goran Konjevod, Wesam A. Sakla, and Kofi Boakye. A large contextual dataset for classification, detection and counting of cars with deep learning. In ECCV, 2016. 1, 2 [30] Sanath Narayan, Akshita Gupta, Fahad Shahbaz Khan, Cees G. M. Snoek, and Ling Shao. Latent embedding feedback and discriminative features for zero-shot classification. In ECCV, 2020. 3 [31] Thanh Nguyen, Chau Pham, Khoi Nguyen, and Minh Hoai. Few-shot object counting and detection. In ECCV, 2022. 2, 5 [32] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In ICML, 2021. 4, 5 [33] Viresh Ranjan and Minh Hoai. Exemplar free class agnostic counting. In ACCV, 2022. 1, 2, 3, 5, 6, 8 [34] Viresh Ranjan, Udbhav Sharma, Thua Nguyen, and Minh Hoai. Learning to count everything. In CVPR, 2021. 1, 2, 3, 5, 6, 7 [35] Mahdi Rezaei and Mahsa Shahidi. Zero-shot learning and its applications from autonomous vehicles to Covid-19 diagnosis: A review. In Intelligence-Based Medicine, volume 3, 2020. 3
[36] Bernardino Romero-Paredes and Philip H. S. Torr. An embarrassingly simple approach to zero-shot learning. In ICML, 2015. 3 [37] Deepak Babu Sam, Abhinav Agarwalla, Jimmy Joseph, Vishwanath A. Sindagi, R. Venkatesh Babu, and Vishal M. Patel. Completely self-supervised crowd counting via distribution matching. In ECCV, 2022. 1, 2 [38] Min Shi, Hao Lu, Chen Feng, Chengxin Liu, and Zhiguo Cao. Represent, compare, and learn: A similarity-aware framework for class-agnostic counting. In CVPR, 2022. 1, 2, 3, 6, 7 [39] Vishwanath A. Sindagi, Rajeev Yasarla, and Vishal M. Patel. Pushing the frontiers of unconstrained crowd counting: New dataset and benchmark method. In ICCV, 2019. 2 [40] Jia Wan, Ziquan Liu, and Antoni B. Chan. A generalized loss function for crowd counting and localization. In CVPR, 2021. 2 [41] Boyu Wang, Huidong Liu, Dimitris Samaras, and Minh Hoai Nguyen. Distribution matching for crowd counting. In NeurIPS, 2020. 2 [42] Qi Wang, Junyu Gao, Wei Lin, and Xuelong Li. Nwpu-crowd: A large-scale benchmark for crowd counting and localization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 43, 2021. 2 [43] Yongqin Xian, Zeynep Akata, Gaurav Sharma, Quynh N. Nguyen, Matthias Hein, and Bernt Schiele. Latent embeddings for zero-shot classification. In CVPR, 2016. 3 [44] Yongqin Xian, Christoph H. Lampert, Bernt Schiele, and Zeynep Akata. Zero-shot learning—a comprehensive evaluation of the good, the bad and the ugly. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41, 2019. 3, 4 [45] Yongqin Xian, Saurabh Sharma, Bernt Schiele, and Zeynep Akata. F-vaegan-d2: A feature generating framework for any-shot learning. In CVPR, 2019. 3, 4 [46] Weidi Xie, J. Alison Noble, and Andrew Zisserman. Microscopy cell counting and detection with fully convolutional regression networks. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 6, 2018. 1, 2 [47] Haipeng Xiong and Angela Yao. Discrete-constrained regression for local counting models. In ECCV, 2022. 2 [48] Jingyi Xu and Hieu Le. Generating representative samples for few-shot classification. In CVPR, 2022. 3 [49] Jingyi Xu, Hieu Le, Mingzhen Huang, ShahRukh Athar, and Dimitris Samaras. Variational feature disentangling for fine-grained few-shot classification. In ICCV, 2021. 3 [50] Shuo Yang, Hung-Ting Su, Winston H. Hsu, and Wen-Chin Chen. Class-agnostic few-shot object counting. In WACV, 2021. 2 [51] Zhiyuan You, Kai Yang, Wenhan Luo, Xin Lu, Lei Cui, and Xinyi Le. Few-shot object counting with similarity-aware feature enhancement. In WACV, 2023. 2 [52] Anran Zhang, Lei Yue, Jiayi Shen, Fan Zhu, Xiantong Zhen, Xianbin Cao, and Ling Shao. Attentional neural fields for crowd counting. In ICCV, 2019. 2
[53] Cong Zhang, Hongsheng Li, Xiaogang Wang, and Xiaokang Yang. Cross-scene crowd counting via deep convolutional neural networks. In CVPR, 2015. 2 [54] Li Zhang, Tao Xiang, and Shaogang Gong. Learning a deep embedding model for zero-shot learning. In CVPR, 2017. 3 [55] Qi Zhang and Antoni Chan. Calibration-free multi-view crowd counting. In ECCV, 2022. 2 [56] Yingying Zhang, Desen Zhou, Siqin Chen, Shenghua Gao, and Yi Ma. Single-image crowd counting via multi-column convolutional neural network. In CVPR, 2016. 2 [57] Ye Zheng, Jiahong Wu, Yongqiang Qin, Faen Zhang, and Li Cui. Zero-shot instance segmentation. In CVPR, 2021. 2123version https://git-lfs.github.com/spec/v1oid sha256:bdb2dae07e260cd6edb7c0daa74ea8cba9daeca210f2f48a1ec3415a0cd45276size 57766012345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730[ { "type": "text", "text": "Zero-shot Pose Transfer for Unrigged Stylized 3D Characters", "text_level": 1, "bbox": [ 174, 130, 794, 152 ], "page_idx": 0 }, { "type": "text", "text": "Jiashun Wang $^{1*}$ Xueting Li $^{2}$ Sifei Liu $^{2}$ Shalini De Mello $^{2}$ Orazio Gallo $^{2}$ Xiaolong Wang $^{3}$ Jan Kautz $^{2}$ $^{1}$ Carnegie Mellon University ${}^{2}$ NVIDIA ${}^{3}$ UC San Diego", "bbox": [ 225, 178, 738, 236 ], "page_idx": 0 }, { "type": "image", "img_path": "images/b8b5358168abb25f99559384141748e8150d018ef2d2eebe1ebab6a6c5eb3eae.jpg", "image_caption": [ "Figure 1. Our algorithm transfers the pose of a reference avatar (source) to stylized characters. Unlike existing methods, at training time our approach needs only the mesh of the source avatar in rest and desired pose, and the mesh of the stylized character only in rest pose." ], "image_footnote": [], "bbox": [ 78, 243, 897, 521 ], "page_idx": 0 }, { "type": "text", "text": "Abstract", "text_level": 1, "bbox": [ 233, 577, 313, 593 ], "page_idx": 0 }, { "type": "text", "text": "Transferring the pose of a reference avatar to stylized 3D characters of various shapes is a fundamental task in computer graphics. Existing methods either require the stylized characters to be rigged, or they use the stylized character in the desired pose as ground truth at training. We present a zero-shot approach that requires only the widely available deformed non-stylized avatars in training, and deforms stylized characters of significantly different shapes at inference. Classical methods achieve strong generalization by deforming the mesh at the triangle level, but this requires labelled correspondences. We leverage the power of local deformation, but without requiring explicit correspondence labels. We introduce a semi-supervised shape-understanding module to bypass the need for explicit correspondences at test time, and an implicit pose deformation module that deforms individual surface points to match the target pose. Furthermore, to encourage realistic and accurate deformation of", "bbox": [ 75, 611, 473, 869 ], "page_idx": 0 }, { "type": "text", "text": "stylized characters, we introduce an efficient volume-based test-time training procedure. Because it does not need rigging, nor the deformed stylized character at training time, our model generalizes to categories with scarce annotation, such as stylized quadrupeds. Extensive experiments demonstrate the effectiveness of the proposed method compared to the state-of-the-art approaches trained with comparable or more supervision. Our project page is available at https://jiashunwang.github.io/ZPT/", "bbox": [ 500, 578, 893, 715 ], "page_idx": 0 }, { "type": "text", "text": "1. Introduction", "text_level": 1, "bbox": [ 500, 751, 632, 767 ], "page_idx": 0 }, { "type": "text", "text": "Stylized 3D characters, such as those in Fig. 1, are commonly used in animation, movies, and video games. Deforming these characters to mimic natural human or animal poses has been a long-standing task in computer graphics. Different from the 3D models of natural humans and animals, stylized 3D characters are created by professional artists through imagination and exaggeration. As a result, each stylized character has a distinct skeleton, shape, mesh", "bbox": [ 496, 779, 893, 902 ], "page_idx": 0 }, { "type": "header", "text": "CVF", "bbox": [ 106, 2, 181, 42 ], "page_idx": 0 }, { "type": "header", "text": "This CVPR paper is the Open Access version, provided by the Computer Vision Foundation. Except for this watermark, it is identical to the accepted version; the final published version of the proceedings is available on IEEE Xplore.", "bbox": [ 236, 0, 810, 46 ], "page_idx": 0 }, { "type": "page_footnote", "text": "*Work done during Jiashun Wang's internship at NVIDIA.", "bbox": [ 94, 886, 406, 900 ], "page_idx": 0 }, { "type": "page_number", "text": "8704", "bbox": [ 482, 944, 514, 955 ], "page_idx": 0 }, { "type": "text", "text": "topology, and usually include various accessories, such as a cloak or wings (see Fig. 1). These variations hinder the process of matching the pose of a stylized 3D character to that of a reference avatar, generally making manual rigging a requirement. Unfortunately, rigging is a tedious process that requires manual effort to create the skeleton and skinning weights for each character. Even when provided with manually annotated rigs, transferring poses from a source avatar onto stylized characters is not trivial when the source and target skeletons differ. Automating this procedure is still an open research problem and is the focus of many recent works [2, 4, 24, 52]. Meanwhile, non-stylized 3D humans and animals have been well-studied by numerous prior works [35, 40, 54, 62, 68]. A few methods generously provide readily available annotated datasets [11, 12, 41, 68], or carefully designed parametric models [40, 51, 68]. By taking advantage of these datasets [12, 41], several learning-based methods [7, 14, 35, 62, 67] disentangle and transfer poses between human meshes using neural networks. However, these methods (referred to as \"part-level\" in the following) carry out pose transfer by either globally deforming the whole body mesh [14, 22, 47, 67] or by transforming body parts [35, 48], both of which lead to overfitting on the training human meshes and fail to generalize to stylized characters with significantly different body part shapes. Interestingly, classical mesh deformation methods [55, 56] (referred to as \"local\" in the following) can transfer poses between a pair of meshes with significant shape differences by computing and transferring per-triangle transformations through correspondence. Though these methods require manual correspondence annotation between the source and target meshes, they provide a key insight that by transforming individual triangles instead of body parts, the mesh deformation methods are more agnostic to a part's shape and can generalize to meshes with different shapes.", "bbox": [ 76, 90, 472, 621 ], "page_idx": 1 }, { "type": "text", "text": "We marry the benefits of learning-based methods [7, 14, 35, 62, 67] with the classic local deformation approach [55] and present a model for unrigged, stylized character deformation guided by a non-stylized biped or quadruped avatar. Notably, our model only requires easily accessible posed human or animal meshes for training and can be directly applied to deform 3D stylized characters with a significantly different shape at inference. To this end, we implicitly operationalize the key insight from the local deformation method [55] by modeling the shape and pose of a 3D character with a correspondence-aware shape understanding module and an implicit pose deformation module. The shape understanding module learns to predict the part segmentation label (i.e., the coarse-level correspondence) for each surface point, besides representing the shape of a 3D character as a latent shape code. The pose deformation module is conditioned on the shape code and deforms individual surface point guided by a target pose code sampled", "bbox": [ 76, 628, 472, 902 ], "page_idx": 1 }, { "type": "text", "text": "from a prior pose latent space [50]. Furthermore, to encourage realistic deformation and generalize to rare poses, we propose a novel volume-based test-time training procedure that can be efficiently applied to unseen stylized characters.", "bbox": [ 496, 90, 890, 151 ], "page_idx": 1 }, { "type": "text", "text": "During inference, by mapping biped or quadruped poses from videos, in addition to meshes to the prior pose latent space using existing works [32, 51, 53], we can transfer poses from different modalities onto unrigged 3D stylized characters. Our main contributions are:", "bbox": [ 496, 152, 893, 226 ], "page_idx": 1 }, { "type": "list", "sub_type": "text", "list_items": [ "- We propose a solution to a practical and challenging task - learning a model for stylized 3D character deformation with only posed human or animal meshes.", "- We develop a correspondence-aware shape understanding module, an implicit pose deformation module, and a volume-based test-time training procedure to generalize the proposed model to unseen stylized characters and arbitrary poses in a zero-shot manner.", "- We carry out extensive experiments on both humans and quadrupeds to show that our method produces more visually pleasing and accurate deformations compared to baselines trained with comparable or more supervision." ], "bbox": [ 517, 227, 890, 422 ], "page_idx": 1 }, { "type": "text", "text": "2. Related Work", "text_level": 1, "bbox": [ 500, 436, 640, 452 ], "page_idx": 1 }, { "type": "text", "text": "Deformation Transfer. Deformation transfer is a longstanding problem in the computer graphics community [3, 6, 8, 9, 55, 65]. Sumner et al. [55] apply an affine transformation to each triangle of the mesh to solve an optimization problem that matches the deformation of the source mesh while maintaining the shape of the target mesh. Ben-Chen et al. [9] enclose the source and target shapes with two cages and transfer the Jacobians of the source deformation to the target shape. However, these methods need tedious human efforts to annotate the correspondence between the source and target shapes. More recently, several deep learning methods are developed to solve the deformation transfer task. However, they either require manually providing the correspondence [66] or cannot generalize [14, 22, 67] to stylized characters with different shapes. Gao et al. [22] propose a VAE-GAN based method to leverage the cycle consistency between the source and target shapes. Nonetheless, it can only work on shapes used in training. Wang et al. [62] introduce conditional normalization used in style transfer for 3D deformation transfer. But the method is limited to clothed-humans and cannot handle the large shape variations of stylized characters.", "bbox": [ 496, 462, 890, 792 ], "page_idx": 1 }, { "type": "text", "text": "We argue that these learning-based methods cannot generalize to stylized characters because they rely on encoding their global information (e.g., body or parts), which is different from traditional works that focus on local deformation, e.g., the affine transformation applied to each triangle in [55]. Using a neural network to encode the global information easily leads to overfitting. For example, models", "bbox": [ 496, 795, 890, 900 ], "page_idx": 1 }, { "type": "page_number", "text": "8705", "bbox": [ 482, 944, 514, 955 ], "page_idx": 1 }, { "type": "text", "text": "trained on human meshes cannot generalize to a stylized humanoid character. At the same time, early works only focus on local information and cannot model global information such as correspondence between the source and target shapes, which is why they all need human effort to annotate the correspondence. Our method tries to learn the correspondence and deform locally at the same time.", "bbox": [ 75, 90, 470, 196 ], "page_idx": 2 }, { "type": "text", "text": "Skeleton-based Pose Transfer. Besides mesh deformation transfer, an alternative way to transfer pose is to utilize skeletons. Motion retargeting is also a common name used for transferring poses from one motion sequence to another. Gleicher et al. [24] propose a space-time constrained solver aiming to satisfy the kinematics-level constraints and to preserve the characters' original identity. Following works [5, 19, 33] try to solve inverse-kinematics or inverse rate control to achieve pose transfer. There are also dynamics-based methods [4, 59] that consider physics during the retargeting process. Recently, learning-based methods [20, 27, 37, 60, 61] train deep neural networks to predict the transformation of the skeleton. Aberman et al. [2] propose a pooling-based method to transfer poses between meshes with different skeletons.", "bbox": [ 75, 209, 468, 435 ], "page_idx": 2 }, { "type": "text", "text": "All these works highly rely on the skeleton for pose transfer. Other works try to estimate the rigging of the template shape [7, 39, 52, 63, 64] when a skeleton is not available. But if the prediction of the skinning weights fails, the retargeting fails as well. Liao et al. [36] propose a model that learns to predict the skinning weights and pose transfer jointly using ground truth skinning weights and paired motion data as supervision, which limits the generalization of this method to categories where annotations are more scarce compared to humans (e.g., quadrupeds). Instead, our method uses posed human or animal meshes for training and deforms stylized characters of different shapes at inference.", "bbox": [ 75, 449, 468, 630 ], "page_idx": 2 }, { "type": "text", "text": "Implicit 3D shape representation. Implicit 3D shape representations have shown great success in reconstructing static shapes [13,16,18,21,23,29,42,43,49] and deformable ones [10,28,34,44-48,58]. DeepSDF [49] proposes to use an MLP to predict the signed distance field (SDF) value of a query point in 3D space, where a shape code is jointly optimized in an auto-decoding manner. Occupancy flow [45] generalizes the Occupancy Networks [42] to learn a temporally and spatially continuous vector field with a NeuralODE [15]. Inspired by parametric models, NPMs [47] disentangles and represents the shape and pose of dynamic humans by learning an implicit shape and pose function, respectively. Different from these implicit shape representation works that focus on reconstructing static or deformable meshes, we further exploit the inherent continuity and locality of implicit functions to deform stylized characters to match a target pose in a zero-shot manner.", "bbox": [ 75, 643, 470, 900 ], "page_idx": 2 }, { "type": "text", "text": "3. Method", "text_level": 1, "bbox": [ 500, 89, 589, 104 ], "page_idx": 2 }, { "type": "text", "text": "We aim to transfer the pose of a biped or quadruped avatar to an unrigged, stylized 3D character. We tackle this problem by modeling the shape and pose of a 3D character using a correspondence-aware shape understanding module and an implicit pose deformation module, inspired by classical mesh deformation methods [55, 56]. The shape understanding module (Sec. 3.1, Fig. 2) predicts a latent shape code and part segmentation label of a 3D character in rest pose, while the pose deformation module (Sec. 3.2, Fig. 3) deforms the character in the rest pose given the predicted shape code and a target pose code. Moreover, to produce natural deformations and generalize to rare poses unseen at training, we introduce an efficient volume-based test-time training procedure (Sec 3.3) for unseen stylized characters. All three modules, trained only with posed, unclothed human meshes, and unrigged, stylized characters in a rest pose, are directly applied to unseen stylized characters at inference. We explain our method for humans, and describe how we extend it to quadrupeds in Sec. 4.6.", "bbox": [ 496, 114, 890, 402 ], "page_idx": 2 }, { "type": "text", "text": "3.1. Correspondence-Aware Shape Understanding", "text_level": 1, "bbox": [ 498, 410, 887, 426 ], "page_idx": 2 }, { "type": "text", "text": "Given a 3D character in rest pose, we propose a shape understanding module to represent its shape information as a latent code, and to predict a body part segmentation label for each surface point.", "bbox": [ 496, 434, 890, 494 ], "page_idx": 2 }, { "type": "text", "text": "To learn a representative shape code, we employ an implicit auto-decoder [47, 49] that reconstructs the 3D character taking the shape code as input. During training, we jointly optimize the shape code of each training sample and the decoder. Given an unseen character (i.e., a stylized 3D character) during inference, we obtain its shape code by freezing the decoder and optimizing the shape code to reconstruct the given character. Specifically, as shown in Fig. 2, given the concatenation of a query point $x \\in \\mathbb{R}^3$ and the shape code $s \\in \\mathbb{R}^d$ , we first obtain an embedding $e \\in \\mathbb{R}^d$ via an MLP denoted as $\\mathcal{F}$ . Conditioned on the embedding $e$ , the occupancy $\\hat{o}_x \\in \\mathbb{R}$ of $x$ is then predicted by another MLP denoted as $\\mathcal{O}$ . The occupancy indicates if the query point $x$ is inside or outside the body surface and can be supervised by the ground truth occupancy as:", "bbox": [ 496, 494, 890, 720 ], "page_idx": 2 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\mathcal {O}} = - \\sum_ {x} \\left(o _ {x} \\cdot \\log \\left(\\hat {o} _ {x}\\right) + \\left(1 - o _ {x}\\right) \\cdot \\log \\left(1 - \\hat {o} _ {x}\\right)\\right), \\tag {1}\n$$\n", "text_format": "latex", "bbox": [ 509, 731, 890, 762 ], "page_idx": 2 }, { "type": "text", "text": "where $o_x$ is the ground truth occupancy at point $x$ .", "bbox": [ 500, 765, 831, 779 ], "page_idx": 2 }, { "type": "text", "text": "Since our shape code eventually serves as a condition for the pose deformation module, we argue that it should also capture the part correspondence knowledge across different instances, in addition to the shape information (e.g., height, weight, and shape of each body part). This insight has been utilized by early local mesh deformation method [55], which explicitly utilizes correspondence to transfer local transformations between the source and target meshes. Our", "bbox": [ 496, 780, 890, 900 ], "page_idx": 2 }, { "type": "page_number", "text": "8706", "bbox": [ 482, 944, 514, 955 ], "page_idx": 2 }, { "type": "image", "img_path": "images/84b1ba766b54c9ef332c96b1d8eabc7c5bc78378df1476b6d69cda375015e6e6.jpg", "image_caption": [ "Figure 2. The shape understanding module (Sec. 3.1). Given a query point and a learnable shape code, we take MLPs to predict the occupancy, part segmentation label and further use an inverse MLP to regress the query point." ], "image_footnote": [], "bbox": [ 101, 78, 851, 265 ], "page_idx": 3 }, { "type": "image", "img_path": "images/9368775deb240878960eedeec753f6ad31bb00e7b841c77c983e7bcc2ec94a62.jpg", "image_caption": [ "Figure 3. The pose deformation module (Sec. 3.2). Given a query point on the surface, the learned shape code and a target pose code, we use an MLP to predict the offset of the query point." ], "image_footnote": [], "bbox": [ 81, 313, 467, 433 ], "page_idx": 3 }, { "type": "text", "text": "pose deformation process could also benefit from learning part correspondence. Take the various headgear, hats, and horns on the stylized characters's heads in Fig. 1 as an example. If these components can be \"understood\" as extensions of the character's heads by their shape codes, they will move smoothly with the character's heads during pose deformation. Thus, besides mesh reconstruction, we effectively task our shape understanding module with an additional objective: predicting part-level correspondence instantiated as the part segmentation label. Specifically, we propose to utilize an MLP $\\mathcal{P}$ to additionally predict a part label $p_x = (p_x^1,\\dots,p_x^K)^T\\in \\mathbb{R}^K$ for each surface point $x$ . Thanks to the densely annotated human mesh dataset, we can also supervise part segmentation learning with ground truth labels via:", "bbox": [ 75, 497, 468, 723 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\mathcal {P}} = \\sum_ {x} (- \\sum_ {k = 1} ^ {K} \\mathbb {1} _ {x} ^ {k} \\log \\left(p _ {x} ^ {k}\\right)), \\tag {2}\n$$\n", "text_format": "latex", "bbox": [ 171, 729, 468, 771 ], "page_idx": 3 }, { "type": "text", "text": "where $K$ is the total number of body parts, and $\\mathbb{1}_x^k = 1$ if $x$ belongs to the $k^{th}$ part and $\\mathbb{1}_x^k = 0$ otherwise.", "bbox": [ 75, 779, 468, 810 ], "page_idx": 3 }, { "type": "text", "text": "To prepare the shape understanding module for stylized characters during inference, besides unclothed human meshes, we also include unrigged 3D stylized characters in rest pose during training. These characters in rest pose are easily accessible and do not require any annotation. For shape reconstruction, Eq. 1 can be similarly applied to the", "bbox": [ 75, 810, 468, 901 ], "page_idx": 3 }, { "type": "text", "text": "stylized characters. However, as there is no part segmentation annotation for stylized characters, we propose a self-supervised inverse constraint inspired by correspondence learning methods [17,38] to facilitate part segmentation prediction on these characters. Specifically, we reconstruct the query point's coordinates from the concatenation of the shape code $s$ and the embedding $e$ through an MLP $\\mathcal{Q}$ and add an auxiliary objective as:", "bbox": [ 496, 330, 892, 450 ], "page_idx": 3 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\mathcal {Q}} = \\left| \\left| \\mathcal {Q} (s, e) - x \\right| \\right| ^ {2}. \\tag {3}\n$$\n", "text_format": "latex", "bbox": [ 616, 462, 890, 479 ], "page_idx": 3 }, { "type": "text", "text": "Intuitively, for stylized characters without part annotation, the model learned without this objective may converge to a trivial solution where similar embeddings are predicted for points with the same occupancy value, even when they are far away from each other, and belong to different body parts. Tab. 4 further quantitatively verifies the effectiveness of this constraint. Beyond facilitating shape understanding, the predicted part segmentation label is further utilized in the volume-based test-time training module which will be introduced in Sec. 3.3.", "bbox": [ 496, 489, 892, 638 ], "page_idx": 3 }, { "type": "text", "text": "3.2. Implicit Pose Deformation Module", "text_level": 1, "bbox": [ 500, 650, 802, 666 ], "page_idx": 3 }, { "type": "text", "text": "Given the learned shape code and a target pose, the pose deformation module deforms each surface point of the character to match the target pose. In the following, we first describe how we represent a human pose and then introduce the implicit function used for pose deformation.", "bbox": [ 496, 672, 890, 748 ], "page_idx": 3 }, { "type": "text", "text": "Instead of learning a latent pose space from scratch as in [36, 47], we propose to represent a human pose by the corresponding pose code in the latent space of VPoser [51]. Our intuition is that VPoser is trained with an abundance of posed humans from the large-scale AMASS dataset [41]. This facilitates faster training and provides robustness to overfitting. Furthermore, human poses can be successfully estimated from different modalities (e.g., videos or meshes), and mapped to the latent space of VPoser by existing methods [32, 51, 53]. By taking advantage of these works, our", "bbox": [ 496, 750, 892, 900 ], "page_idx": 3 }, { "type": "page_number", "text": "8707", "bbox": [ 480, 944, 514, 955 ], "page_idx": 3 }, { "type": "text", "text": "model can be applied to transfer poses from various modalities to an unrigged stylized character without any additional effort. A few examples can be found in the supplementary.", "bbox": [ 75, 90, 468, 136 ], "page_idx": 4 }, { "type": "text", "text": "To deform a character to match the given pose, we learn a neural implicit function $\\mathcal{M}$ that takes the sampled pose code $m\\in \\mathbb{R}^{32}$ , the learned shape code, and a query point $x$ around the character's surface as inputs and outputs the offset (denoted as $\\Delta \\hat{x}\\in \\mathbb{R}^3$ ) of $x$ in 3D space. Given the densely annotated human mesh dataset, we directly use the ground truth offset $\\Delta x$ as supervision. The training objective for our pose deformation module is defined as:", "bbox": [ 75, 136, 468, 257 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {\\mathcal {D}} = \\sum_ {x} \\left| \\left| \\Delta \\hat {x} - \\Delta x \\right| \\right| ^ {2}. \\tag {4}\n$$\n", "text_format": "latex", "bbox": [ 186, 268, 468, 299 ], "page_idx": 4 }, { "type": "text", "text": "Essentially, our implicit pose deformation module is similar in spirit to early local mesh deformation methods [55] and has two key advantages compared to the part-level pose transfer methods [22, 36, 62]. First, our implicit pose deformation network is agnostic to mesh topology and resolution. Thus our model can be directly applied to unseen 3D stylized characters with significantly different resolutions and mesh topology compared to the training human meshes during inference. Second, stylized characters often include distinct body part shapes compared to humans. For example, the characters shown in Fig. 1 include big heads or various accessories. Previous part-level methods [36] that learn to predict a bone transformation and skinning weight for each body part usually fail on these unique body parts, since they are different from the corresponding human body parts used for training. In contrast, by learning to deform individual surface point, implicit functions are more agnostic to the overall shape of a body part and thus can generalize better to stylized characters with significantly different body part shapes. Fig. 4 and Fig. 6 show these advantages.", "bbox": [ 75, 309, 470, 611 ], "page_idx": 4 }, { "type": "text", "text": "3.3. Volume-based Test-time Training", "text_level": 1, "bbox": [ 76, 619, 369, 636 ], "page_idx": 4 }, { "type": "text", "text": "The shape understanding and pose deformation modules discussed above are trained with only posed human meshes and unrigged 3D stylized characters in rest pose. When applied to unseen characters with significantly different shapes, we observe surface distortion introduced by the pose deformation module. Moreover, it is challenging for the module to fully capture the long tail of the pose distribution. To resolve these issues, we propose to apply test-time training [57] and fine-tune the pose deformation module on unseen stylized characters.", "bbox": [ 75, 643, 468, 794 ], "page_idx": 4 }, { "type": "text", "text": "To encourage natural pose deformation, we further propose a volume-preserving constraint during test-time training. Our key insight is that preserving the volume of each part in the rest pose mesh during pose deformation results in less distortion [35, 62]. However, it is non-trivial to compute the precise volume of each body part, which can have complex geometry. Instead, we propose to preserve the Eu", "bbox": [ 75, 795, 468, 900 ], "page_idx": 4 }, { "type": "text", "text": "ccludean distance between pairs of vertices sampled from the surface of the mesh, as a proxy for constraining the volume. Specifically, given a mesh in rest pose, we randomly sample two points $x_{i}^{c}$ and $x_{j}^{c}$ on the surface within the same part $c$ using the part segmentation prediction from the shape understanding module. We calculate the offset of these two points $\\Delta \\hat{x}_{i}^{c}$ and $\\Delta \\hat{x}_{j}^{c}$ using our pose deformation module and minimize the change in the distance between them by:", "bbox": [ 496, 90, 890, 212 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {v} = \\sum_ {c} \\sum_ {i} \\sum_ {j} \\left(\\left| \\left| x _ {i} ^ {c} - x _ {j} ^ {c} \\right| \\right| - \\left| \\left| \\left(x _ {i} ^ {c} + \\Delta \\hat {x} _ {i} ^ {c}\\right) - \\left(x _ {j} ^ {c} + \\Delta \\hat {x} _ {j} ^ {c}\\right) \\right| \\right|\\right) ^ {2}. \\tag {5}\n$$\n", "text_format": "latex", "bbox": [ 498, 222, 893, 268 ], "page_idx": 4 }, { "type": "text", "text": "By sampling a large number of point pairs within a part and minimizing Eq. 5, we can approximately maintain the volume of each body part during pose deformation.", "bbox": [ 496, 265, 890, 310 ], "page_idx": 4 }, { "type": "text", "text": "Furthermore, in order to generalize the pose deformation module to long-tail poses that are rarely seen during training, we propose to utilize the source character in rest pose and its deformed shape as paired training data during test-time training. Specifically, we take the source character in rest pose, its target pose code, and its optimized shape code as inputs and we output the movement $\\Delta \\hat{x}^{dr}$ , where $x^{dr}$ is a query point from the source character. We minimize the L2 distance between the predicted movement $\\Delta \\hat{x}^{dr}$ and the ground truth movement $\\Delta x^{dr}$ ,", "bbox": [ 496, 310, 890, 460 ], "page_idx": 4 }, { "type": "equation", "text": "\n$$\n\\mathcal {L} _ {d r} = \\sum_ {x ^ {d r}} \\left| \\left| \\Delta \\hat {x} ^ {d r} - \\Delta x ^ {d r} \\right| \\right| ^ {2}. \\tag {6}\n$$\n", "text_format": "latex", "bbox": [ 594, 472, 890, 503 ], "page_idx": 4 }, { "type": "text", "text": "Besides the volume-preserving constraint and the reconstruction of the source character, we also employ the edge loss $\\mathcal{L}_e$ used in [25, 36, 62]. Overall, the objectives for the test-time training procedure are $\\mathcal{L}_{\\mathcal{T}} = \\lambda_v\\mathcal{L}_v + \\lambda_e\\mathcal{L}_e + \\lambda_{dr}\\mathcal{L}_{dr}$ , where $\\lambda_v, \\lambda_e$ , and $\\lambda_{dr}$ are hyper-parameters balancing the loss weights.", "bbox": [ 496, 507, 890, 598 ], "page_idx": 4 }, { "type": "text", "text": "4. Experiments", "text_level": 1, "bbox": [ 500, 611, 632, 628 ], "page_idx": 4 }, { "type": "text", "text": "4.1. Datasets", "text_level": 1, "bbox": [ 500, 635, 601, 650 ], "page_idx": 4 }, { "type": "text", "text": "To train the shape understanding module, we use 40 human meshes sampled from the SMPL [40] parametric model. We use both the occupancy and part segmentation label of these meshes as supervision (see Sec. 3.1). To generalize the shape understanding module to stylized characters, we further include 600 stylized characters from RigNet [63]. Note that we only use the rest pose mesh (i.e., occupancy label) of the characters in [63] for training. To train our pose deformation module, we construct paired training data by deforming each of the 40 SMPL characters discussed above with 5000 pose codes sampled from the VPoser's [50] latent space. In total, we collect 200,000 training pairs, with each pair including an unclothed human mesh in rest pose and the same human mesh in target pose.", "bbox": [ 496, 659, 890, 869 ], "page_idx": 4 }, { "type": "text", "text": "After training the shape understanding and pose deformation modules, we test them on the Mixamo [1] dataset,", "bbox": [ 498, 869, 890, 900 ], "page_idx": 4 }, { "type": "page_number", "text": "8708", "bbox": [ 482, 944, 514, 955 ], "page_idx": 4 }, { "type": "text", "text": "which includes challenging stylized characters, and the MGN [11] dataset, which includes clothed humans. The characters in both datasets have different shapes compared to the unclothed SMPL meshes we used for training, demonstrating the generalization ability of the proposed method. Following [36], we test on 19 stylized characters, with each deformed by 28 motion sequences from the Mixamo dataset. For the MGN dataset, we test on 16 clothed characters, with each deformed by 200 target poses. Both the testing characters and poses are unseen during training.", "bbox": [ 75, 90, 468, 241 ], "page_idx": 5 }, { "type": "text", "text": "For quadrupeds, since there is no dataset including large-scale paired stylized quadrupeds for quantitative evaluation, we split all characters from the SMAL [68] dataset and use the first 34 shapes (i.e., cats, dogs, and horses) for training. We further collect 81 stylized quadrupeds in rest pose from the RigNet [63] to improve generalization of the shape understanding module. Similarly to the human category, we use occupancy and part segmentation supervision for the SMAL shapes and only the occupancy supervision for RigNet meshes. To train the pose deformation module, we deform each of the 34 characters in SMAL by 2000 poses sampled from the latent space of BARC [54], a 3D reconstruction model trained for the dog category. We quantitatively evaluate our model on the hippo meshes from the SMAL dataset, which have larger shape variance compared to the cats, dogs, and horses used for training. We produce the testing data by deforming each hippo mesh with 500 unseen target poses from SMAL [68]. We show qualitative pose transfer on stylized quadrupeds in Fig. 1.", "bbox": [ 75, 242, 470, 530 ], "page_idx": 5 }, { "type": "text", "text": "4.2. Implementation Details", "text_level": 1, "bbox": [ 76, 540, 294, 556 ], "page_idx": 5 }, { "type": "text", "text": "We use the ADAM [30] optimizer to train both the shape understanding and pose deformation modules. For the shape understanding module, we use a learning rate of $1e - 4$ for both the decoder and shape code optimization, with a batch size of 64. Given a new character at inference time, we fix the decoder and only optimize the shape code for the new character with the same optimizer and learning rate. For the pose deformation module, we use a learning rate of $3e - 4$ with a batch size of 128. For test-time training, we use a batch size of 1 and a learning rate of $5e - 3$ with the ADAM optimizer. We set $\\lambda_v$ , $\\lambda_e$ , and $\\lambda_{dr}$ (See Sec. 3.3) as 0.05, 0.01, and 1 respectively.", "bbox": [ 75, 564, 468, 744 ], "page_idx": 5 }, { "type": "text", "text": "4.3. Metrics and Baselines for Comparison", "text_level": 1, "bbox": [ 76, 756, 406, 772 ], "page_idx": 5 }, { "type": "text", "text": "Metrics. We use Point-wise Mesh Euclidean Distance (PMD) [36, 62] to evaluate pose transfer error. The PMD metric reveals pose similarity of the predicted deformation compared to its ground truth. However, as shown in Fig. 4, PMD can not fully show the smoothness and realism of the generated results. Thus, we adopt an edge length score (ELS) metric to evaluate the character's smoothness after the deformation. Specifically, we compare each edge's", "bbox": [ 75, 779, 467, 900 ], "page_idx": 5 }, { "type": "table", "img_path": "images/df81a559b2c5a17b2caaba17ccca1bc676cda20344b82987e19d802d405b76ac.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Dataset</td><td>Metric</td><td>SPT*(full) [36]</td><td>NBS [35]</td><td>SPT [36]</td><td>Ours</td></tr><tr><td rowspan=\"2\">MGN [11]</td><td>PMD ↓</td><td>1.62</td><td>1.33</td><td>1.82</td><td>0.99</td></tr><tr><td>ELS ↑</td><td>0.86</td><td>0.70</td><td>0.85</td><td>0.89</td></tr><tr><td rowspan=\"2\">Mixamo [1]</td><td>PMD ↓</td><td>3.05</td><td>7.04</td><td>5.29</td><td>5.06</td></tr><tr><td>ELS ↑</td><td>0.61</td><td>0.66</td><td>0.59</td><td>0.88</td></tr></table>", "bbox": [ 506, 89, 883, 155 ], "page_idx": 5 }, { "type": "text", "text": "Table 1. Quantitative comparison on MGN and Mixamo. Our method achieves the lowest PMD with the highest ELS. We provide the performance of the SPT*(full) method, which uses more supervision than the other methods as a reference. Our method is even better or comparable to it.", "bbox": [ 498, 165, 890, 234 ], "page_idx": 5 }, { "type": "text", "text": "length in the deformed mesh with the corresponding edge's length in the ground truth mesh. We define the score as", "bbox": [ 498, 244, 890, 275 ], "page_idx": 5 }, { "type": "equation", "text": "\n$$\n\\frac {1}{| \\mathcal {E} |} \\sum_ {\\{i, j \\} \\sim \\mathcal {E}} 1 - \\left| \\frac {| | \\hat {V} _ {i} - \\hat {V} _ {j} | | _ {2}}{| | V _ {i} - V _ {j} | | _ {2}} - 1 \\right|, \\tag {7}\n$$\n", "text_format": "latex", "bbox": [ 580, 287, 890, 330 ], "page_idx": 5 }, { "type": "text", "text": "where $\\mathcal{E}$ indicates all edges of the mesh, $|\\mathcal{E}|$ is the number of the edges in the mesh. $\\hat{V}_i$ and $\\hat{V}_j$ are the vertices in the deformed mesh. $V_{i}$ and $V_{j}$ are the vertices in the ground truth mesh. For all the evaluation metrics, we scale the template character to be 1 meter tall, following [36].", "bbox": [ 496, 335, 890, 411 ], "page_idx": 5 }, { "type": "text", "text": "Baselines. We compare our method with Neural Blend Shapes (NBS) [35] and Skeleton-free Pose Transfer (SPT) [36]. NBS is a rigging prediction method trained on the SMPL and MGN datasets, which include naked and clothed human meshes with ground truth rigging information. For SPT, we show the results of two versions, one is trained only on the AMASS dataset, named SPT, which has a comparable level of supervision to our method. We also test the SPT*(full) version, which is trained on the AMASS, RigNet and Mixamo datasets, using both stylized characters' skinning weights as supervision and paired stylized characters in rest pose and target pose.", "bbox": [ 496, 412, 890, 594 ], "page_idx": 5 }, { "type": "text", "text": "4.4. Human-like Character Pose Transfer", "text_level": 1, "bbox": [ 500, 604, 821, 619 ], "page_idx": 5 }, { "type": "text", "text": "We report the PMD metric on the MGN and Mixamo datasets in Tab. 1. We also include the performance of SPT*(full) for reference. On the MGN dataset which includes clothed humans, our method which is trained with only unclothed humans achieve the best PMD score than all baseline methods, including baselines trained with more supervision (i.e., the NBS [35] learned with clothed humans and the SPT*(full) [36] learned with skinning weight and paired motion data). For the stylized characters, our method outperforms the SPT baseline learned with a comparable amount of supervision and gets competitive results with the NBS [35] and SPT*(full) baseline trained with more supervision. Furthermore, when testing on the more challenging, less human-like characters (e.g., a mouse with a big head in Fig. 1), the baselines produce noticeable artifacts and rough surfaces, which can be observed in the qualitative comparisons in Fig. 4. We provide the PMD value for each character in the supplementary.", "bbox": [ 496, 628, 890, 900 ], "page_idx": 5 }, { "type": "page_number", "text": "8709", "bbox": [ 482, 944, 514, 955 ], "page_idx": 5 }, { "type": "image", "img_path": "images/4373cf912884415bb198f2ddc519573b1b1bd0db9d3334d3f0dc36b7681ae064.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 169, 71, 243, 154 ], "page_idx": 6 }, { "type": "image", "img_path": "images/c3dff5e8dad3476f2d059883ef3d74710ea2d082abb446921120c15296e71eaf.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 169, 157, 243, 233 ], "page_idx": 6 }, { "type": "image", "img_path": "images/952d1fa77e29412929bf41fbba9b85a6ff632e47932a3704ef5124044cf10bce.jpg", "image_caption": [ "Source" ], "image_footnote": [], "bbox": [ 171, 239, 230, 310 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b1e6dd9f49d0f714b3af78032fbc4563ca35b398a8d566e0f0b1a4db98344968.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 258, 73, 357, 152 ], "page_idx": 6 }, { "type": "image", "img_path": "images/3a7faa429e1cac3f2a004eb6235ddf01d8e00711b8c40b5dfcc94d7124f2b473.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 261, 154, 354, 233 ], "page_idx": 6 }, { "type": "image", "img_path": "images/486462331e99d4af63c55bab579dded47eaed63a4861602bab0512fb89cf06fc.jpg", "image_caption": [ "Target" ], "image_footnote": [], "bbox": [ 264, 238, 357, 313 ], "page_idx": 6 }, { "type": "image", "img_path": "images/e81d777fd3fcf00216ef88027d1be0cfe145ddf5d34f3843baeff045094f35f8.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 369, 73, 472, 232 ], "page_idx": 6 }, { "type": "image", "img_path": "images/add374012e2123a228fcefe50ac76f5ab02ddf5d96b4deeff31e6509a1abf23e.jpg", "image_caption": [ "NBS [35]" ], "image_footnote": [], "bbox": [ 388, 238, 449, 313 ], "page_idx": 6 }, { "type": "image", "img_path": "images/cd03b14f06fc44b5f5948f3046818372a221cbafefcd8bc05645c834e87bffa7.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 496, 71, 578, 154 ], "page_idx": 6 }, { "type": "image", "img_path": "images/ed7ecd982161013fa5ed72db836e9357462eda131b179bc48db7d1b9db2cb163.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 496, 154, 576, 236 ], "page_idx": 6 }, { "type": "image", "img_path": "images/608f1fbb2f0219e590b4adf949c59768bc908cc850bbaac5cdd0db00d9a53261.jpg", "image_caption": [ "SPT [36]" ], "image_footnote": [], "bbox": [ 508, 239, 565, 311 ], "page_idx": 6 }, { "type": "image", "img_path": "images/0525239d0042cc48abf9e1689fc7ce77d739b320fa767bc0d09b3929d1475690.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 612, 71, 669, 152 ], "page_idx": 6 }, { "type": "image", "img_path": "images/2c977e4e5a8760dfd73cb0657491914acda2ba3239bc9daef811cdeab81b6850.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 612, 154, 692, 234 ], "page_idx": 6 }, { "type": "image", "img_path": "images/ee6cb725ab001d3127ba7fdfc22842d58bbb3a697126f8a3c69c2e3bae3de251.jpg", "image_caption": [ "Ours" ], "image_footnote": [], "bbox": [ 619, 238, 678, 313 ], "page_idx": 6 }, { "type": "image", "img_path": "images/238231f66f59fef062c826ccc38980589d86e8a09236c4769eabe7137514659c.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 720, 71, 797, 154 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b9a701a555f870eeececddefa3c053b9380b1dad28769b8d15b8461255ead581.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 722, 154, 795, 234 ], "page_idx": 6 }, { "type": "image", "img_path": "images/3e575671bfe48c8a1a7512eb1aaf766a19aa0fafbff6e85a954d9ff09e98021c.jpg", "image_caption": [ "GT" ], "image_footnote": [], "bbox": [ 728, 238, 792, 311 ], "page_idx": 6 }, { "type": "image", "img_path": "images/28a16782138344dbf2157544077b57705a8741cef1658f2c44d1f82f17586ce9.jpg", "image_caption": [ "Figure 5. Part segmentation visualization. NBS makes wrong predictions for hair while SPT may mix the upper legs." ], "image_footnote": [], "bbox": [ 91, 386, 434, 648 ], "page_idx": 6 }, { "type": "text", "text": "We show the ELS score comparison of different methods on the MGN and Mixamo datasets in Tab. 1. For both clothed humans and stylized characters, our method can generate more realistic results which are consistent with the target mesh and achieves the best ELS score.", "bbox": [ 75, 700, 468, 775 ], "page_idx": 6 }, { "type": "text", "text": "We visually compare our method and the baseline methods in Fig. 4 on the Mixamo dataset. Although NBS is trained with a clothed-human dataset, when testing on the human-like characters, it still fails on parts that are separate from the body such as the hair and the pants. When using only naked human meshes as supervision, SPT cannot generalize to challenging human-like characters, producing rough mesh surface with spikes.", "bbox": [ 75, 779, 470, 902 ], "page_idx": 6 }, { "type": "image", "img_path": "images/480e4d440ac18475299a55cbd4e001af2d9ae4c3a990eda816afb0c67df4c577.jpg", "image_caption": [ "Figure 4. Qualitative comparison on Mixamo. The average PMD of these three results for NBS, SPT, and Ours are 8.16, 6.13, and 5.16 respectively and the average ELS for NBS, SPT, and Ours are 0.65, 0.78, and 0.93 respectively. Our method can successfully transfer the pose to challenging stylized characters (e.g., the mouse with a big head in the second row)." ], "image_footnote": [], "bbox": [ 506, 381, 624, 434 ], "page_idx": 6 }, { "type": "image", "img_path": "images/8cce0cbc2c5271d9463dbb46bc10c1a1b56108aafeda84a396a145f818b87816.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 508, 439, 625, 479 ], "page_idx": 6 }, { "type": "image", "img_path": "images/10a7eafaed4ee1a0eb0a58c40916888b9122ff4860b3fc3a70e31137b6426508.jpg", "image_caption": [ "SPT [36]" ], "image_footnote": [], "bbox": [ 511, 487, 622, 537 ], "page_idx": 6 }, { "type": "image", "img_path": "images/9f2bfc42b2287de21b24f395c4be405319035d4b96ab4529afe1588ede1f50ae.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 633, 382, 741, 428 ], "page_idx": 6 }, { "type": "image", "img_path": "images/22672dbf3808361df124c6dee0ccc9a194ed70ba2360e598c0d2e4622fe62124.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 633, 438, 750, 479 ], "page_idx": 6 }, { "type": "image", "img_path": "images/21f7c6cc2c5c91b5743f1aa1e50965fcf337a4ddff7269bbfc7896af3776ffaf.jpg", "image_caption": [ "Ours" ], "image_footnote": [], "bbox": [ 633, 487, 743, 536 ], "page_idx": 6 }, { "type": "image", "img_path": "images/017e7ce6912aaa677ff04da374dba94d3829be6008c0d2a19eacd9b95346d390.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 751, 382, 857, 429 ], "page_idx": 6 }, { "type": "image", "img_path": "images/4bdb35185ddeab2f0f2d7bc5aaaebc7cbd67ac759c0ab2c00383fd165bab2ad4.jpg", "image_caption": [], "image_footnote": [], "bbox": [ 754, 438, 872, 481 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b70da364d0efbbd894e4ad8718211b20b1a9777381f9d1d7a40d2d2bf72e3534.jpg", "image_caption": [ "GT", "Figure 6. Quadrupedal pose transfer visualization. Our method can achieve smooth and accurate pose transfer while SPT fails on the mouth and leg regions." ], "image_footnote": [], "bbox": [ 754, 487, 864, 535 ], "page_idx": 6 }, { "type": "table", "img_path": "images/cacbf14f020635b037d362c51c25b3bc2e0add3ea22e75a482015375212a1382.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Metric</td><td>NBS [35]</td><td>SPT [36]</td><td>Ours</td></tr><tr><td>Accuracy ↑</td><td>67.8%</td><td>75.6%</td><td>86.9%</td></tr></table>", "bbox": [ 558, 621, 834, 652 ], "page_idx": 6 }, { "type": "text", "text": "Table 2. Part prediction accuracy on Mixamo [1]. Our method achieves the best part segmentation accuracy.", "bbox": [ 500, 662, 890, 691 ], "page_idx": 6 }, { "type": "text", "text": "4.5. Part Understanding Comparison", "text_level": 1, "bbox": [ 500, 710, 787, 728 ], "page_idx": 6 }, { "type": "text", "text": "As discussed in Sec. 3.1, part segmentation plays an important role in both shape understanding and pose deformation. Though NBS [35] and SPT [36] do not explicitly predict part segmentation label, they are both skinning weight-based methods and we can derive the part segmentation label from the predicted skinning weights. Specifically, by selecting the maximum weight of each vertex, we can convert the skinning weight prediction to part segmentation labels for the vertices. We compare our part prediction results with those derived from SPT and NBS. We report the part segmentation accuracy on the Mixamo datasets in Tab. 2", "bbox": [ 496, 734, 893, 902 ], "page_idx": 6 }, { "type": "page_number", "text": "8710", "bbox": [ 482, 944, 514, 955 ], "page_idx": 6 }, { "type": "image", "img_path": "images/8c1b2f4ff36dcae4437e98663db3b57ac789d1a88eb4f73a2ca28d0574424ce4.jpg", "image_caption": [ "Figure 7. Qualitative comparison for ablation study. Removing the constraint (eq. 1) in shape understanding leads to wrong pose deformation results. The volume preserving loss (eq. 5) helps to maintain the identity, e.g., the thickness of the arms in first row." ], "image_footnote": [], "bbox": [ 89, 73, 441, 314 ], "page_idx": 7 }, { "type": "table", "img_path": "images/3678981c2558f768c774c1d992e16cc744308b5218126001fdf01af245c32d3a.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Metric</td><td>SPT [36]</td><td>Ours</td><td>Metric</td><td>SPT [36]</td><td>Ours</td></tr><tr><td>PMD ↓</td><td>10.28</td><td>8.28</td><td>ELS ↑</td><td>0.28</td><td>0.86</td></tr></table>", "bbox": [ 101, 383, 442, 414 ], "page_idx": 7 }, { "type": "text", "text": "and visualize the part segmentation results in Fig. 5. Even trained with only part segmentation supervision of human meshes, our method can successfully segment each part for the stylized characters. On the contrary, SPT uses graph convolution network [31] to predict the skinning weights. When training only with human meshes, it often fails to distinguish different parts. As shown in Fig. 5, it mixes up the right and left upper legs, and incorrectly classifies the shoulder as the head. Though NBS is trained with clothed humans, it always classifies human hair as the human body for characters from Mixamo. This is because that NBS uses the MeshCNN [26] as the shape encoder. As a result, it is sensitive to mesh topology and cannot generalize to meshes with disconnected parts (e.g., disconnected hair and head). Tab. 2 further quantitatively demonstrates that our method achieves the best part segmentation accuracy, demonstrating its ability to correctly interpret the shape and part information in stylized characters.", "bbox": [ 75, 458, 472, 731 ], "page_idx": 7 }, { "type": "text", "text": "4.6. Quadrupedal Pose Transfer Comparison", "text_level": 1, "bbox": [ 76, 741, 426, 758 ], "page_idx": 7 }, { "type": "text", "text": "To further show the generalization ability of our method, we conduct experiments on quadrupeds. We report the PMD and ELS score of our method and the SPT [36] in Tab. 3. When testing on hippos with large shape gap from the training meshes, SPT has a hard time generalizing both in terms of pose transfer accuracy and natural deformation. While our method achieves both better qualitative and quantitative results. We visualize the qualitative comparisons in Fig. 6. SPT produces obvious artifacts on the hippo's mouth", "bbox": [ 75, 763, 468, 902 ], "page_idx": 7 }, { "type": "image", "img_path": "images/9c2fc818be70357453cc8987f0da7374f84f7b0d10915ad2a88d0bf0c98689c4.jpg", "image_caption": [ "Figure 8. Part prediction on stylized quadrupeds. Our method successfully predicts the parts of unseen stylized quadrupeds." ], "image_footnote": [], "bbox": [ 517, 73, 867, 143 ], "page_idx": 7 }, { "type": "table", "img_path": "images/654945bb1d1502ca0e35cb28c00ec9d2eea13ee4e035665264b2cada172ef8b6.jpg", "table_caption": [ "Table 3. Comparison on Hippos from SMAL [68]. Our method achieves better pose transfer accuracy with more smooth results." ], "table_footnote": [], "table_body": "<table><tr><td>Metric</td><td>Ours w/o inv</td><td>Ours w/o volume</td><td>Ours</td></tr><tr><td>PMD ↓</td><td>1.26</td><td>1.02</td><td>0.99</td></tr><tr><td>ELS ↑</td><td>0.88</td><td>0.88</td><td>0.89</td></tr></table>", "bbox": [ 542, 185, 846, 228 ], "page_idx": 7 }, { "type": "text", "text": "Table 4. Ablation study on inverse MLP and volume preserving loss. The inverse MLP and volume preserving loss helps to improve pose transfer accuracy and produce smooth deformation.", "bbox": [ 498, 234, 890, 277 ], "page_idx": 7 }, { "type": "text", "text": "and legs, while our method achieves accurate pose transfer and maintains the shape characteristics of the original character at the same time. We provide more results in the supplementary. We also show the part segmentation results on stylized characters by our method in Fig. 8. Even for unique parts such as the hats and antlers, our method correctly assigns them to the head part.", "bbox": [ 496, 285, 890, 391 ], "page_idx": 7 }, { "type": "text", "text": "4.7. Ablation Study", "text_level": 1, "bbox": [ 500, 400, 651, 416 ], "page_idx": 7 }, { "type": "text", "text": "To evaluate the key components of our method, we conduct ablation studies on the MGN dataset by removing the inverse constraint (Eq. 3) in the shape understanding module and the volume-preserving loss (Eq. 5) used during the test-time training produce, we name them as \"ours w/o inv\" and \"ours w/o $v$ \" respectively. We report the PMD and ELS metrics in Tab. 4. The model learned without the inverse constraint or volume-preserving loss has worse PMD and ELS score than our full model, indicating the contribution of these two objectives. We also provide qualitative results in Fig. 7. We use red boxes to point out the artifacts. As shown in Fig. 7, our model trained without the inverse constraint produces less accurate pose transfer results. Moreover, adding the volume-preserving loss helps to maintain the character's local details such as the thickness of the arms.", "bbox": [ 496, 424, 890, 664 ], "page_idx": 7 }, { "type": "text", "text": "5. Conclusion", "text_level": 1, "bbox": [ 500, 679, 617, 694 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we present a model that deforms unrigged, stylized characters guided by a biped or quadruped avatar. Our model is trained with only easily accessible posed human or animal meshes, yet can be applied to unseen stylized characters in a zero-shot manner during inference. To this end, we draw key insights from classic mesh deformation method and develop a correspondence-aware shape understanding module, an implicit pose deformation module and a volume-based test-time training procedure. We carry out extensive experiments on both the biped and quadruped category and show that our method produces more realistic and accurate deformation compared to baselines learned with comparable or more supervision.", "bbox": [ 496, 704, 890, 900 ], "page_idx": 7 }, { "type": "page_number", "text": "8711", "bbox": [ 482, 944, 513, 955 ], "page_idx": 7 }, { "type": "text", "text": "References", "text_level": 1, "bbox": [ 78, 89, 173, 104 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[1] Mixamo. http://www MIXamo.com/. Accessed on November 09<sup>th</sup>, 2022. 5, 6, 7", "[2] Kfir Aberman, Peizhuo Li, Dani Lischinski, Olga Sorkine-Hornung, Daniel Cohen-Or, and Baoquan Chen. Skeleton-aware networks for deep motion retargeting. In ACM Transactions on Graphics (SIGGRAPH), 2020. 2, 3", "[3] Noam Aigerman, Kunal Gupta, Vladimir G Kim, Siddhartha Chaudhuri, Jun Saito, and Thibault Groueix. Neural jacobian fields: Learning intrinsic mappings of arbitrary meshes. arXiv preprint arXiv:2205.02904, 2022. 2", "[4] Mazen Al Borno, Ludovic Righetti, Michael J Black, Scott L Delp, Eugene Fiume, and Javier Romero. Robust physics-based motion retargeting with realistic body shapes. In Computer Graphics Forum. Wiley Online Library, 2018. 2, 3", "[5] Andreas Aristidou and Joan Lasenby. FABRIK: A fast, iterative solver for the inverse kinematics problem. Graphical Models, 2011. 3", "[6] Quentin Avril, Donya Ghafourzadeh, Srinivasan Ramachandran, Sahel Fallahdoust, Sarah Ribet, Olivier Dionne, Martin de Lasa, and Eric Paquette. Animation setup transfer for 3D characters. In Computer Graphics Forum, 2016. 2", "[7] Ilya Baran and Jovan Popovic. Automatic rigging and animation of 3D characters. In ACM Transactions on Graphics (SIGGRAPH), 2007. 2, 3", "[8] Ilya Baran, Daniel Vlasic, Eitan Grinspun, and Jovan Popovic. Semantic deformation transfer. In ACM Transactions on Graphics (ToG). 2009. 2", "[9] Mirela Ben-Chen, Ofir Weber, and Craig Gotsman. Spatial deformation transfer. In Proceedings of the 2009 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2009. 2", "[10] Bharat Lal Bhatnagar, Cristian Sminchisescu, Christian Theobalt, and Gerard Pons-Moll. Combining implicit function learning and parametric models for 3D human reconstruction. In European Conference on Computer Vision (ECCV), 2020. 3", "[11] Bharat Lal Bhatnagar, Garvita Tiwari, Christian Theobalt, and Gerard Pons-Moll. Multi-garment net: Learning to dress 3D people from images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 6", "[12] Federica Bogo, Javier Romero, Matthew Loper, and Michael J Black. FAUST: Dataset and evaluation for 3D mesh registration. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 2", "[13] Rohan Chabra, Jan E Lenssen, Eddy Ilg, Tanner Schmidt, Julian Straub, Steven Lovegrove, and Richard Newcombe. Deep local shapes: Learning local sdf priors for detailed 3D reconstruction. In European Conference on Computer Vision (ECCV), 2020. 3", "[14] Haoyu Chen, Hao Tang, Henglin Shi, Wei Peng, Nicu Sebe, and Guoying Zhao. Intrinsic-extrinsic preserved gans for unsupervised 3D pose transfer. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2", "[15] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equa" ], "bbox": [ 78, 114, 467, 900 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "tions. Advances in Neural Information Processing Systems (NeurIPS), 2018. 3", "[16] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3", "[17] An-Chieh Cheng, Xueting Li, Min Sun, Ming-Hsuan Yang, and Sifei Liu. Learning 3D dense correspondence via canonical point autoencoder. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 4", "[18] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3D shape reconstruction and completion. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3", "[19] Kwang-Jin Choi and Hyeong-Seok Ko. Online motion retargeting. Comput. Animat. Virtual Worlds, 2000. 3", "[20] Brian Delhaisse, Domingo Esteban, Leonel Rozo, and Darwin Caldwell. Transfer learning of shared latent spaces between robots with similar kinematic structure. In International Joint Conference on Neural Networks (IJCNN), 2017. 3", "[21] Philipp Erler, Paul Guerrero, Stefan Ohrhallinger, Niloy J Mitra, and Michael Wimmer. Points2surf learning implicit surfaces from point clouds. In European Conference on Computer Vision (ECCV), 2020. 3", "[22] Lin Gao, Jie Yang, Yi-Ling Qiao, Yu-Kun Lai, Paul L Rosin, Weiwei Xu, and Shihong Xia. Automatic unpaired shape deformation transfer. ACM Transactions on Graphics (ToG), 2018. 2, 5", "[23] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In IEEE International Conference on Computer Vision (ICCV), 2019. 3", "[24] Michael Gleicher. Retargetting motion to new characters. In Proceedings of the 25th annual conference on Computer graphics and interactive techniques, 1998. 2, 3", "[25] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. 3D-CODED: 3D correspondences by deep deformation. In European Conference on Computer Vision (ECCV), 2018. 5", "[26] Rana Hanocka, Amir Hertz, Noa Fish, Raja Giryes, Shachar Fleishman, and Daniel Cohen-Or. MeshCNN: a network with an edge. ACM Transactions on Graphics (ToG), 2019. 8", "[27] Hanyoung Jang, Byungjun Kwon, Moonwon Yu, Seong Uk Kim, and Jongmin Kim. A variational U-Net for motion retargeting. In Comput. Animat. Virtual Worlds, 2020. 3", "[28] Boyan Jiang, Yinda Zhang, Xingkui Wei, Xiangyang Xue, and Yanwei Fu. Learning compositional representation for 4D captures with neural ode. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3", "[29] Chiyu Jiang, Avneesh Sud, Ameesh Makadia, Jingwei Huang, Matthias Nießner, Thomas Funkhouser, et al. Local implicit grid representations for 3D scenes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3" ], "bbox": [ 503, 93, 890, 898 ], "page_idx": 8 }, { "type": "page_number", "text": "8712", "bbox": [ 482, 945, 514, 955 ], "page_idx": 8 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[30] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations (ICLR), 2015. 6", "[31] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017. 8", "[32] Muhammed Kocabas, Nikos Athanasiou, and Michael J Black. Vibe: Video inference for human body pose and shape estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2, 4", "[33] Jehee Lee and Sung Yong Shin. A hierarchical approach to interactive motion editing for human-like figures. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, 1999. 3", "[34] Jiahui Lei and Kostas Daniilidis. CaDeX: Learning canonical deformation coordinate space for dynamic surface representation via neural homeomorphism. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 3", "[35] Peizhuo Li, Kfir Aberman, Rana Hanocka, Libin Liu, Olga Sorkine-Hornung, and Baoquan Chen. Learning skeletal articulations with neural blend shapes. In ACM Transactions on Graphics (SIGGRAPH), 2021. 2, 5, 6, 7", "[36] Zhouyingcheng Liao, Jimei Yang, Jun Saito, Gerard Pons-Moll, and Yang Zhou. Skeleton-free pose transfer for stylized 3D characters. In European Conference on Computer Vision (ECCV), 2022. 3, 4, 5, 6, 7, 8", "[37] Jongin Lim, Hyung Jin Chang, and Jin Young Choi. PMnet: Learning of disentangled pose and movement for unsupervised motion retargeting. In British Machine Vision Conference (BMVC), 2019. 3", "[38] Feng Liu and Xiaoming Liu. Learning implicit functions for topology-varying dense 3D shape correspondence. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 4", "[39] Lijuan Liu, Youyi Zheng, Di Tang, Yi Yuan, Changjie Fan, and Kun Zhou. Neuroskinning: Automatic skin binding for production characters with deep graph networks. ACM Transactions on Graphics (ToG), 2019. 3", "[40] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. SMPL: A skinned multiperson linear model. ACM Transactions on Graphics (ToG), 2015. 2, 5", "[41] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. AMASS: Archive of motion capture as surface shapes. In IEEE International Conference on Computer Vision (ICCV), 2019. 2, 4", "[42] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3", "[43] Mateusz Michalkiewicz, Jhony K Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Deep level sets: Implicit surface representations for 3D shape inference. arXiv preprint arXiv:1901.06802, 2019. 3", "[44] Marko Mihajlovic, Yan Zhang, Michael J Black, and Siyu Tang. LEAP: Learning articulated occupancy of people. In" ], "bbox": [ 78, 90, 470, 901 ], "page_idx": 9 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3", "[45] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4D reconstruction by learning particle dynamics. In IEEE International Conference on Computer Vision (ICCV), 2019. 3", "[46] Atsuhiro Noguchi, Umar Iqbal, Jonathan Tremblay, Tatsuya Harada, and Orazio Gallo. Watch it move: Unsupervised discovery of 3D joints for re-posing of articulated objects. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 3", "[47] Pablo Palafox, Aljaž Božić, Justus Thies, Matthias Nießner, and Angela Dai. NPMs: Neural parametric models for 3D deformable shapes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 3, 4", "[48] Pablo Palafox, Nikolaos Sarafianos, Tony Tung, and Angela Dai. SPAMs: Structured implicit parametric models. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2, 3", "[49] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3", "[50] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed AA Osman, Dimitrios Tzionas, and Michael J Black. Expressive body capture: 3D hands, face, and body from a single image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 5", "[51] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed A. A. Osman, Dimitrios Tzionas, and Michael J. Black. Expressive body capture: 3D hands, face, and body from a single image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4", "[52] Martin Poirier and Eric Paquette. Rig retargeting for 3d animation. In Proceedings of the Graphics Interface 2009 Conference, 2009. 2, 3", "[53] Davis Rempe, Tolga Birdal, Aaron Hertzmann, Jimei Yang, Srinath Sridhar, and Leonidas J Guibas. Humor: 3D human motion model for robust pose estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 4", "[54] Nadine Ruegg, Silvia Zuffi, Konrad Schindler, and Michael J Black. BARC: Learning to regress 3D dog shape from images by exploiting breed information. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2, 6", "[55] Robert W Sumner and Jovan Popovic. Deformation transfer for triangle meshes. ACM Transactions on Graphics (ToG), 2004. 2, 3, 5", "[56] Robert W Sumner, Johannes Schmid, and Mark Pauly. Embedded deformation for shape manipulation. In ACM Transactions on Graphics (SIGGRAPH). 2007. 2, 3", "[57] Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. Test-time training with self-supervision for generalization under distribution shifts. In International Conference on Machine Learning (ICML), 2020. 5" ], "bbox": [ 501, 92, 890, 898 ], "page_idx": 9 }, { "type": "page_number", "text": "8713", "bbox": [ 482, 945, 514, 955 ], "page_idx": 9 }, { "type": "list", "sub_type": "ref_text", "list_items": [ "[58] Ramana Sundararaman, Gautam Pai, and Maks Ovsjanikov. Implicit field supervision for robust non-rigid shape matching. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part III, pages 344-362. Springer, 2022. 3", "[59] Seyoon Tak and Hyeong-Seok Ko. A physically-based motion retargeting filter. In ACM Transactions on Graphics (ToG), 2005. 3", "[60] Ruben Villegas, Duygu Ceylan, Aaron Hertzmann, Jimei Yang, and Jun Saito. Contact-aware retargeting of skinned motion. In IEEE International Conference on Computer Vision (ICCV), 2021. 3", "[61] Ruben Villegas, Jimei Yang, Duygu Ceylan, and Honglak Lee. Neural kinematic networks for unsupervised motion retargeting. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 3", "[62] Jiashun Wang, Chao Wen, Yanwei Fu, Haitao Lin, Tianyun Zou, Xiangyang Xue, and Yinda Zhang. Neural pose transfer by spatially adaptive instance normalization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2, 5, 6", "[63] Zhan Xu, Yang Zhou, Evangelos Kalogerakis, Chris Landreth, and Karan Singh. RigNet: Neural rigging for articulated characters. In ACM Transactions on Graphics (SIGGRAPH), 2020. 3, 5, 6", "[64] Zhan Xu, Yang Zhou, Evangelos Kalogerakis, and Karan Singh. Predicting animation skeletons for 3D articulated models via volumetric nets. In International Conference on 3D Vision, 2019. 3", "[65] Jie Yang, Lin Gao, Yu-Kun Lai, Paul L Rosin, and Shihong Xia. Biharmonic deformation transfer with automatic key point selection. Graphical Models, 2018. 2", "[66] Wang Yifan, Noam Aigerman, Vladimir G Kim, Siddhartha Chaudhuri, and Olga Sorkine-Hornung. Neural cages for detail-preserving 3D deformations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2", "[67] Keyang Zhou, Bharat Lal Bhatnagar, and Gerard Pons-Moll. Unsupervised shape and pose disentanglement for 3D meshes. In European Conference on Computer Vision (ECCV), 2020. 2", "[68] Silvia Zuffi, Angjoo Kanazawa, David W Jacobs, and Michael J Black. 3D Menagerie: Modeling the 3D shape and pose of animals. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 6, 8" ], "bbox": [ 78, 90, 468, 712 ], "page_idx": 10 }, { "type": "page_number", "text": "8714", "bbox": [ 482, 945, 514, 955 ], "page_idx": 10 }]123version https://git-lfs.github.com/spec/v1oid sha256:ed87cd7b286643348f0cd948cd3377cbb469ebd6d3460e70bea533dc32a3c8e3size 7851807123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345# Zero-shot Pose Transfer for Unrigged Stylized 3D Characters
Jiashun Wang $^{1*}$ Xueting Li $^{2}$ Sifei Liu $^{2}$ Shalini De Mello $^{2}$ Orazio Gallo $^{2}$ Xiaolong Wang $^{3}$ Jan Kautz $^{2}$ $^{1}$ Carnegie Mellon University ${}^{2}$ NVIDIA ${}^{3}$ UC San Diego
 Figure 1. Our algorithm transfers the pose of a reference avatar (source) to stylized characters. Unlike existing methods, at training time our approach needs only the mesh of the source avatar in rest and desired pose, and the mesh of the stylized character only in rest pose.
# Abstract
Transferring the pose of a reference avatar to stylized 3D characters of various shapes is a fundamental task in computer graphics. Existing methods either require the stylized characters to be rigged, or they use the stylized character in the desired pose as ground truth at training. We present a zero-shot approach that requires only the widely available deformed non-stylized avatars in training, and deforms stylized characters of significantly different shapes at inference. Classical methods achieve strong generalization by deforming the mesh at the triangle level, but this requires labelled correspondences. We leverage the power of local deformation, but without requiring explicit correspondence labels. We introduce a semi-supervised shape-understanding module to bypass the need for explicit correspondences at test time, and an implicit pose deformation module that deforms individual surface points to match the target pose. Furthermore, to encourage realistic and accurate deformation of
stylized characters, we introduce an efficient volume-based test-time training procedure. Because it does not need rigging, nor the deformed stylized character at training time, our model generalizes to categories with scarce annotation, such as stylized quadrupeds. Extensive experiments demonstrate the effectiveness of the proposed method compared to the state-of-the-art approaches trained with comparable or more supervision. Our project page is available at https://jiashunwang.github.io/ZPT/
# 1. Introduction
Stylized 3D characters, such as those in Fig. 1, are commonly used in animation, movies, and video games. Deforming these characters to mimic natural human or animal poses has been a long-standing task in computer graphics. Different from the 3D models of natural humans and animals, stylized 3D characters are created by professional artists through imagination and exaggeration. As a result, each stylized character has a distinct skeleton, shape, mesh
topology, and usually include various accessories, such as a cloak or wings (see Fig. 1). These variations hinder the process of matching the pose of a stylized 3D character to that of a reference avatar, generally making manual rigging a requirement. Unfortunately, rigging is a tedious process that requires manual effort to create the skeleton and skinning weights for each character. Even when provided with manually annotated rigs, transferring poses from a source avatar onto stylized characters is not trivial when the source and target skeletons differ. Automating this procedure is still an open research problem and is the focus of many recent works [2, 4, 24, 52]. Meanwhile, non-stylized 3D humans and animals have been well-studied by numerous prior works [35, 40, 54, 62, 68]. A few methods generously provide readily available annotated datasets [11, 12, 41, 68], or carefully designed parametric models [40, 51, 68]. By taking advantage of these datasets [12, 41], several learning-based methods [7, 14, 35, 62, 67] disentangle and transfer poses between human meshes using neural networks. However, these methods (referred to as "part-level" in the following) carry out pose transfer by either globally deforming the whole body mesh [14, 22, 47, 67] or by transforming body parts [35, 48], both of which lead to overfitting on the training human meshes and fail to generalize to stylized characters with significantly different body part shapes. Interestingly, classical mesh deformation methods [55, 56] (referred to as "local" in the following) can transfer poses between a pair of meshes with significant shape differences by computing and transferring per-triangle transformations through correspondence. Though these methods require manual correspondence annotation between the source and target meshes, they provide a key insight that by transforming individual triangles instead of body parts, the mesh deformation methods are more agnostic to a part's shape and can generalize to meshes with different shapes.
We marry the benefits of learning-based methods [7, 14, 35, 62, 67] with the classic local deformation approach [55] and present a model for unrigged, stylized character deformation guided by a non-stylized biped or quadruped avatar. Notably, our model only requires easily accessible posed human or animal meshes for training and can be directly applied to deform 3D stylized characters with a significantly different shape at inference. To this end, we implicitly operationalize the key insight from the local deformation method [55] by modeling the shape and pose of a 3D character with a correspondence-aware shape understanding module and an implicit pose deformation module. The shape understanding module learns to predict the part segmentation label (i.e., the coarse-level correspondence) for each surface point, besides representing the shape of a 3D character as a latent shape code. The pose deformation module is conditioned on the shape code and deforms individual surface point guided by a target pose code sampled
from a prior pose latent space [50]. Furthermore, to encourage realistic deformation and generalize to rare poses, we propose a novel volume-based test-time training procedure that can be efficiently applied to unseen stylized characters.
During inference, by mapping biped or quadruped poses from videos, in addition to meshes to the prior pose latent space using existing works [32, 51, 53], we can transfer poses from different modalities onto unrigged 3D stylized characters. Our main contributions are:
- We propose a solution to a practical and challenging task - learning a model for stylized 3D character deformation with only posed human or animal meshes. - We develop a correspondence-aware shape understanding module, an implicit pose deformation module, and a volume-based test-time training procedure to generalize the proposed model to unseen stylized characters and arbitrary poses in a zero-shot manner. - We carry out extensive experiments on both humans and quadrupeds to show that our method produces more visually pleasing and accurate deformations compared to baselines trained with comparable or more supervision.
# 2. Related Work
Deformation Transfer. Deformation transfer is a longstanding problem in the computer graphics community [3, 6, 8, 9, 55, 65]. Sumner et al. [55] apply an affine transformation to each triangle of the mesh to solve an optimization problem that matches the deformation of the source mesh while maintaining the shape of the target mesh. Ben-Chen et al. [9] enclose the source and target shapes with two cages and transfer the Jacobians of the source deformation to the target shape. However, these methods need tedious human efforts to annotate the correspondence between the source and target shapes. More recently, several deep learning methods are developed to solve the deformation transfer task. However, they either require manually providing the correspondence [66] or cannot generalize [14, 22, 67] to stylized characters with different shapes. Gao et al. [22] propose a VAE-GAN based method to leverage the cycle consistency between the source and target shapes. Nonetheless, it can only work on shapes used in training. Wang et al. [62] introduce conditional normalization used in style transfer for 3D deformation transfer. But the method is limited to clothed-humans and cannot handle the large shape variations of stylized characters.
We argue that these learning-based methods cannot generalize to stylized characters because they rely on encoding their global information (e.g., body or parts), which is different from traditional works that focus on local deformation, e.g., the affine transformation applied to each triangle in [55]. Using a neural network to encode the global information easily leads to overfitting. For example, models
trained on human meshes cannot generalize to a stylized humanoid character. At the same time, early works only focus on local information and cannot model global information such as correspondence between the source and target shapes, which is why they all need human effort to annotate the correspondence. Our method tries to learn the correspondence and deform locally at the same time.
Skeleton-based Pose Transfer. Besides mesh deformation transfer, an alternative way to transfer pose is to utilize skeletons. Motion retargeting is also a common name used for transferring poses from one motion sequence to another. Gleicher et al. [24] propose a space-time constrained solver aiming to satisfy the kinematics-level constraints and to preserve the characters' original identity. Following works [5, 19, 33] try to solve inverse-kinematics or inverse rate control to achieve pose transfer. There are also dynamics-based methods [4, 59] that consider physics during the retargeting process. Recently, learning-based methods [20, 27, 37, 60, 61] train deep neural networks to predict the transformation of the skeleton. Aberman et al. [2] propose a pooling-based method to transfer poses between meshes with different skeletons.
All these works highly rely on the skeleton for pose transfer. Other works try to estimate the rigging of the template shape [7, 39, 52, 63, 64] when a skeleton is not available. But if the prediction of the skinning weights fails, the retargeting fails as well. Liao et al. [36] propose a model that learns to predict the skinning weights and pose transfer jointly using ground truth skinning weights and paired motion data as supervision, which limits the generalization of this method to categories where annotations are more scarce compared to humans (e.g., quadrupeds). Instead, our method uses posed human or animal meshes for training and deforms stylized characters of different shapes at inference.
Implicit 3D shape representation. Implicit 3D shape representations have shown great success in reconstructing static shapes [13,16,18,21,23,29,42,43,49] and deformable ones [10,28,34,44-48,58]. DeepSDF [49] proposes to use an MLP to predict the signed distance field (SDF) value of a query point in 3D space, where a shape code is jointly optimized in an auto-decoding manner. Occupancy flow [45] generalizes the Occupancy Networks [42] to learn a temporally and spatially continuous vector field with a NeuralODE [15]. Inspired by parametric models, NPMs [47] disentangles and represents the shape and pose of dynamic humans by learning an implicit shape and pose function, respectively. Different from these implicit shape representation works that focus on reconstructing static or deformable meshes, we further exploit the inherent continuity and locality of implicit functions to deform stylized characters to match a target pose in a zero-shot manner.
# 3. Method
We aim to transfer the pose of a biped or quadruped avatar to an unrigged, stylized 3D character. We tackle this problem by modeling the shape and pose of a 3D character using a correspondence-aware shape understanding module and an implicit pose deformation module, inspired by classical mesh deformation methods [55, 56]. The shape understanding module (Sec. 3.1, Fig. 2) predicts a latent shape code and part segmentation label of a 3D character in rest pose, while the pose deformation module (Sec. 3.2, Fig. 3) deforms the character in the rest pose given the predicted shape code and a target pose code. Moreover, to produce natural deformations and generalize to rare poses unseen at training, we introduce an efficient volume-based test-time training procedure (Sec 3.3) for unseen stylized characters. All three modules, trained only with posed, unclothed human meshes, and unrigged, stylized characters in a rest pose, are directly applied to unseen stylized characters at inference. We explain our method for humans, and describe how we extend it to quadrupeds in Sec. 4.6.
# 3.1. Correspondence-Aware Shape Understanding
Given a 3D character in rest pose, we propose a shape understanding module to represent its shape information as a latent code, and to predict a body part segmentation label for each surface point.
To learn a representative shape code, we employ an implicit auto-decoder [47, 49] that reconstructs the 3D character taking the shape code as input. During training, we jointly optimize the shape code of each training sample and the decoder. Given an unseen character (i.e., a stylized 3D character) during inference, we obtain its shape code by freezing the decoder and optimizing the shape code to reconstruct the given character. Specifically, as shown in Fig. 2, given the concatenation of a query point $x \in \mathbb{R}^3$ and the shape code $s \in \mathbb{R}^d$ , we first obtain an embedding $e \in \mathbb{R}^d$ via an MLP denoted as $\mathcal{F}$ . Conditioned on the embedding $e$ , the occupancy $\hat{o}_x \in \mathbb{R}$ of $x$ is then predicted by another MLP denoted as $\mathcal{O}$ . The occupancy indicates if the query point $x$ is inside or outside the body surface and can be supervised by the ground truth occupancy as:
$$\mathcal {L} _ {\mathcal {O}} = - \sum_ {x} \left(o _ {x} \cdot \log \left(\hat {o} _ {x}\right) + \left(1 - o _ {x}\right) \cdot \log \left(1 - \hat {o} _ {x}\right)\right), \tag {1}$$
where $o_x$ is the ground truth occupancy at point $x$ .
Since our shape code eventually serves as a condition for the pose deformation module, we argue that it should also capture the part correspondence knowledge across different instances, in addition to the shape information (e.g., height, weight, and shape of each body part). This insight has been utilized by early local mesh deformation method [55], which explicitly utilizes correspondence to transfer local transformations between the source and target meshes. Our
 Figure 2. The shape understanding module (Sec. 3.1). Given a query point and a learnable shape code, we take MLPs to predict the occupancy, part segmentation label and further use an inverse MLP to regress the query point.
 Figure 3. The pose deformation module (Sec. 3.2). Given a query point on the surface, the learned shape code and a target pose code, we use an MLP to predict the offset of the query point.
pose deformation process could also benefit from learning part correspondence. Take the various headgear, hats, and horns on the stylized characters's heads in Fig. 1 as an example. If these components can be "understood" as extensions of the character's heads by their shape codes, they will move smoothly with the character's heads during pose deformation. Thus, besides mesh reconstruction, we effectively task our shape understanding module with an additional objective: predicting part-level correspondence instantiated as the part segmentation label. Specifically, we propose to utilize an MLP $\mathcal{P}$ to additionally predict a part label $p_x = (p_x^1,\dots,p_x^K)^T\in \mathbb{R}^K$ for each surface point $x$ . Thanks to the densely annotated human mesh dataset, we can also supervise part segmentation learning with ground truth labels via:
$$\mathcal {L} _ {\mathcal {P}} = \sum_ {x} (- \sum_ {k = 1} ^ {K} \mathbb {1} _ {x} ^ {k} \log \left(p _ {x} ^ {k}\right)), \tag {2}$$
where $K$ is the total number of body parts, and $\mathbb{1}_x^k = 1$ if $x$ belongs to the $k^{th}$ part and $\mathbb{1}_x^k = 0$ otherwise.
To prepare the shape understanding module for stylized characters during inference, besides unclothed human meshes, we also include unrigged 3D stylized characters in rest pose during training. These characters in rest pose are easily accessible and do not require any annotation. For shape reconstruction, Eq. 1 can be similarly applied to the
stylized characters. However, as there is no part segmentation annotation for stylized characters, we propose a self-supervised inverse constraint inspired by correspondence learning methods [17,38] to facilitate part segmentation prediction on these characters. Specifically, we reconstruct the query point's coordinates from the concatenation of the shape code $s$ and the embedding $e$ through an MLP $\mathcal{Q}$ and add an auxiliary objective as:
$$\mathcal {L} _ {\mathcal {Q}} = \left| \left| \mathcal {Q} (s, e) - x \right| \right| ^ {2}. \tag {3}$$
Intuitively, for stylized characters without part annotation, the model learned without this objective may converge to a trivial solution where similar embeddings are predicted for points with the same occupancy value, even when they are far away from each other, and belong to different body parts. Tab. 4 further quantitatively verifies the effectiveness of this constraint. Beyond facilitating shape understanding, the predicted part segmentation label is further utilized in the volume-based test-time training module which will be introduced in Sec. 3.3.
# 3.2. Implicit Pose Deformation Module
Given the learned shape code and a target pose, the pose deformation module deforms each surface point of the character to match the target pose. In the following, we first describe how we represent a human pose and then introduce the implicit function used for pose deformation.
Instead of learning a latent pose space from scratch as in [36, 47], we propose to represent a human pose by the corresponding pose code in the latent space of VPoser [51]. Our intuition is that VPoser is trained with an abundance of posed humans from the large-scale AMASS dataset [41]. This facilitates faster training and provides robustness to overfitting. Furthermore, human poses can be successfully estimated from different modalities (e.g., videos or meshes), and mapped to the latent space of VPoser by existing methods [32, 51, 53]. By taking advantage of these works, our
model can be applied to transfer poses from various modalities to an unrigged stylized character without any additional effort. A few examples can be found in the supplementary.
To deform a character to match the given pose, we learn a neural implicit function $\mathcal{M}$ that takes the sampled pose code $m\in \mathbb{R}^{32}$ , the learned shape code, and a query point $x$ around the character's surface as inputs and outputs the offset (denoted as $\Delta \hat{x}\in \mathbb{R}^3$ ) of $x$ in 3D space. Given the densely annotated human mesh dataset, we directly use the ground truth offset $\Delta x$ as supervision. The training objective for our pose deformation module is defined as:
$$\mathcal {L} _ {\mathcal {D}} = \sum_ {x} \left| \left| \Delta \hat {x} - \Delta x \right| \right| ^ {2}. \tag {4}$$
Essentially, our implicit pose deformation module is similar in spirit to early local mesh deformation methods [55] and has two key advantages compared to the part-level pose transfer methods [22, 36, 62]. First, our implicit pose deformation network is agnostic to mesh topology and resolution. Thus our model can be directly applied to unseen 3D stylized characters with significantly different resolutions and mesh topology compared to the training human meshes during inference. Second, stylized characters often include distinct body part shapes compared to humans. For example, the characters shown in Fig. 1 include big heads or various accessories. Previous part-level methods [36] that learn to predict a bone transformation and skinning weight for each body part usually fail on these unique body parts, since they are different from the corresponding human body parts used for training. In contrast, by learning to deform individual surface point, implicit functions are more agnostic to the overall shape of a body part and thus can generalize better to stylized characters with significantly different body part shapes. Fig. 4 and Fig. 6 show these advantages.
# 3.3. Volume-based Test-time Training
The shape understanding and pose deformation modules discussed above are trained with only posed human meshes and unrigged 3D stylized characters in rest pose. When applied to unseen characters with significantly different shapes, we observe surface distortion introduced by the pose deformation module. Moreover, it is challenging for the module to fully capture the long tail of the pose distribution. To resolve these issues, we propose to apply test-time training [57] and fine-tune the pose deformation module on unseen stylized characters.
To encourage natural pose deformation, we further propose a volume-preserving constraint during test-time training. Our key insight is that preserving the volume of each part in the rest pose mesh during pose deformation results in less distortion [35, 62]. However, it is non-trivial to compute the precise volume of each body part, which can have complex geometry. Instead, we propose to preserve the Eu
ccludean distance between pairs of vertices sampled from the surface of the mesh, as a proxy for constraining the volume. Specifically, given a mesh in rest pose, we randomly sample two points $x_{i}^{c}$ and $x_{j}^{c}$ on the surface within the same part $c$ using the part segmentation prediction from the shape understanding module. We calculate the offset of these two points $\Delta \hat{x}_{i}^{c}$ and $\Delta \hat{x}_{j}^{c}$ using our pose deformation module and minimize the change in the distance between them by:
$$\mathcal {L} _ {v} = \sum_ {c} \sum_ {i} \sum_ {j} \left(\left| \left| x _ {i} ^ {c} - x _ {j} ^ {c} \right| \right| - \left| \left| \left(x _ {i} ^ {c} + \Delta \hat {x} _ {i} ^ {c}\right) - \left(x _ {j} ^ {c} + \Delta \hat {x} _ {j} ^ {c}\right) \right| \right|\right) ^ {2}. \tag {5}$$
By sampling a large number of point pairs within a part and minimizing Eq. 5, we can approximately maintain the volume of each body part during pose deformation.
Furthermore, in order to generalize the pose deformation module to long-tail poses that are rarely seen during training, we propose to utilize the source character in rest pose and its deformed shape as paired training data during test-time training. Specifically, we take the source character in rest pose, its target pose code, and its optimized shape code as inputs and we output the movement $\Delta \hat{x}^{dr}$ , where $x^{dr}$ is a query point from the source character. We minimize the L2 distance between the predicted movement $\Delta \hat{x}^{dr}$ and the ground truth movement $\Delta x^{dr}$ ,
$$\mathcal {L} _ {d r} = \sum_ {x ^ {d r}} \left| \left| \Delta \hat {x} ^ {d r} - \Delta x ^ {d r} \right| \right| ^ {2}. \tag {6}$$
Besides the volume-preserving constraint and the reconstruction of the source character, we also employ the edge loss $\mathcal{L}_e$ used in [25, 36, 62]. Overall, the objectives for the test-time training procedure are $\mathcal{L}_{\mathcal{T}} = \lambda_v\mathcal{L}_v + \lambda_e\mathcal{L}_e + \lambda_{dr}\mathcal{L}_{dr}$ , where $\lambda_v, \lambda_e$ , and $\lambda_{dr}$ are hyper-parameters balancing the loss weights.
# 4. Experiments
# 4.1. Datasets
To train the shape understanding module, we use 40 human meshes sampled from the SMPL [40] parametric model. We use both the occupancy and part segmentation label of these meshes as supervision (see Sec. 3.1). To generalize the shape understanding module to stylized characters, we further include 600 stylized characters from RigNet [63]. Note that we only use the rest pose mesh (i.e., occupancy label) of the characters in [63] for training. To train our pose deformation module, we construct paired training data by deforming each of the 40 SMPL characters discussed above with 5000 pose codes sampled from the VPoser's [50] latent space. In total, we collect 200,000 training pairs, with each pair including an unclothed human mesh in rest pose and the same human mesh in target pose.
After training the shape understanding and pose deformation modules, we test them on the Mixamo [1] dataset,
which includes challenging stylized characters, and the MGN [11] dataset, which includes clothed humans. The characters in both datasets have different shapes compared to the unclothed SMPL meshes we used for training, demonstrating the generalization ability of the proposed method. Following [36], we test on 19 stylized characters, with each deformed by 28 motion sequences from the Mixamo dataset. For the MGN dataset, we test on 16 clothed characters, with each deformed by 200 target poses. Both the testing characters and poses are unseen during training.
For quadrupeds, since there is no dataset including large-scale paired stylized quadrupeds for quantitative evaluation, we split all characters from the SMAL [68] dataset and use the first 34 shapes (i.e., cats, dogs, and horses) for training. We further collect 81 stylized quadrupeds in rest pose from the RigNet [63] to improve generalization of the shape understanding module. Similarly to the human category, we use occupancy and part segmentation supervision for the SMAL shapes and only the occupancy supervision for RigNet meshes. To train the pose deformation module, we deform each of the 34 characters in SMAL by 2000 poses sampled from the latent space of BARC [54], a 3D reconstruction model trained for the dog category. We quantitatively evaluate our model on the hippo meshes from the SMAL dataset, which have larger shape variance compared to the cats, dogs, and horses used for training. We produce the testing data by deforming each hippo mesh with 500 unseen target poses from SMAL [68]. We show qualitative pose transfer on stylized quadrupeds in Fig. 1.
# 4.2. Implementation Details
We use the ADAM [30] optimizer to train both the shape understanding and pose deformation modules. For the shape understanding module, we use a learning rate of $1e - 4$ for both the decoder and shape code optimization, with a batch size of 64. Given a new character at inference time, we fix the decoder and only optimize the shape code for the new character with the same optimizer and learning rate. For the pose deformation module, we use a learning rate of $3e - 4$ with a batch size of 128. For test-time training, we use a batch size of 1 and a learning rate of $5e - 3$ with the ADAM optimizer. We set $\lambda_v$ , $\lambda_e$ , and $\lambda_{dr}$ (See Sec. 3.3) as 0.05, 0.01, and 1 respectively.
# 4.3. Metrics and Baselines for Comparison
Metrics. We use Point-wise Mesh Euclidean Distance (PMD) [36, 62] to evaluate pose transfer error. The PMD metric reveals pose similarity of the predicted deformation compared to its ground truth. However, as shown in Fig. 4, PMD can not fully show the smoothness and realism of the generated results. Thus, we adopt an edge length score (ELS) metric to evaluate the character's smoothness after the deformation. Specifically, we compare each edge's
<table><tr><td>Dataset</td><td>Metric</td><td>SPT*(full) [36]</td><td>NBS [35]</td><td>SPT [36]</td><td>Ours</td></tr><tr><td rowspan="2">MGN [11]</td><td>PMD ↓</td><td>1.62</td><td>1.33</td><td>1.82</td><td>0.99</td></tr><tr><td>ELS ↑</td><td>0.86</td><td>0.70</td><td>0.85</td><td>0.89</td></tr><tr><td rowspan="2">Mixamo [1]</td><td>PMD ↓</td><td>3.05</td><td>7.04</td><td>5.29</td><td>5.06</td></tr><tr><td>ELS ↑</td><td>0.61</td><td>0.66</td><td>0.59</td><td>0.88</td></tr></table>
Table 1. Quantitative comparison on MGN and Mixamo. Our method achieves the lowest PMD with the highest ELS. We provide the performance of the SPT*(full) method, which uses more supervision than the other methods as a reference. Our method is even better or comparable to it.
length in the deformed mesh with the corresponding edge's length in the ground truth mesh. We define the score as
$$\frac {1}{| \mathcal {E} |} \sum_ {\{i, j \} \sim \mathcal {E}} 1 - \left| \frac {| | \hat {V} _ {i} - \hat {V} _ {j} | | _ {2}}{| | V _ {i} - V _ {j} | | _ {2}} - 1 \right|, \tag {7}$$
where $\mathcal{E}$ indicates all edges of the mesh, $|\mathcal{E}|$ is the number of the edges in the mesh. $\hat{V}_i$ and $\hat{V}_j$ are the vertices in the deformed mesh. $V_{i}$ and $V_{j}$ are the vertices in the ground truth mesh. For all the evaluation metrics, we scale the template character to be 1 meter tall, following [36].
Baselines. We compare our method with Neural Blend Shapes (NBS) [35] and Skeleton-free Pose Transfer (SPT) [36]. NBS is a rigging prediction method trained on the SMPL and MGN datasets, which include naked and clothed human meshes with ground truth rigging information. For SPT, we show the results of two versions, one is trained only on the AMASS dataset, named SPT, which has a comparable level of supervision to our method. We also test the SPT*(full) version, which is trained on the AMASS, RigNet and Mixamo datasets, using both stylized characters' skinning weights as supervision and paired stylized characters in rest pose and target pose.
# 4.4. Human-like Character Pose Transfer
We report the PMD metric on the MGN and Mixamo datasets in Tab. 1. We also include the performance of SPT*(full) for reference. On the MGN dataset which includes clothed humans, our method which is trained with only unclothed humans achieve the best PMD score than all baseline methods, including baselines trained with more supervision (i.e., the NBS [35] learned with clothed humans and the SPT*(full) [36] learned with skinning weight and paired motion data). For the stylized characters, our method outperforms the SPT baseline learned with a comparable amount of supervision and gets competitive results with the NBS [35] and SPT*(full) baseline trained with more supervision. Furthermore, when testing on the more challenging, less human-like characters (e.g., a mouse with a big head in Fig. 1), the baselines produce noticeable artifacts and rough surfaces, which can be observed in the qualitative comparisons in Fig. 4. We provide the PMD value for each character in the supplementary.


 Source


 Target

 NBS [35]


 SPT [36]


 Ours


 GT
 Figure 5. Part segmentation visualization. NBS makes wrong predictions for hair while SPT may mix the upper legs.
We show the ELS score comparison of different methods on the MGN and Mixamo datasets in Tab. 1. For both clothed humans and stylized characters, our method can generate more realistic results which are consistent with the target mesh and achieves the best ELS score.
We visually compare our method and the baseline methods in Fig. 4 on the Mixamo dataset. Although NBS is trained with a clothed-human dataset, when testing on the human-like characters, it still fails on parts that are separate from the body such as the hair and the pants. When using only naked human meshes as supervision, SPT cannot generalize to challenging human-like characters, producing rough mesh surface with spikes.
 Figure 4. Qualitative comparison on Mixamo. The average PMD of these three results for NBS, SPT, and Ours are 8.16, 6.13, and 5.16 respectively and the average ELS for NBS, SPT, and Ours are 0.65, 0.78, and 0.93 respectively. Our method can successfully transfer the pose to challenging stylized characters (e.g., the mouse with a big head in the second row).

 SPT [36]


 Ours


 GT Figure 6. Quadrupedal pose transfer visualization. Our method can achieve smooth and accurate pose transfer while SPT fails on the mouth and leg regions.
<table><tr><td>Metric</td><td>NBS [35]</td><td>SPT [36]</td><td>Ours</td></tr><tr><td>Accuracy ↑</td><td>67.8%</td><td>75.6%</td><td>86.9%</td></tr></table>
Table 2. Part prediction accuracy on Mixamo [1]. Our method achieves the best part segmentation accuracy.
# 4.5. Part Understanding Comparison
As discussed in Sec. 3.1, part segmentation plays an important role in both shape understanding and pose deformation. Though NBS [35] and SPT [36] do not explicitly predict part segmentation label, they are both skinning weight-based methods and we can derive the part segmentation label from the predicted skinning weights. Specifically, by selecting the maximum weight of each vertex, we can convert the skinning weight prediction to part segmentation labels for the vertices. We compare our part prediction results with those derived from SPT and NBS. We report the part segmentation accuracy on the Mixamo datasets in Tab. 2
 Figure 7. Qualitative comparison for ablation study. Removing the constraint (eq. 1) in shape understanding leads to wrong pose deformation results. The volume preserving loss (eq. 5) helps to maintain the identity, e.g., the thickness of the arms in first row.
<table><tr><td>Metric</td><td>SPT [36]</td><td>Ours</td><td>Metric</td><td>SPT [36]</td><td>Ours</td></tr><tr><td>PMD ↓</td><td>10.28</td><td>8.28</td><td>ELS ↑</td><td>0.28</td><td>0.86</td></tr></table>
and visualize the part segmentation results in Fig. 5. Even trained with only part segmentation supervision of human meshes, our method can successfully segment each part for the stylized characters. On the contrary, SPT uses graph convolution network [31] to predict the skinning weights. When training only with human meshes, it often fails to distinguish different parts. As shown in Fig. 5, it mixes up the right and left upper legs, and incorrectly classifies the shoulder as the head. Though NBS is trained with clothed humans, it always classifies human hair as the human body for characters from Mixamo. This is because that NBS uses the MeshCNN [26] as the shape encoder. As a result, it is sensitive to mesh topology and cannot generalize to meshes with disconnected parts (e.g., disconnected hair and head). Tab. 2 further quantitatively demonstrates that our method achieves the best part segmentation accuracy, demonstrating its ability to correctly interpret the shape and part information in stylized characters.
# 4.6. Quadrupedal Pose Transfer Comparison
To further show the generalization ability of our method, we conduct experiments on quadrupeds. We report the PMD and ELS score of our method and the SPT [36] in Tab. 3. When testing on hippos with large shape gap from the training meshes, SPT has a hard time generalizing both in terms of pose transfer accuracy and natural deformation. While our method achieves both better qualitative and quantitative results. We visualize the qualitative comparisons in Fig. 6. SPT produces obvious artifacts on the hippo's mouth
 Figure 8. Part prediction on stylized quadrupeds. Our method successfully predicts the parts of unseen stylized quadrupeds.
Table 3. Comparison on Hippos from SMAL [68]. Our method achieves better pose transfer accuracy with more smooth results.
<table><tr><td>Metric</td><td>Ours w/o inv</td><td>Ours w/o volume</td><td>Ours</td></tr><tr><td>PMD ↓</td><td>1.26</td><td>1.02</td><td>0.99</td></tr><tr><td>ELS ↑</td><td>0.88</td><td>0.88</td><td>0.89</td></tr></table>
Table 4. Ablation study on inverse MLP and volume preserving loss. The inverse MLP and volume preserving loss helps to improve pose transfer accuracy and produce smooth deformation.
and legs, while our method achieves accurate pose transfer and maintains the shape characteristics of the original character at the same time. We provide more results in the supplementary. We also show the part segmentation results on stylized characters by our method in Fig. 8. Even for unique parts such as the hats and antlers, our method correctly assigns them to the head part.
# 4.7. Ablation Study
To evaluate the key components of our method, we conduct ablation studies on the MGN dataset by removing the inverse constraint (Eq. 3) in the shape understanding module and the volume-preserving loss (Eq. 5) used during the test-time training produce, we name them as "ours w/o inv" and "ours w/o $v$ " respectively. We report the PMD and ELS metrics in Tab. 4. The model learned without the inverse constraint or volume-preserving loss has worse PMD and ELS score than our full model, indicating the contribution of these two objectives. We also provide qualitative results in Fig. 7. We use red boxes to point out the artifacts. As shown in Fig. 7, our model trained without the inverse constraint produces less accurate pose transfer results. Moreover, adding the volume-preserving loss helps to maintain the character's local details such as the thickness of the arms.
# 5. Conclusion
In this paper, we present a model that deforms unrigged, stylized characters guided by a biped or quadruped avatar. Our model is trained with only easily accessible posed human or animal meshes, yet can be applied to unseen stylized characters in a zero-shot manner during inference. To this end, we draw key insights from classic mesh deformation method and develop a correspondence-aware shape understanding module, an implicit pose deformation module and a volume-based test-time training procedure. We carry out extensive experiments on both the biped and quadruped category and show that our method produces more realistic and accurate deformation compared to baselines learned with comparable or more supervision.
# References
[1] Mixamo. http://www MIXamo.com/. Accessed on November 09<sup>th</sup>, 2022. 5, 6, 7 [2] Kfir Aberman, Peizhuo Li, Dani Lischinski, Olga Sorkine-Hornung, Daniel Cohen-Or, and Baoquan Chen. Skeleton-aware networks for deep motion retargeting. In ACM Transactions on Graphics (SIGGRAPH), 2020. 2, 3 [3] Noam Aigerman, Kunal Gupta, Vladimir G Kim, Siddhartha Chaudhuri, Jun Saito, and Thibault Groueix. Neural jacobian fields: Learning intrinsic mappings of arbitrary meshes. arXiv preprint arXiv:2205.02904, 2022. 2 [4] Mazen Al Borno, Ludovic Righetti, Michael J Black, Scott L Delp, Eugene Fiume, and Javier Romero. Robust physics-based motion retargeting with realistic body shapes. In Computer Graphics Forum. Wiley Online Library, 2018. 2, 3 [5] Andreas Aristidou and Joan Lasenby. FABRIK: A fast, iterative solver for the inverse kinematics problem. Graphical Models, 2011. 3 [6] Quentin Avril, Donya Ghafourzadeh, Srinivasan Ramachandran, Sahel Fallahdoust, Sarah Ribet, Olivier Dionne, Martin de Lasa, and Eric Paquette. Animation setup transfer for 3D characters. In Computer Graphics Forum, 2016. 2 [7] Ilya Baran and Jovan Popovic. Automatic rigging and animation of 3D characters. In ACM Transactions on Graphics (SIGGRAPH), 2007. 2, 3 [8] Ilya Baran, Daniel Vlasic, Eitan Grinspun, and Jovan Popovic. Semantic deformation transfer. In ACM Transactions on Graphics (ToG). 2009. 2 [9] Mirela Ben-Chen, Ofir Weber, and Craig Gotsman. Spatial deformation transfer. In Proceedings of the 2009 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2009. 2 [10] Bharat Lal Bhatnagar, Cristian Sminchisescu, Christian Theobalt, and Gerard Pons-Moll. Combining implicit function learning and parametric models for 3D human reconstruction. In European Conference on Computer Vision (ECCV), 2020. 3 [11] Bharat Lal Bhatnagar, Garvita Tiwari, Christian Theobalt, and Gerard Pons-Moll. Multi-garment net: Learning to dress 3D people from images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 6 [12] Federica Bogo, Javier Romero, Matthew Loper, and Michael J Black. FAUST: Dataset and evaluation for 3D mesh registration. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 2 [13] Rohan Chabra, Jan E Lenssen, Eddy Ilg, Tanner Schmidt, Julian Straub, Steven Lovegrove, and Richard Newcombe. Deep local shapes: Learning local sdf priors for detailed 3D reconstruction. In European Conference on Computer Vision (ECCV), 2020. 3 [14] Haoyu Chen, Hao Tang, Henglin Shi, Wei Peng, Nicu Sebe, and Guoying Zhao. Intrinsic-extrinsic preserved gans for unsupervised 3D pose transfer. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2 [15] Ricky TQ Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equa
tions. Advances in Neural Information Processing Systems (NeurIPS), 2018. 3 [16] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 [17] An-Chieh Cheng, Xueting Li, Min Sun, Ming-Hsuan Yang, and Sifei Liu. Learning 3D dense correspondence via canonical point autoencoder. In Advances in Neural Information Processing Systems (NeurIPS), 2021. 4 [18] Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3D shape reconstruction and completion. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3 [19] Kwang-Jin Choi and Hyeong-Seok Ko. Online motion retargeting. Comput. Animat. Virtual Worlds, 2000. 3 [20] Brian Delhaisse, Domingo Esteban, Leonel Rozo, and Darwin Caldwell. Transfer learning of shared latent spaces between robots with similar kinematic structure. In International Joint Conference on Neural Networks (IJCNN), 2017. 3 [21] Philipp Erler, Paul Guerrero, Stefan Ohrhallinger, Niloy J Mitra, and Michael Wimmer. Points2surf learning implicit surfaces from point clouds. In European Conference on Computer Vision (ECCV), 2020. 3 [22] Lin Gao, Jie Yang, Yi-Ling Qiao, Yu-Kun Lai, Paul L Rosin, Weiwei Xu, and Shihong Xia. Automatic unpaired shape deformation transfer. ACM Transactions on Graphics (ToG), 2018. 2, 5 [23] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. In IEEE International Conference on Computer Vision (ICCV), 2019. 3 [24] Michael Gleicher. Retargetting motion to new characters. In Proceedings of the 25th annual conference on Computer graphics and interactive techniques, 1998. 2, 3 [25] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. 3D-CODED: 3D correspondences by deep deformation. In European Conference on Computer Vision (ECCV), 2018. 5 [26] Rana Hanocka, Amir Hertz, Noa Fish, Raja Giryes, Shachar Fleishman, and Daniel Cohen-Or. MeshCNN: a network with an edge. ACM Transactions on Graphics (ToG), 2019. 8 [27] Hanyoung Jang, Byungjun Kwon, Moonwon Yu, Seong Uk Kim, and Jongmin Kim. A variational U-Net for motion retargeting. In Comput. Animat. Virtual Worlds, 2020. 3 [28] Boyan Jiang, Yinda Zhang, Xingkui Wei, Xiangyang Xue, and Yanwei Fu. Learning compositional representation for 4D captures with neural ode. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3 [29] Chiyu Jiang, Avneesh Sud, Ameesh Makadia, Jingwei Huang, Matthias Nießner, Thomas Funkhouser, et al. Local implicit grid representations for 3D scenes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 3
[30] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations (ICLR), 2015. 6 [31] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017. 8 [32] Muhammed Kocabas, Nikos Athanasiou, and Michael J Black. Vibe: Video inference for human body pose and shape estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2, 4 [33] Jehee Lee and Sung Yong Shin. A hierarchical approach to interactive motion editing for human-like figures. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, 1999. 3 [34] Jiahui Lei and Kostas Daniilidis. CaDeX: Learning canonical deformation coordinate space for dynamic surface representation via neural homeomorphism. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 3 [35] Peizhuo Li, Kfir Aberman, Rana Hanocka, Libin Liu, Olga Sorkine-Hornung, and Baoquan Chen. Learning skeletal articulations with neural blend shapes. In ACM Transactions on Graphics (SIGGRAPH), 2021. 2, 5, 6, 7 [36] Zhouyingcheng Liao, Jimei Yang, Jun Saito, Gerard Pons-Moll, and Yang Zhou. Skeleton-free pose transfer for stylized 3D characters. In European Conference on Computer Vision (ECCV), 2022. 3, 4, 5, 6, 7, 8 [37] Jongin Lim, Hyung Jin Chang, and Jin Young Choi. PMnet: Learning of disentangled pose and movement for unsupervised motion retargeting. In British Machine Vision Conference (BMVC), 2019. 3 [38] Feng Liu and Xiaoming Liu. Learning implicit functions for topology-varying dense 3D shape correspondence. In Advances in Neural Information Processing Systems (NeurIPS), 2020. 4 [39] Lijuan Liu, Youyi Zheng, Di Tang, Yi Yuan, Changjie Fan, and Kun Zhou. Neuroskinning: Automatic skin binding for production characters with deep graph networks. ACM Transactions on Graphics (ToG), 2019. 3 [40] Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. SMPL: A skinned multiperson linear model. ACM Transactions on Graphics (ToG), 2015. 2, 5 [41] Naureen Mahmood, Nima Ghorbani, Nikolaus F. Troje, Gerard Pons-Moll, and Michael J. Black. AMASS: Archive of motion capture as surface shapes. In IEEE International Conference on Computer Vision (ICCV), 2019. 2, 4 [42] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3D reconstruction in function space. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 [43] Mateusz Michalkiewicz, Jhony K Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Deep level sets: Implicit surface representations for 3D shape inference. arXiv preprint arXiv:1901.06802, 2019. 3 [44] Marko Mihajlovic, Yan Zhang, Michael J Black, and Siyu Tang. LEAP: Learning articulated occupancy of people. In
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3 [45] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4D reconstruction by learning particle dynamics. In IEEE International Conference on Computer Vision (ICCV), 2019. 3 [46] Atsuhiro Noguchi, Umar Iqbal, Jonathan Tremblay, Tatsuya Harada, and Orazio Gallo. Watch it move: Unsupervised discovery of 3D joints for re-posing of articulated objects. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 3 [47] Pablo Palafox, Aljaž Božić, Justus Thies, Matthias Nießner, and Angela Dai. NPMs: Neural parametric models for 3D deformable shapes. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 3, 4 [48] Pablo Palafox, Nikolaos Sarafianos, Tony Tung, and Angela Dai. SPAMs: Structured implicit parametric models. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2, 3 [49] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 [50] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed AA Osman, Dimitrios Tzionas, and Michael J Black. Expressive body capture: 3D hands, face, and body from a single image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 5 [51] Georgios Pavlakos, Vasileios Choutas, Nima Ghorbani, Timo Bolkart, Ahmed A. A. Osman, Dimitrios Tzionas, and Michael J. Black. Expressive body capture: 3D hands, face, and body from a single image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4 [52] Martin Poirier and Eric Paquette. Rig retargeting for 3d animation. In Proceedings of the Graphics Interface 2009 Conference, 2009. 2, 3 [53] Davis Rempe, Tolga Birdal, Aaron Hertzmann, Jimei Yang, Srinath Sridhar, and Leonidas J Guibas. Humor: 3D human motion model for robust pose estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2, 4 [54] Nadine Ruegg, Silvia Zuffi, Konrad Schindler, and Michael J Black. BARC: Learning to regress 3D dog shape from images by exploiting breed information. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2022. 2, 6 [55] Robert W Sumner and Jovan Popovic. Deformation transfer for triangle meshes. ACM Transactions on Graphics (ToG), 2004. 2, 3, 5 [56] Robert W Sumner, Johannes Schmid, and Mark Pauly. Embedded deformation for shape manipulation. In ACM Transactions on Graphics (SIGGRAPH). 2007. 2, 3 [57] Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. Test-time training with self-supervision for generalization under distribution shifts. In International Conference on Machine Learning (ICML), 2020. 5
[58] Ramana Sundararaman, Gautam Pai, and Maks Ovsjanikov. Implicit field supervision for robust non-rigid shape matching. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part III, pages 344-362. Springer, 2022. 3 [59] Seyoon Tak and Hyeong-Seok Ko. A physically-based motion retargeting filter. In ACM Transactions on Graphics (ToG), 2005. 3 [60] Ruben Villegas, Duygu Ceylan, Aaron Hertzmann, Jimei Yang, and Jun Saito. Contact-aware retargeting of skinned motion. In IEEE International Conference on Computer Vision (ICCV), 2021. 3 [61] Ruben Villegas, Jimei Yang, Duygu Ceylan, and Honglak Lee. Neural kinematic networks for unsupervised motion retargeting. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 3 [62] Jiashun Wang, Chao Wen, Yanwei Fu, Haitao Lin, Tianyun Zou, Xiangyang Xue, and Yinda Zhang. Neural pose transfer by spatially adaptive instance normalization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2, 5, 6 [63] Zhan Xu, Yang Zhou, Evangelos Kalogerakis, Chris Landreth, and Karan Singh. RigNet: Neural rigging for articulated characters. In ACM Transactions on Graphics (SIGGRAPH), 2020. 3, 5, 6 [64] Zhan Xu, Yang Zhou, Evangelos Kalogerakis, and Karan Singh. Predicting animation skeletons for 3D articulated models via volumetric nets. In International Conference on 3D Vision, 2019. 3 [65] Jie Yang, Lin Gao, Yu-Kun Lai, Paul L Rosin, and Shihong Xia. Biharmonic deformation transfer with automatic key point selection. Graphical Models, 2018. 2 [66] Wang Yifan, Noam Aigerman, Vladimir G Kim, Siddhartha Chaudhuri, and Olga Sorkine-Hornung. Neural cages for detail-preserving 3D deformations. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2020. 2 [67] Keyang Zhou, Bharat Lal Bhatnagar, and Gerard Pons-Moll. Unsupervised shape and pose disentanglement for 3D meshes. In European Conference on Computer Vision (ECCV), 2020. 2 [68] Silvia Zuffi, Angjoo Kanazawa, David W Jacobs, and Michael J Black. 3D Menagerie: Modeling the 3D shape and pose of animals. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2, 6, 8123version https://git-lfs.github.com/spec/v1oid sha256:84a192044dd238f9148b173b4a71b3676cfe940d6e383859300abb6ba5f4ebe1size 364107.gitattributes+16
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_content_list.jsonAdded+1589
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_model.jsonAdded+2288
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/b1c7981e-30bf-4cd6-b2ff-8dd7951c08ab_origin.pdfAdded+3
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/full.mdAdded+318
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/images.zipAdded+3
2023/Zero-Shot Generative Model Adaptation via Image-Specific Prompt Learning/layout.jsonAdded
2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_content_list.jsonAdded+2560
2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_model.jsonAdded
2023/Zero-Shot Model Diagnosis/549384d4-f244-4966-8076-15abf189c0a7_origin.pdfAdded+3
2023/Zero-Shot Model Diagnosis/full.mdAdded+467
2023/Zero-Shot Model Diagnosis/images.zipAdded+3
2023/Zero-Shot Model Diagnosis/layout.jsonAdded
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_content_list.jsonAdded+1645
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_model.jsonAdded+1991
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/2d536e4a-ee00-4291-84f0-1f5cbbcd1b0f_origin.pdfAdded+3
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/full.mdAdded+304
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/images.zipAdded+3
2023/Zero-Shot Noise2Noise_ Efficient Image Denoising Without Any Data/layout.jsonAdded
2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_content_list.jsonAdded+1692
2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_model.jsonAdded+2332
2023/Zero-Shot Object Counting/a8ad52a0-ee27-4576-981a-5efd9d6920f0_origin.pdfAdded+3
2023/Zero-Shot Object Counting/full.mdAdded+329
2023/Zero-Shot Object Counting/images.zipAdded+3
2023/Zero-Shot Object Counting/layout.jsonAdded
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_content_list.jsonAdded+1730
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_model.jsonAdded
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/5ada3ef3-b974-4dfe-9b9c-f168fb79ad07_origin.pdfAdded+3
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/full.mdAdded+345
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/images.zipAdded+3
2023/Zero-Shot Pose Transfer for Unrigged Stylized 3D Characters/layout.jsonAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_content_list.jsonAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_model.jsonAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/d944ca48-5a24-4209-88df-55a9c1e47851_origin.pdfAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/full.mdAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/images.zipAdded
2023/Zero-Shot Referring Image Segmentation With Global-Local Context Features/layout.jsonAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_content_list.jsonAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_model.jsonAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/120ba89b-8ae1-4464-85a9-dac434567f6d_origin.pdfAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/full.mdAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/images.zipAdded
2023/Zero-Shot Text-to-Parameter Translation for Game Character Auto-Creation/layout.jsonAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_content_list.jsonAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_model.jsonAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/6f578c7a-ccab-49cb-bc75-04e328397fea_origin.pdfAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/full.mdAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/images.zipAdded
2023/expOSE_ Accurate Initialization-Free Projective Factorization Using Exponential Regularization/layout.jsonAdded
2023/gSDF_ Geometry-Driven Signed Distance Functions for 3D Hand-Object Reconstruction/ab15db8d-1011-4beb-9528-c9481ccf45d6_content_list.jsonAdded