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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971

from typing import Dict, List, Optional

class BrandPrompts:
    """
    品牌視覺特徵與多模態識別資料庫
    提供品牌的視覺線索、OpenCLIP prompts、Hashtags
    """

    def __init__(self):
        """初始化品牌資料庫"""

        self.brand_prompts = {
            # ===== 奢侈品牌 Luxury Brands =====
            'luxury': {
                "Louis Vuitton": {
                    "strong_cues": [
                        "LV monogram pattern with interlocking L and V letters on brown canvas",
                        "Brown canvas with golden hardware and leather trim showing Louis Vuitton signature",
                        "Damier checkerboard pattern in brown and tan showing LV design",
                        "Monogram flower motifs with LV initials repeated across surface"
                    ],
                    "weak_cues": [
                        "Luxury handbag with structured silhouette and top handles",
                        "Premium leather goods with golden metal accents",
                        "Designer bag with classic proportions and elegant hardware"
                    ],
                    "region_contexts": ["bag_panel", "luggage_surface", "wallet_front", "accessory_detail"],
                    "openclip_prompts": {
                        "bag_panel": [
                            "Louis Vuitton monogram canvas handbag with leather trim and brass hardware",
                            "LV brown monogram pattern on luxury bag with golden clasps",
                            "Designer handbag showing Louis Vuitton signature canvas and leather details"
                        ],
                        "luggage_surface": [
                            "Louis Vuitton monogram luggage with brown canvas and leather corners",
                            "LV travel bag showing iconic monogram pattern with metallic accents",
                            "Luxury suitcase with Louis Vuitton canvas and protective leather trim"
                        ],
                        "wallet_front": [
                            "Louis Vuitton monogram wallet with compact folding design",
                            "LV small leather good showing monogram canvas and card slots",
                            "Designer wallet with Louis Vuitton pattern and golden hardware"
                        ]
                    },
                    "aliases": ["LV", "Louis Vuitton Monogram", "VUITTON", "LOUIS VUITTON"],
                    "hashtags": {
                        "zh": ["LV", "路易威登", "奢侈品", "精品包", "時尚"],
                        "en": ["LouisVuitton", "LV", "LuxuryFashion", "DesignerBag", "Luxury"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Gucci": {
                    "strong_cues": [
                        "Interlocking double G logo in gold or silver metal with heart shape design",
                        "GG logo in shiny gold brass hardware on black quilted leather",
                        "Green and red web stripe on beige or brown canvas background",
                        "GG monogram pattern repeated across fabric or leather surface",
                        "Chevron matelassé quilted leather with V-shaped stitching pattern",
                        "Heart-shaped double G logo with antique gold finish",
                        "Bamboo handle detail on handbag with curved shape and metal hardware"
                    ],
                    "weak_cues": [
                        "Luxury fashion item with bold logo placement and premium materials",
                        "Designer accessory with distinctive hardware and Italian branding",
                        "High-end quilted leather goods with geometric stitching pattern",
                        "Black leather handbag with gold chain strap and structured silhouette",
                        "Luxury bag with chevron quilting and metallic hardware accents"
                    ],
                    "region_contexts": ["bag_front", "bag_panel", "belt_buckle", "shoe_detail", "accessory_surface", "logo_area"],
                    "openclip_prompts": {
                        "bag_front": [
                            "Gucci Marmont handbag with heart-shaped GG logo in antique gold on quilted black leather",
                            "Designer bag showing Gucci chevron matelassé quilted pattern with gold GG hardware",
                            "Luxury handbag with double G heart logo and V-shaped quilting on black leather",
                            "Gucci bag with interlocking GG logo web stripe and canvas texture",
                            "Black quilted leather Gucci bag with shiny gold double G emblem and chain strap",
                            "Gucci Marmont camera bag with chevron quilted leather and gold hardware",
                            "Designer handbag featuring Gucci signature GG logo with geometric quilting pattern"
                        ],
                        "bag_panel": [
                            "Gucci matelassé quilted leather surface with chevron V-pattern stitching",
                            "Black quilted leather panel with Gucci heart-shaped GG logo in center",
                            "Luxury leather with geometric quilting showing Gucci craftsmanship and gold hardware",
                            "Chevron stitched leather surface with interlocking GG emblem in antique gold",
                            "Gucci quilted pattern with V-shaped chevron design and metallic logo placement"
                        ],
                        "belt_buckle": [
                            "Gucci belt with large interlocking GG buckle in polished gold metal",
                            "Designer belt showing double G logo buckle with black or brown leather strap",
                            "Luxury belt with Gucci signature GG buckle in brass finish and Italian leather",
                            "Gucci GG Marmont belt with textured double G buckle and leather band"
                        ],
                        "logo_area": [
                            "Close-up of Gucci interlocking GG logo in gold metal with heart shape",
                            "Gucci double G emblem in antique gold brass on black leather background",
                            "Heart-shaped GG logo with metallic gold finish showing Gucci branding",
                            "Shiny gold Gucci GG hardware on quilted matelassé leather surface"
                        ]
                    },
                    "aliases": ["GG", "GUCCI", "Gucci Marmont"],
                    "hashtags": {
                        "zh": ["Gucci", "古馳", "奢侈品", "精品", "義大利時尚", "Marmont"],
                        "en": ["Gucci", "LuxuryFashion", "DesignerBrand", "ItalianFashion", "GG", "GucciMarmont"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Chanel": {
                    "strong_cues": [
                        "Interlocking double C logo in metal or quilted leather",
                        "Quilted diamond pattern leather with chain strap",
                        "Black and white color scheme with gold or silver chain",
                        "Camellia flower motif as decorative element"
                    ],
                    "weak_cues": [
                        "Elegant quilted leather handbag with chain details",
                        "Luxury fashion item with classic French design",
                        "Designer accessory with sophisticated minimalist styling"
                    ],
                    "region_contexts": ["bag_flap", "jewelry_detail", "perfume_bottle", "clothing_label"],
                    "openclip_prompts": {
                        "bag_flap": [
                            "Chanel quilted bag with interlocking CC logo and chain strap",
                            "Classic flap bag showing Chanel diamond quilting and gold hardware",
                            "Luxury handbag with Chanel CC closure and leather chain"
                        ]
                    },
                    "aliases": ["CC", "CHANEL"],
                    "hashtags": {
                        "zh": ["Chanel", "香奈兒", "奢侈品", "精品包", "法國時尚"],
                        "en": ["Chanel", "ChanelBag", "Luxury", "FrenchFashion", "ClassicBag"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Hermès": {
                    "strong_cues": [
                        "Orange box or shopping bag with brown ribbon",
                        "Birkin or Kelly bag with distinctive silhouette and hardware",
                        "H logo belt buckle in polished metal",
                        "Saddle stitching on leather goods with equestrian heritage"
                    ],
                    "weak_cues": [
                        "Ultra-luxury leather handbag with exceptional craftsmanship",
                        "Designer accessory with understated elegance and premium materials",
                        "High-end fashion item with classic proportions and hardware"
                    ],
                    "region_contexts": ["bag_structure", "belt_buckle", "scarf_pattern", "packaging"],
                    "openclip_prompts": {
                        "bag_structure": [
                            "Hermès Birkin bag with structured leather and golden padlock",
                            "Luxury handbag showing Hermès Kelly bag silhouette with turnlock",
                            "Designer bag with Hermès craftsmanship and distinctive hardware"
                        ]
                    },
                    "aliases": ["HERMES", "HERMÈS", "BIRKIN", "KELLY"],
                    "hashtags": {
                        "zh": ["Hermès", "愛馬仕", "柏金包", "奢侈品", "頂級精品"],
                        "en": ["Hermes", "Birkin", "KellyBag", "Luxury", "UltraLuxury"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Prada": {
                    "strong_cues": [
                        "Triangular metal logo plate with Prada Milano text",
                        "Saffiano leather with crosshatch texture pattern",
                        "Black nylon bag with triangular logo badge",
                        "Minimalist design with subtle branding placement"
                    ],
                    "weak_cues": [
                        "Italian luxury handbag with clean modern lines",
                        "Designer accessory with understated contemporary styling",
                        "High-end leather goods with minimalist aesthetic"
                    ],
                    "region_contexts": ["bag_front", "wallet_surface", "shoe_heel", "clothing_tag"],
                    "openclip_prompts": {
                        "bag_front": [
                            "Prada bag with triangular metal logo and saffiano leather",
                            "Designer handbag showing Prada Milano badge with textured leather",
                            "Luxury bag with Prada signature triangle and minimalist design"
                        ]
                    },
                    "aliases": ["PRADA", "MILANO"],
                    "hashtags": {
                        "zh": ["Prada", "普拉達", "奢侈品", "義大利精品", "時尚"],
                        "en": ["Prada", "ItalianLuxury", "DesignerBag", "LuxuryFashion", "Minimalist"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                }
            },

            # ===== 運動品牌 Sportswear Brands =====
            'sportswear': {
                "Nike": {
                    "strong_cues": [
                        "Swoosh logo in black white or colored variations",
                        "Just Do It slogan text accompanying swoosh",
                        "Air Jordan jumpman silhouette logo",
                        "Nike Air branding on shoe midsole or tongue"
                    ],
                    "weak_cues": [
                        "Athletic footwear with sporty performance design",
                        "Sportswear with moisture-wicking technical fabric",
                        "Running shoe with cushioned midsole and branded details"
                    ],
                    "region_contexts": ["shoe_side", "apparel_chest", "equipment_surface", "logo_placement"],
                    "openclip_prompts": {
                        "shoe_side": [
                            "Nike sneaker with swoosh logo on side panel",
                            "Athletic shoe showing Nike branding and Air technology",
                            "Running shoe with Nike swoosh and performance design"
                        ],
                        "apparel_chest": [
                            "Nike athletic wear with swoosh logo on chest",
                            "Sports apparel showing Nike branding and technical fabric",
                            "Performance clothing with Nike swoosh and Just Do It text"
                        ]
                    },
                    "aliases": ["NIKE", "JUST DO IT", "swoosh"],
                    "hashtags": {
                        "zh": ["Nike", "耐吉", "運動", "球鞋", "運動品牌"],
                        "en": ["Nike", "JustDoIt", "Sneakers", "Athletic", "Sportswear"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                },

                "Adidas": {
                    "strong_cues": [
                        "Three stripes design on side of shoes or apparel",
                        "Trefoil logo with three-leaf clover design",
                        "Performance logo with three bars forming mountain shape",
                        "Boost technology branding on shoe midsole"
                    ],
                    "weak_cues": [
                        "Athletic footwear with three-stripe design element",
                        "Sportswear with retro or performance styling",
                        "Running shoe with distinctive midsole technology"
                    ],
                    "region_contexts": ["shoe_side", "apparel_sleeve", "equipment_detail", "logo_area"],
                    "openclip_prompts": {
                        "shoe_side": [
                            "Adidas sneaker with three stripes on side panel",
                            "Athletic shoe showing Adidas branding and Boost sole",
                            "Sports footwear with Adidas three-stripe design"
                        ]
                    },
                    "aliases": ["ADIDAS", "ORIGINALS", "three stripes"],
                    "hashtags": {
                        "zh": ["Adidas", "愛迪達", "三條線", "運動", "球鞋"],
                        "en": ["Adidas", "ThreeStripes", "Sneakers", "Sportswear", "Athletic"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                },

                "Puma": {
                    "strong_cues": [
                        "Leaping puma cat logo in silhouette form",
                        "Puma wordmark text in distinctive font",
                        "Formstrip design on side of shoes",
                        "Cat logo combined with Puma text branding"
                    ],
                    "weak_cues": [
                        "Athletic footwear with sleek performance design",
                        "Sportswear with modern styling and branding",
                        "Running shoe with lightweight construction"
                    ],
                    "region_contexts": ["shoe_side", "apparel_detail", "equipment_logo"],
                    "openclip_prompts": {
                        "shoe_side": [
                            "Puma sneaker with cat logo and formstrip design",
                            "Athletic shoe showing Puma branding on side",
                            "Sports footwear with Puma leaping cat emblem"
                        ]
                    },
                    "aliases": ["PUMA"],
                    "hashtags": {
                        "zh": ["Puma", "彪馬", "運動品牌", "球鞋"],
                        "en": ["Puma", "Sneakers", "Athletic", "Sportswear"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                },

                "Under Armour": {
                    "strong_cues": [
                        "Interlocking UA logo design",
                        "HeatGear or ColdGear technology branding",
                        "Under Armour wordmark in athletic font",
                        "Performance fabric with visible texture pattern"
                    ],
                    "weak_cues": [
                        "Athletic apparel with technical performance features",
                        "Sportswear with moisture management technology",
                        "Training gear with modern athletic design"
                    ],
                    "region_contexts": ["apparel_chest", "shoe_detail", "equipment_surface"],
                    "openclip_prompts": {
                        "apparel_chest": [
                            "Under Armour shirt with UA logo on chest",
                            "Athletic wear showing Under Armour branding and HeatGear",
                            "Performance apparel with Under Armour logo and technical fabric"
                        ]
                    },
                    "aliases": ["UA", "UNDER ARMOUR"],
                    "hashtags": {
                        "zh": ["UnderArmour", "安德瑪", "運動服飾", "訓練裝備"],
                        "en": ["UnderArmour", "UA", "Athletic", "PerformanceGear", "Training"]
                    },
                    "visual_distinctive": False,
                    "text_prominent": True
                }
            },

            # ===== 科技品牌 Tech Brands =====
            'tech': {
                "Apple": {
                    "strong_cues": [
                        "Bitten apple logo in silver white or black",
                        "Minimalist aluminum or glass device design",
                        "iPhone with distinctive notch or dynamic island",
                        "MacBook with glowing apple logo on lid"
                    ],
                    "weak_cues": [
                        "Sleek electronic device with premium materials",
                        "Smartphone with edge-to-edge display design",
                        "Laptop with thin profile and minimal branding"
                    ],
                    "region_contexts": ["device_back", "laptop_lid", "packaging", "product_front"],
                    "openclip_prompts": {
                        "device_back": [
                            "iPhone back with apple logo and camera array",
                            "Apple device showing bitten apple emblem and glass back",
                            "Smartphone with Apple branding and premium finish"
                        ],
                        "laptop_lid": [
                            "MacBook with glowing apple logo on aluminum lid",
                            "Apple laptop showing minimalist design and apple emblem",
                            "Premium notebook with Apple branding and sleek profile"
                        ]
                    },
                    "aliases": ["APPLE", "IPHONE", "IPAD", "MACBOOK", "apple logo"],
                    "hashtags": {
                        "zh": ["Apple", "蘋果", "iPhone", "科技", "蘋果產品"],
                        "en": ["Apple", "iPhone", "MacBook", "Tech", "iOS"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Samsung": {
                    "strong_cues": [
                        "Samsung wordmark logo in blue or white",
                        "Galaxy branding on smartphone",
                        "Curved edge display on premium devices",
                        "S Pen stylus with Samsung device"
                    ],
                    "weak_cues": [
                        "Android smartphone with large display",
                        "Electronic device with modern design",
                        "Tech product with screen and branding"
                    ],
                    "region_contexts": ["device_front", "product_back", "packaging"],
                    "openclip_prompts": {
                        "device_front": [
                            "Samsung Galaxy phone with curved display and minimal bezels",
                            "Smartphone showing Samsung branding and screen",
                            "Android device with Samsung logo and modern design"
                        ]
                    },
                    "aliases": ["SAMSUNG", "Galaxy"],
                    "hashtags": {
                        "zh": ["Samsung", "三星", "Galaxy", "安卓", "科技"],
                        "en": ["Samsung", "Galaxy", "Android", "Tech", "Smartphone"]
                    },
                    "visual_distinctive": False,
                    "text_prominent": True
                },

                "Microsoft": {
                    "strong_cues": [
                        "Four-colored square window logo",
                        "Surface branding on devices",
                        "Windows logo on keyboard or device",
                        "Xbox green logo on gaming products"
                    ],
                    "weak_cues": [
                        "Premium laptop or tablet device",
                        "Gaming console or controller",
                        "Computer hardware with modern design"
                    ],
                    "region_contexts": ["device_surface", "keyboard_area", "product_branding"],
                    "openclip_prompts": {
                        "device_surface": [
                            "Microsoft Surface laptop with logo and premium build",
                            "Device showing Microsoft branding and sleek design",
                            "Surface product with distinctive kickstand and logo"
                        ]
                    },
                    "aliases": ["MICROSOFT", "Surface", "Windows"],
                    "hashtags": {
                        "zh": ["Microsoft", "微軟", "Surface", "科技", "Windows"],
                        "en": ["Microsoft", "Surface", "Windows", "Tech", "Xbox"]
                    },
                    "visual_distinctive": False,
                    "text_prominent": True
                }
            },

            # ===== 汽車品牌 Automotive Brands =====
            'automotive': {
                "Mercedes-Benz": {
                    "strong_cues": [
                        "Three-pointed star logo in circle",
                        "Mercedes-Benz wordmark on vehicle",
                        "Large star emblem on front grille",
                        "Hood ornament with standing star"
                    ],
                    "weak_cues": [
                        "Luxury vehicle with premium design",
                        "Car with elegant styling and badge",
                        "Automobile with refined details"
                    ],
                    "region_contexts": ["front_grille", "hood_ornament", "wheel_center", "badge"],
                    "openclip_prompts": {
                        "front_grille": [
                            "Mercedes-Benz front with three-pointed star on grille",
                            "Luxury car showing Mercedes logo and elegant grille design",
                            "Vehicle with Mercedes-Benz star emblem and premium styling"
                        ]
                    },
                    "aliases": ["Mercedes", "Benz", "MB", "MERCEDES-BENZ"],
                    "hashtags": {
                        "zh": ["Mercedes", "賓士", "豪華車", "汽車", "德國車"],
                        "en": ["Mercedes", "Benz", "LuxuryCar", "German", "Automotive"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "BMW": {
                    "strong_cues": [
                        "Blue and white roundel logo with BMW letters",
                        "Kidney grille design on front",
                        "Hofmeister kink in rear window design",
                        "BMW M badge for performance models"
                    ],
                    "weak_cues": [
                        "Luxury sports sedan with dynamic styling",
                        "Premium vehicle with distinctive design",
                        "Car with performance-oriented features"
                    ],
                    "region_contexts": ["front_badge", "wheel_center", "rear_emblem"],
                    "openclip_prompts": {
                        "front_badge": [
                            "BMW front with blue and white roundel and kidney grille",
                            "Luxury car showing BMW logo and distinctive grille design",
                            "Vehicle with BMW emblem and sporty styling"
                        ]
                    },
                    "aliases": ["BMW"],
                    "hashtags": {
                        "zh": ["BMW", "寶馬", "豪華車", "德國車", "性能車"],
                        "en": ["BMW", "LuxuryCar", "German", "Performance", "Ultimate Driving Machine"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                },

                "Tesla": {
                    "strong_cues": [
                        "T-shaped logo resembling cross-section of electric motor",
                        "Tesla wordmark on vehicle",
                        "Minimalist design with flush door handles",
                        "Large touchscreen display in interior"
                    ],
                    "weak_cues": [
                        "Electric vehicle with modern design",
                        "Car with clean aerodynamic styling",
                        "Automobile with minimal exterior branding"
                    ],
                    "region_contexts": ["front_badge", "rear_emblem", "wheel_center"],
                    "openclip_prompts": {
                        "front_badge": [
                            "Tesla front with T logo and minimalist design",
                            "Electric vehicle showing Tesla branding and clean styling",
                            "Car with Tesla emblem and aerodynamic profile"
                        ]
                    },
                    "aliases": ["TESLA"],
                    "hashtags": {
                        "zh": ["Tesla", "特斯拉", "電動車", "科技", "環保"],
                        "en": ["Tesla", "ElectricVehicle", "EV", "Tech", "Sustainable"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": False
                }
            },

            # ===== 鐘錶品牌 Watch Brands =====
            'watches': {
                "Rolex": {
                    "strong_cues": [
                        "Crown logo at 12 o'clock position",
                        "Rolex wordmark on dial with Oyster Perpetual text",
                        "Cyclops date magnifier on crystal",
                        "Jubilee or Oyster bracelet design"
                    ],
                    "weak_cues": [
                        "Luxury watch with metal bracelet",
                        "Timepiece with classic round case",
                        "Wristwatch with premium finish"
                    ],
                    "region_contexts": ["watch_dial", "bracelet_clasp", "case_side"],
                    "openclip_prompts": {
                        "watch_dial": [
                            "Rolex watch dial with crown logo and Oyster Perpetual text",
                            "Luxury timepiece showing Rolex branding and date window",
                            "Wristwatch with Rolex crown emblem and classic design"
                        ]
                    },
                    "aliases": ["ROLEX", "OYSTER PERPETUAL"],
                    "hashtags": {
                        "zh": ["Rolex", "勞力士", "手錶", "奢華", "瑞士錶"],
                        "en": ["Rolex", "LuxuryWatch", "Swiss", "Timepiece", "OysterPerpetual"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                },

                "Omega": {
                    "strong_cues": [
                        "Omega symbol Ω on dial or case",
                        "Seamaster or Speedmaster model branding",
                        "Co-Axial escapement text on dial",
                        "Distinctive bracelet or strap design"
                    ],
                    "weak_cues": [
                        "Swiss luxury watch with sporty design",
                        "Timepiece with professional appearance",
                        "Wristwatch with precision craftsmanship"
                    ],
                    "region_contexts": ["watch_dial", "case_back", "bracelet"],
                    "openclip_prompts": {
                        "watch_dial": [
                            "Omega watch dial with Ω symbol and Seamaster branding",
                            "Luxury timepiece showing Omega logo and Co-Axial text",
                            "Wristwatch with Omega emblem and professional design"
                        ]
                    },
                    "aliases": ["OMEGA", "Ω"],
                    "hashtags": {
                        "zh": ["Omega", "歐米茄", "手錶", "瑞士錶", "奢華"],
                        "en": ["Omega", "Seamaster", "Speedmaster", "SwissWatch", "Luxury"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                }
            },

            # ===== 時尚品牌 Fashion Brands =====
            'fashion': {
                "Zara": {
                    "strong_cues": [
                        "Zara wordmark in sans-serif font",
                        "Minimalist clothing tag design",
                        "Fast fashion styling with current trends",
                        "Zara logo on shopping bag or packaging"
                    ],
                    "weak_cues": [
                        "Contemporary fashion apparel",
                        "Trendy clothing with modern cut",
                        "Affordable fashion item"
                    ],
                    "region_contexts": ["clothing_tag", "shopping_bag", "label"],
                    "openclip_prompts": {
                        "clothing_tag": [
                            "Zara clothing tag with brand logo",
                            "Fashion item showing Zara label",
                            "Apparel with Zara branding"
                        ]
                    },
                    "aliases": ["ZARA"],
                    "hashtags": {
                        "zh": ["Zara", "時尚", "快時尚", "穿搭"],
                        "en": ["Zara", "Fashion", "FastFashion", "Style", "OOTD"]
                    },
                    "visual_distinctive": False,
                    "text_prominent": True
                },

                "H&M": {
                    "strong_cues": [
                        "H&M logo in red and white",
                        "Hennes & Mauritz full brand name",
                        "Conscious collection labeling",
                        "Distinctive red shopping bag"
                    ],
                    "weak_cues": [
                        "Affordable fashion clothing",
                        "Casual apparel with trendy design",
                        "Fast fashion item"
                    ],
                    "region_contexts": ["clothing_tag", "label", "shopping_bag"],
                    "openclip_prompts": {
                        "clothing_tag": [
                            "H&M clothing tag with red and white logo",
                            "Fashion item showing H&M branding",
                            "Apparel with Hennes & Mauritz label"
                        ]
                    },
                    "aliases": ["HM", "H&M", "HENNES", "MAURITZ"],
                    "hashtags": {
                        "zh": ["HM", "時尚", "快時尚", "平價時尚"],
                        "en": ["HM", "Fashion", "FastFashion", "Style", "AffordableFashion"]
                    },
                    "visual_distinctive": False,
                    "text_prominent": True
                },

                "Ralph Lauren": {
                    "strong_cues": [
                        "Polo player on horse logo",
                        "Polo Ralph Lauren text branding",
                        "Preppy American style clothing",
                        "Polo shirt with collar and logo"
                    ],
                    "weak_cues": [
                        "Classic American fashion item",
                        "Preppy styled clothing",
                        "Casual wear with logo detail"
                    ],
                    "region_contexts": ["shirt_chest", "clothing_tag", "logo_placement"],
                    "openclip_prompts": {
                        "shirt_chest": [
                            "Polo shirt with Ralph Lauren polo player logo",
                            "Casual wear showing Polo Ralph Lauren emblem",
                            "Apparel with Ralph Lauren polo player branding"
                        ]
                    },
                    "aliases": ["Polo", "RALPH LAUREN", "RL"],
                    "hashtags": {
                        "zh": ["RalphLauren", "Polo", "美式風格", "經典時尚"],
                        "en": ["RalphLauren", "Polo", "AmericanStyle", "Preppy", "Classic"]
                    },
                    "visual_distinctive": True,
                    "text_prominent": True
                },

                "Tommy Hilfiger": {
                    "strong_cues": [
                        "Red white and blue flag logo",
                        "Tommy Hilfiger wordmark text",
                        "Preppy American sportswear styling",
                        "Flag emblem on clothing"
                    ],
                    "weak_cues": [
                        "Casual American fashion",
                        "Sporty preppy clothing",
                        "Logo-embellished apparel"
                    ],
                    "region_contexts": ["clothing_chest", "tag", "logo_area"],
                    "openclip_prompts": {
                        "clothing_chest": [
                            "Tommy Hilfiger apparel with flag logo",
                            "Casual wear showing Tommy Hilfiger branding",
                            "Clothing with red white blue Tommy emblem"
                        ]
                    },
                    "hashtags": {
                        "zh": ["TommyHilfiger", "美式休閒", "時尚", "經典"],
                        "en": ["TommyHilfiger", "American", "Preppy", "Fashion", "Classic"]
                    }
                },

                "Uniqlo": {
                    "strong_cues": [
                        "Uniqlo wordmark in red and white",
                        "LifeWear philosophy branding",
                        "Minimalist Japanese design aesthetic",
                        "HeatTech or AIRism technology labels"
                    ],
                    "weak_cues": [
                        "Simple functional clothing",
                        "Basic casual apparel",
                        "Affordable everyday wear"
                    ],
                    "region_contexts": ["clothing_tag", "label", "shopping_bag"],
                    "openclip_prompts": {
                        "clothing_tag": [
                            "Uniqlo clothing tag with brand logo",
                            "Apparel showing Uniqlo LifeWear branding",
                            "Clothing with Uniqlo label and technology marker"
                        ]
                    },
                    "hashtags": {
                        "zh": ["Uniqlo", "優衣庫", "日系", "簡約", "基本款"],
                        "en": ["Uniqlo", "LifeWear", "Japanese", "Minimalist", "Basics"]
                    }
                },

                "Gap": {
                    "strong_cues": [
                        "Gap logo in blue square",
                        "Classic American casual styling",
                        "Denim and khaki product focus",
                        "Gap wordmark on tags"
                    ],
                    "weak_cues": [
                        "Casual American clothing",
                        "Basic everyday apparel",
                        "Classic wardrobe staples"
                    ],
                    "region_contexts": ["clothing_tag", "label", "logo_placement"],
                    "openclip_prompts": {
                        "clothing_tag": [
                            "Gap clothing tag with blue logo",
                            "Apparel showing Gap branding",
                            "Casual wear with Gap label"
                        ]
                    },
                    "hashtags": {
                        "zh": ["Gap", "美式休閒", "經典", "基本款"],
                        "en": ["Gap", "American", "Casual", "Classic", "Everyday"]
                    }
                },

                "Lacoste": {
                    "strong_cues": [
                        "Green crocodile logo",
                        "Polo shirt with crocodile emblem",
                        "French sportswear styling",
                        "Crocodile on left chest area"
                    ],
                    "weak_cues": [
                        "Tennis-inspired fashion",
                        "Sporty casual clothing",
                        "Preppy athletic wear"
                    ],
                    "region_contexts": ["shirt_chest", "clothing_detail", "logo_area"],
                    "openclip_prompts": {
                        "shirt_chest": [
                            "Lacoste polo shirt with green crocodile logo",
                            "Sportswear showing Lacoste emblem on chest",
                            "Tennis apparel with Lacoste crocodile branding"
                        ]
                    },
                    "hashtags": {
                        "zh": ["Lacoste", "鱷魚", "法國", "網球", "運動時尚"],
                        "en": ["Lacoste", "Crocodile", "French", "Tennis", "Sporty"]
                    }
                },

                "Calvin Klein": {
                    "strong_cues": [
                        "CK logo or Calvin Klein wordmark",
                        "Minimalist modern design aesthetic",
                        "Monochromatic color schemes",
                        "Underwear waistband with CK logo"
                    ],
                    "weak_cues": [
                        "Contemporary minimalist fashion",
                        "Modern casual clothing",
                        "Designer basics"
                    ],
                    "region_contexts": ["clothing_tag", "waistband", "logo_area"],
                    "openclip_prompts": {
                        "clothing_tag": [
                            "Calvin Klein clothing with CK logo",
                            "Apparel showing Calvin Klein minimalist branding",
                            "Fashion item with CK monogram"
                        ]
                    },
                    "hashtags": {
                        "zh": ["CalvinKlein", "CK", "簡約", "美式時尚", "現代"],
                        "en": ["CalvinKlein", "CK", "Minimalist", "Modern", "Designer"]
                    }
                },

                "Levi's": {
                    "strong_cues": [
                        "Red tab on back pocket of jeans",
                        "Two horse leather patch on waistband",
                        "501 or other style number branding",
                        "Arcuate stitching pattern on back pockets"
                    ],
                    "weak_cues": [
                        "Classic denim jeans",
                        "American workwear styling",
                        "Vintage-inspired casual wear"
                    ],
                    "region_contexts": ["jeans_pocket", "waistband_patch", "back_detail"],
                    "openclip_prompts": {
                        "jeans_pocket": [
                            "Levi's jeans with red tab on back pocket",
                            "Denim showing Levi's two horse patch and arcuate stitching",
                            "Jeans with Levi's 501 branding and classic details"
                        ]
                    },
                    "hashtags": {
                        "zh": ["Levis", "李維斯", "牛仔褲", "丹寧", "美式"],
                        "en": ["Levis", "Denim", "Jeans", "American", "501"]
                    }
                },

                "The North Face": {
                    "strong_cues": [
                        "Half dome logo design",
                        "The North Face wordmark",
                        "Outdoor technical gear styling",
                        "Logo patch on jacket or backpack"
                    ],
                    "weak_cues": [
                        "Outdoor athletic apparel",
                        "Technical outdoor gear",
                        "Adventure clothing"
                    ],
                    "region_contexts": ["jacket_chest", "backpack_front", "apparel_sleeve"],
                    "openclip_prompts": {
                        "jacket_chest": [
                            "The North Face jacket with half dome logo",
                            "Outdoor apparel showing North Face branding",
                            "Technical gear with The North Face emblem"
                        ]
                    },
                    "hashtags": {
                        "zh": ["TheNorthFace", "北臉", "戶外", "機能", "登山"],
                        "en": ["TheNorthFace", "Outdoor", "Adventure", "Technical", "Hiking"]
                    }
                }
            }
        }

        print(f"✓ Brand Prompts initialized with {self._count_brands()} brands across {len(self.brand_prompts)} categories")

    def _count_brands(self) -> int:
        """計算總品牌數量"""
        total = 0
        for category in self.brand_prompts.values():
            total += len(category)
        return total

    def get_prompts(self, brand_name: str) -> Optional[Dict]:
        """
        取得特定品牌的完整 prompt 資料

        Args:
            brand_name: 品牌名稱

        Returns:
            品牌資料字典,若不存在則返回 None
        """
        for category in self.brand_prompts.values():
            if brand_name in category:
                result = category[brand_name].copy()
                result['category'] = self.get_brand_category(brand_name)
                return result
        return None

    def get_brand_category(self, brand_name: str) -> str:
        """
        取得品牌類別

        Args:
            brand_name: 品牌名稱

        Returns:
            品牌類別(luxury, sportswear, tech, etc.)
        """
        for category_name, brands in self.brand_prompts.items():
            if brand_name in brands:
                return category_name
        return 'unknown'

    def get_all_brands(self) -> Dict:
        """
        取得所有品牌的扁平化字典

        Returns:
            扁平化的品牌字典 {brand_name: brand_data}
        """
        flat_brands = {}
        for category_name, brands in self.brand_prompts.items():
            for brand_name, brand_data in brands.items():
                brand_data_copy = brand_data.copy()
                brand_data_copy['category'] = category_name
                flat_brands[brand_name] = brand_data_copy
        return flat_brands

    def get_brands_by_category(self, category: str) -> Dict:
        """
        取得特定類別的所有品牌

        Args:
            category: 類別名稱

        Returns:
            該類別的品牌字典
        """
        return self.brand_prompts.get(category, {})

    def search_brand_by_alias(self, alias: str) -> Optional[str]:
        """
        根據別名搜尋品牌名稱(模糊匹配)

        Args:
            alias: 品牌別名或簡稱

        Returns:
            品牌正式名稱,若找不到則返回 None
        """
        alias_lower = alias.lower()

        # 簡單的別名映射
        alias_map = {
            'lv': 'Louis Vuitton',
            'ck': 'Calvin Klein',
            'tnf': 'The North Face',
            'ua': 'Under Armour',
            'hm': 'H&M'
        }

        if alias_lower in alias_map:
            return alias_map[alias_lower]

        # 模糊匹配品牌名稱
        for brand_name in self.get_all_brands().keys():
            if alias_lower in brand_name.lower():
                return brand_name

        return None

    def get_hashtags(self, brand_name: str, language: str = 'zh') -> List[str]:
        """
        取得品牌的 hashtags

        Args:
            brand_name: 品牌名稱
            language: 語言 ('zh', 'en', 或 'zh-en')

        Returns:
            Hashtag 列表
        """
        brand_data = self.get_prompts(brand_name)
        if not brand_data:
            return []

        hashtags = brand_data.get('hashtags', {})

        if language == 'zh':
            return hashtags.get('zh', [])
        elif language == 'en':
            return hashtags.get('en', [])
        elif language == 'zh-en' or language == 'both':
            zh_tags = hashtags.get('zh', [])
            en_tags = hashtags.get('en', [])
            return zh_tags + en_tags
        else:
            return hashtags.get('zh', [])

print("✓ BrandPrompts defined")