File size: 11,654 Bytes
690bd1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
"""
Constants and configuration dictionaries for the Ultra Supreme Flux Optimizer
"""

# Forbidden elements to filter out from CLIP results
FORBIDDEN_ELEMENTS = ["++", "weights", "white background [en dev]"]

# Age indicators for demographic analysis
MICRO_AGE_INDICATORS = {
    "infant": ["baby", "infant", "newborn", "toddler"],
    "child": ["child", "kid", "young", "little", "small", "youth"],
    "teen": ["teenager", "teen", "adolescent", "young adult", "student"],
    "young_adult": ["young adult", "twenties", "thirty", "youthful", "fresh"],
    "middle_aged": ["middle-aged", "forties", "fifties", "mature", "experienced"],
    "senior": ["senior", "older", "elderly", "aged", "vintage", "seasoned"],
    "elderly": ["elderly", "old", "ancient", "weathered", "aged", "gray", "grey", 
                "white hair", "silver", "wrinkled", "lined", "creased", "time-worn", 
                "distinguished by age"]
}

# Facial feature analysis categories
ULTRA_FACIAL_ANALYSIS = {
    "eye_features": {
        "shape": ["round eyes", "almond eyes", "narrow eyes", "wide eyes", 
                  "deep-set eyes", "prominent eyes"],
        "expression": ["intense gaze", "piercing stare", "gentle eyes", "wise eyes", 
                       "tired eyes", "alert eyes", "contemplative stare", "focused gaze", 
                       "distant look"],
        "color": ["brown eyes", "blue eyes", "green eyes", "hazel eyes", 
                  "dark eyes", "light eyes"],
        "condition": ["clear eyes", "bloodshot", "bright eyes", "dull eyes", 
                      "sparkling eyes"]
    },
    "eyebrow_analysis": ["thick eyebrows", "thin eyebrows", "bushy eyebrows", 
                         "arched eyebrows", "straight eyebrows", "gray eyebrows"],
    "nose_features": ["prominent nose", "straight nose", "aquiline nose", 
                      "small nose", "wide nose", "narrow nose"],
    "mouth_expression": {
        "shape": ["thin lips", "full lips", "small mouth", "wide mouth"],
        "expression": ["slight smile", "serious expression", "frown", 
                       "neutral expression", "contemplative look", "stern look", 
                       "gentle expression"]
    },
    "facial_hair_ultra": {
        "beard_types": ["full beard", "goatee", "mustache", "stubble", 
                        "clean-shaven", "five o'clock shadow"],
        "beard_texture": ["thick beard", "thin beard", "coarse beard", 
                          "fine beard", "well-groomed beard", "unkempt beard"],
        "beard_color": ["black beard", "brown beard", "gray beard", "grey beard", 
                        "silver beard", "white beard", "salt-and-pepper beard", 
                        "graying beard"],
        "beard_length": ["long beard", "short beard", "trimmed beard", 
                         "full-length beard"]
    },
    "skin_analysis": ["smooth skin", "weathered skin", "wrinkled skin", 
                      "clear skin", "rough skin", "aged skin", "youthful skin", 
                      "tanned skin", "pale skin", "olive skin"],
    "facial_structure": ["angular face", "round face", "oval face", "square jaw", 
                         "defined cheekbones", "high cheekbones", "strong jawline", 
                         "soft features", "sharp features"]
}

# Emotion and expression categories
EMOTION_MICRO_EXPRESSIONS = {
    "primary_emotions": ["happy", "sad", "angry", "fearful", "surprised", 
                         "disgusted", "contemptuous"],
    "complex_emotions": ["contemplative", "melancholic", "serene", "intense", 
                         "peaceful", "troubled", "confident", "uncertain", "wise", 
                         "stern", "gentle", "authoritative"],
    "emotional_indicators": ["furrowed brow", "raised eyebrows", "squinted eyes", 
                             "pursed lips", "relaxed expression", "tense jaw", 
                             "soft eyes", "hard stare"]
}

# Cultural and religious indicators
CULTURAL_RELIGIOUS_ULTRA = {
    "jewish_orthodox": ["Orthodox Jewish", "Hasidic", "Ultra-Orthodox", 
                        "religious Jewish", "traditional Jewish", "devout Jewish"],
    "christian": ["Christian", "Catholic", "Protestant", "Orthodox Christian", 
                  "religious Christian"],
    "muslim": ["Muslim", "Islamic", "religious Muslim", "devout Muslim"],
    "buddhist": ["Buddhist", "monk", "religious Buddhist"],
    "general_religious": ["religious", "devout", "pious", "spiritual", 
                          "faithful", "observant"],
    "traditional_clothing": {
        "jewish": ["yarmulke", "kippah", "tallit", "tzitzit", "black hat", 
                   "Orthodox hat", "religious hat", "traditional Jewish hat"],
        "general": ["religious garment", "traditional clothing", 
                    "ceremonial dress", "formal religious attire"]
    }
}

# Clothing and accessories categories
CLOTHING_ACCESSORIES_ULTRA = {
    "headwear": ["hat", "cap", "beret", "headband", "turban", "hood", 
                 "helmet", "crown", "headpiece"],
    "eyewear": ["glasses", "spectacles", "sunglasses", "reading glasses", 
                "wire-frame glasses", "thick-rimmed glasses", "designer glasses", 
                "vintage glasses"],
    "clothing_types": ["suit", "jacket", "shirt", "dress", "robe", "uniform", 
                       "casual wear", "formal wear", "business attire"],
    "clothing_styles": ["formal", "casual", "business", "traditional", 
                        "modern", "vintage", "classic", "contemporary"],
    "accessories": ["jewelry", "watch", "necklace", "ring", "bracelet", 
                    "earrings", "pin", "brooch"]
}

# Environmental analysis categories
ENVIRONMENTAL_ULTRA_ANALYSIS = {
    "indoor_settings": {
        "residential": ["home", "house", "apartment", "living room", "bedroom", 
                        "kitchen", "dining room"],
        "office": ["office", "workplace", "conference room", "meeting room", 
                   "boardroom", "desk"],
        "institutional": ["school", "hospital", "government building", "court", 
                          "library"],
        "religious": ["church", "synagogue", "mosque", "temple", "chapel", 
                      "sanctuary"],
        "commercial": ["store", "restaurant", "hotel", "mall", "shop"]
    },
    "outdoor_settings": {
        "natural": ["park", "garden", "forest", "beach", "mountain", 
                    "countryside", "field"],
        "urban": ["street", "city", "downtown", "plaza", "square", "avenue"],
        "architectural": ["building", "monument", "bridge", "structure"]
    },
    "lighting_ultra": {
        "natural_light": ["sunlight", "daylight", "morning light", "afternoon light", 
                          "evening light", "golden hour", "blue hour", "overcast light", 
                          "window light"],
        "artificial_light": ["indoor lighting", "electric light", "lamp light", 
                             "overhead lighting", "side lighting", "fluorescent", 
                             "LED lighting"],
        "dramatic_lighting": ["high contrast", "low key", "high key", "chiaroscuro", 
                              "dramatic shadows", "rim lighting", "backlighting", 
                              "spotlight"],
        "quality": ["soft lighting", "hard lighting", "diffused light", 
                    "direct light", "ambient light", "mood lighting"]
    }
}

# Pose and body language categories
POSE_BODY_LANGUAGE_ULTRA = {
    "head_position": ["head up", "head down", "head tilted", "head straight", 
                      "head turned", "profile view", "three-quarter view"],
    "posture": ["upright posture", "slouched", "relaxed posture", 
                "formal posture", "casual stance", "dignified bearing"],
    "hand_positions": ["hands clasped", "hands folded", "hands visible", 
                       "hands hidden", "gesturing", "pointing"],
    "sitting_positions": ["sitting upright", "leaning forward", "leaning back", 
                          "sitting casually", "formal sitting"],
    "eye_contact": ["looking at camera", "looking away", "direct gaze", 
                    "averted gaze", "looking down", "looking up"],
    "overall_demeanor": ["confident", "reserved", "approachable", 
                         "authoritative", "gentle", "stern", "relaxed", "tense"]
}

# Photography composition categories
COMPOSITION_PHOTOGRAPHY_ULTRA = {
    "shot_types": ["close-up", "medium shot", "wide shot", "extreme close-up", 
                   "portrait shot", "headshot", "bust shot", "full body"],
    "angles": ["eye level", "high angle", "low angle", "bird's eye", 
               "worm's eye", "Dutch angle"],
    "framing": ["centered", "off-center", "rule of thirds", "tight framing", 
                "loose framing"],
    "depth_of_field": ["shallow depth", "deep focus", "bokeh", "sharp focus", 
                       "soft focus"],
    "camera_movement": ["static", "handheld", "stabilized", "smooth"]
}

# Technical photography specifications
TECHNICAL_PHOTOGRAPHY_ULTRA = {
    "camera_systems": {
        "professional": ["Phase One XF", "Phase One XT", "Hasselblad X2D", 
                         "Fujifilm GFX", "Canon EOS R5", "Nikon Z9"],
        "medium_format": ["Phase One", "Hasselblad", "Fujifilm GFX", "Pentax 645"],
        "full_frame": ["Canon EOS R", "Nikon Z", "Sony A7", "Leica SL"]
    },
    "lenses_ultra": {
        "portrait": ["85mm f/1.4", "135mm f/2", "105mm f/1.4", "200mm f/2.8"],
        "standard": ["50mm f/1.4", "35mm f/1.4", "24-70mm f/2.8"],
        "wide": ["24mm f/1.4", "16-35mm f/2.8", "14mm f/2.8"]
    },
    "aperture_settings": ["f/1.4", "f/2", "f/2.8", "f/4", "f/5.6", "f/8"],
    "photography_styles": ["portrait photography", "documentary photography", 
                           "fine art photography", "commercial photography", 
                           "editorial photography"]
}

# Quality descriptors based on context
QUALITY_DESCRIPTORS_ULTRA = {
    "based_on_age": {
        "elderly": ["distinguished", "venerable", "dignified", "wise", 
                    "experienced", "seasoned", "time-honored", "revered", 
                    "weathered", "sage-like"],
        "middle_aged": ["professional", "accomplished", "established", 
                        "confident", "mature", "refined", "sophisticated"],
        "young_adult": ["vibrant", "energetic", "fresh", "youthful", 
                        "dynamic", "spirited", "lively"]
    },
    "based_on_emotion": {
        "contemplative": ["thoughtful", "reflective", "meditative", "introspective"],
        "confident": ["assured", "self-possessed", "commanding", "authoritative"],
        "gentle": ["kind", "warm", "compassionate", "tender"],
        "stern": ["serious", "grave", "solemn", "austere"]
    },
    "based_on_setting": {
        "formal": ["professional", "official", "ceremonial", "dignified"],
        "casual": ["relaxed", "informal", "comfortable", "natural"],
        "artistic": ["creative", "expressive", "aesthetic", "artistic"]
    }
}

# Gender indicators for analysis
GENDER_INDICATORS = {
    "male": ["man", "male", "gentleman", "guy", "he", "his", "masculine"],
    "female": ["woman", "female", "lady", "she", "her", "feminine"]
}

# Score thresholds and grading
SCORE_GRADES = {
    95: {"grade": "LEGENDARY", "color": "#059669"},
    90: {"grade": "EXCELLENT", "color": "#10b981"},
    80: {"grade": "VERY GOOD", "color": "#22c55e"},
    70: {"grade": "GOOD", "color": "#f59e0b"},
    60: {"grade": "FAIR", "color": "#f97316"},
    0: {"grade": "NEEDS WORK", "color": "#ef4444"}
}