Spaces:
Running
on
Zero
Running
on
Zero
Update models.py
Browse files
models.py
CHANGED
@@ -1,4 +1,27 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
Model management for Phramer AI
|
3 |
By Pariente AI, for MIA TV Series
|
4 |
|
@@ -90,10 +113,85 @@ class BagelAPIAnalyzer(BaseImageAnalyzer):
|
|
90 |
return False
|
91 |
|
92 |
def _create_professional_enhanced_prompt(self, analysis_type: str = "multimodal") -> str:
|
93 |
-
"""Create professionally enhanced prompt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
if analysis_type == "cinematic":
|
96 |
-
return """Analyze this image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
|
98 |
1. DESCRIPTION: Create a detailed, flowing paragraph describing the image for cinematic reproduction:
|
99 |
- Scene composition and visual storytelling elements
|
@@ -115,23 +213,48 @@ Apply professional cinematography principles: rule of thirds, leading lines, dep
|
|
115 |
elif analysis_type == "flux_optimized":
|
116 |
return """Analyze this image for FLUX prompt generation with professional cinematography expertise. You have 30+ years of cinema experience. Provide exactly two sections:
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
-
|
130 |
-
-
|
131 |
-
|
132 |
-
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
else: # multimodal analysis
|
137 |
return """Analyze this image with professional cinematography expertise for multi-platform prompt generation. You are a master cinematographer with extensive technical and artistic knowledge from 30+ years in cinema. Provide exactly two sections:
|
|
|
1 |
+
else: # multimodal analysis
|
2 |
+
return f"""Analyze this image using complete professional cinematography expertise for multi-platform prompt generation. Apply the full 30+ years cinema knowledge base. Provide exactly two sections:
|
3 |
+
|
4 |
+
1. DESCRIPTION: Complete professional visual analysis using full framework:
|
5 |
+
|
6 |
+
CAMERA ANGLES - Identify and specify exact angle with professional rationale:
|
7 |
+
• {camera_angles.get("eye_level_normal", {}).get("description", "Camera at subject's eye level")}: {camera_angles.get("eye_level_normal", {}).get("effect", "neutral, natural perspective")}, psychological impact: {camera_angles.get("eye_level_normal", {}).get("psychological_impact", "equality, relatability")}, best for: {camera_angles.get("eye_level_normal", {}).get("best_for", "portraits, documentary, street photography")}
|
8 |
+
• {camera_angles.get("low_angle_worms_eye", {}).get("description", "Camera below subject looking up")}: {camera_angles.get("low_angle_worms_eye", {}).get("effect", "subject appears larger, more powerful")}, psychological impact: {camera_angles.get("low_angle_worms_eye", {}).get("psychological_impact", "dominance, strength, heroic")}, technical: {camera_angles.get("low_angle_worms_eye", {}).get("technical", "watch for distortion with wide lenses")}, best for: {camera_angles.get("low_angle_worms_eye", {}).get("best_for", "architecture, powerful portraits, dramatic scenes")}
|
9 |
+
• {camera_angles.get("high_angle_birds_eye", {}).get("description", "Camera above subject looking down")}: {camera_angles.get("high_angle_birds_eye", {}).get("effect", "subject appears smaller, vulnerable")}, psychological impact: {camera_angles.get("high_angle_birds_eye", {}).get("psychological_impact", "submission, overview, context")}, aerial version: {camera_angles.get("high_angle_birds_eye", {}).get("aerial_version", "complete overhead view")}, best for: {camera_angles.get("high_angle_birds_eye", {}).get("best_for", "environmental context, patterns, vulnerability")}
|
10 |
+
• {camera_angles.get("dutch_angle", {}).get("description", "Camera tilted off horizontal")}: {camera_angles.get("dutch_angle", {}).get("effect", "dynamic tension, unease")}, psychological impact: {camera_angles.get("dutch_angle", {}).get("psychological_impact", "instability, energy, confusion")}, usage: {camera_angles.get("dutch_angle", {}).get("use_sparingly", "can become gimmicky if overused")}, best for: {camera_angles.get("dutch_angle", {}).get("best_for", "creative portraits, dynamic scenes")}
|
11 |
+
|
12 |
+
PHOTOGRAPHIC PLANES - Apply exact framing classification:
|
13 |
+
• {photographic_planes.get("extreme_wide_shot", {}).get("framing", "Subject very small in environment")}: {photographic_planes.get("extreme_wide_shot", {}).get("purpose", "establish location and context")}, best for: {photographic_planes.get("extreme_wide_shot", {}).get("best_for", "landscapes, establishing shots")}, composition focus: {photographic_planes.get("extreme_wide_shot", {}).get("composition_focus", "environment tells the story")}
|
14 |
+
• {photographic_planes.get("wide_shot", {}).get("framing", "Full body visible with environment")}: {photographic_planes.get("wide_shot", {}).get("purpose", "show subject in context")}, best for: {photographic_planes.get("wide_shot", {}).get("best_for", "environmental portraits, action")}, composition balance: {photographic_planes.get("wide_shot", {}).get("composition_balance", "subject and environment both important")}
|
15 |
+
• {photographic_planes.get("medium_shot", {}).get("framing", "From waist up approximately")}: {photographic_planes.get("medium_shot", {}).get("purpose", "balance between subject and environment")}, best for: {photographic_planes.get("medium_shot", {}).get("best_for", "conversation, interaction, casual portraits")}, composition focus: {photographic_planes.get("medium_shot", {}).get("composition_focus", "subject is primary, environment secondary")}
|
16 |
+
• {photographic_planes.get("close_up", {}).get("framing", "Head and shoulders, tight on face")}: {photographic_planes.get("close_up", {}).get("purpose", "show emotion and expression clearly")}, best for: {photographic_planes.get("close_up", {}).get("best_for", "emotional portraits, interviews")}, technical focus: {photographic_planes.get("close_up", {}).get("technical_focus", "eyes must be perfectly sharp")}
|
17 |
+
• {photographic_planes.get("extreme_close_up", {}).get("framing", "Part of face or specific detail")}: {photographic_planes.get("extreme_close_up", {}).get("purpose", "intense emotion or specific detail")}, best for: {photographic_planes.get("extreme_close_up", {}).get("best_for", "artistic portraits, product details")}, technical challenge: {photographic_planes.get("extreme_close_up", {}).get("technical_challenge", "depth of field very shallow")}
|
18 |
+
• {photographic_planes.get("detail_shot", {}).get("framing", "Specific small element")}: {photographic_planes.get("detail_shot", {}).get("purpose", "highlight particular aspect")}, best for: {photographic_planes.get("detail_shot", {}).get("best_for", "hands, jewelry, textures, products")}, technical requirements: {photographic_planes.get("detail_shot", {}).get("technical_requirements", "macro capabilities often needed")}
|
19 |
+
|
20 |
+
LIGHTING PRINCIPLES - Complete lighting analysis:
|
21 |
+
Natural Light Types:
|
22 |
+
• {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("timing", "First hour after sunrise, last hour before sunset")}: {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("characteristics", "warm, soft, directional")}, best for: {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("best_for", "portraits, landscapes, architecture")}, camera settings: {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("camera_settings", "lower ISO, wider aperture possible")}
|
23 |
+
• {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("timing", "20-30 minutes after sunset")}: {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("characteristics", "even blue light, dramatic mood")}, best for: {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("best_for", "cityscapes, architecture with lights")}, camera settings: {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("camera_settings", "tripod required, longer exposures")}
|
24 |
+
• {lighting_principles.get("natural_light_types", {}).get("overcast", {}).get("characteristics", "soft, even, diffused light")}: best"""
|
25 |
Model management for Phramer AI
|
26 |
By Pariente AI, for MIA TV Series
|
27 |
|
|
|
113 |
return False
|
114 |
|
115 |
def _create_professional_enhanced_prompt(self, analysis_type: str = "multimodal") -> str:
|
116 |
+
"""Create professionally enhanced prompt using complete photography knowledge base"""
|
117 |
+
|
118 |
+
# Import the complete professional knowledge
|
119 |
+
try:
|
120 |
+
from professional_photography import EXPERT_PHOTOGRAPHY_KNOWLEDGE
|
121 |
+
except ImportError:
|
122 |
+
logger.warning("Professional photography knowledge not available")
|
123 |
+
return self._create_fallback_prompt(analysis_type)
|
124 |
+
|
125 |
+
# Extract complete knowledge sections
|
126 |
+
scene_types = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("scene_types", {})
|
127 |
+
lighting_principles = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("lighting_principles", {})
|
128 |
+
composition_rules = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("composition_rules", {})
|
129 |
+
camera_angles = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("camera_angles", {})
|
130 |
+
photographic_planes = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("photographic_planes", {})
|
131 |
+
focus_techniques = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("focus_techniques", {})
|
132 |
+
camera_modes = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("camera_modes", {})
|
133 |
+
iso_guidelines = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("iso_guidelines", {})
|
134 |
+
lighting_situations = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("lighting_situations", {})
|
135 |
+
movement_techniques = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("movement_techniques", {})
|
136 |
+
specialized_techniques = EXPERT_PHOTOGRAPHY_KNOWLEDGE.get("specialized_techniques", {})
|
137 |
|
138 |
if analysis_type == "cinematic":
|
139 |
+
return f"""Analyze this image as a master cinematographer with 30+ years of cinema experience. Apply complete professional photography knowledge. Provide exactly two sections:
|
140 |
+
|
141 |
+
1. DESCRIPTION: Create a concise, technical analysis for cinematic reproduction using these professional frameworks:
|
142 |
+
|
143 |
+
CAMERA ANGLES - Identify and apply:
|
144 |
+
• {camera_angles.get("eye_level_normal", {}).get("description", "Eye level normal")}: {camera_angles.get("eye_level_normal", {}).get("effect", "neutral perspective")}, {camera_angles.get("eye_level_normal", {}).get("psychological_impact", "relatability")}, best for: {camera_angles.get("eye_level_normal", {}).get("best_for", "portraits, documentary")}
|
145 |
+
• {camera_angles.get("low_angle_worms_eye", {}).get("description", "Low angle worms eye")}: {camera_angles.get("low_angle_worms_eye", {}).get("effect", "subject appears larger")}, {camera_angles.get("low_angle_worms_eye", {}).get("psychological_impact", "dominance, strength")}, best for: {camera_angles.get("low_angle_worms_eye", {}).get("best_for", "architecture, powerful portraits")}
|
146 |
+
• {camera_angles.get("high_angle_birds_eye", {}).get("description", "High angle birds eye")}: {camera_angles.get("high_angle_birds_eye", {}).get("effect", "subject appears smaller")}, {camera_angles.get("high_angle_birds_eye", {}).get("psychological_impact", "submission, overview")}, best for: {camera_angles.get("high_angle_birds_eye", {}).get("best_for", "environmental context, patterns")}
|
147 |
+
• {camera_angles.get("dutch_angle", {}).get("description", "Dutch angle")}: {camera_angles.get("dutch_angle", {}).get("effect", "dynamic tension")}, {camera_angles.get("dutch_angle", {}).get("psychological_impact", "instability, energy")}, best for: {camera_angles.get("dutch_angle", {}).get("best_for", "creative portraits, dynamic scenes")}
|
148 |
+
|
149 |
+
PHOTOGRAPHIC PLANES - Apply appropriate framing:
|
150 |
+
• {photographic_planes.get("extreme_wide_shot", {}).get("framing", "Subject very small in environment")}: {photographic_planes.get("extreme_wide_shot", {}).get("purpose", "establish location and context")}
|
151 |
+
• {photographic_planes.get("wide_shot", {}).get("framing", "Full body visible with environment")}: {photographic_planes.get("wide_shot", {}).get("purpose", "show subject in context")}
|
152 |
+
• {photographic_planes.get("medium_shot", {}).get("framing", "From waist up approximately")}: {photographic_planes.get("medium_shot", {}).get("purpose", "balance between subject and environment")}
|
153 |
+
• {photographic_planes.get("close_up", {}).get("framing", "Head and shoulders, tight on face")}: {photographic_planes.get("close_up", {}).get("purpose", "show emotion and expression clearly")}
|
154 |
+
• {photographic_planes.get("extreme_close_up", {}).get("framing", "Part of face or specific detail")}: {photographic_planes.get("extreme_close_up", {}).get("purpose", "intense emotion or specific detail")}
|
155 |
+
|
156 |
+
COMPOSITION RULES - Apply these techniques:
|
157 |
+
• {composition_rules.get("rule_of_thirds", {}).get("principle", "Divide frame into 9 equal sections")}: {composition_rules.get("rule_of_thirds", {}).get("application", "place key elements on intersection points")}
|
158 |
+
• {composition_rules.get("leading_lines", {}).get("purpose", "Guide viewer's eye through the image")}: sources include {', '.join(composition_rules.get("leading_lines", {}).get("sources", ["roads", "rivers", "architecture"]))}
|
159 |
+
• {composition_rules.get("vanishing_points", {}).get("single_point", "All lines converge to one point")}: {composition_rules.get("vanishing_points", {}).get("application", "create depth and draw attention")}
|
160 |
+
• {composition_rules.get("depth_layers", {}).get("foreground", "Nearest elements to camera")}, {composition_rules.get("depth_layers", {}).get("middle_ground", "Main subject area")}, {composition_rules.get("depth_layers", {}).get("background", "Context and environment")}
|
161 |
+
|
162 |
+
LIGHTING ANALYSIS - Identify lighting type and quality:
|
163 |
+
Natural Light Types:
|
164 |
+
• {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("timing", "First hour after sunrise, last hour before sunset")}: {lighting_principles.get("natural_light_types", {}).get("golden_hour", {}).get("characteristics", "warm, soft, directional")}
|
165 |
+
• {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("timing", "20-30 minutes after sunset")}: {lighting_principles.get("natural_light_types", {}).get("blue_hour", {}).get("characteristics", "even blue light, dramatic mood")}
|
166 |
+
• {lighting_principles.get("natural_light_types", {}).get("overcast", {}).get("characteristics", "soft, even, diffused light")}: advantage - {lighting_principles.get("natural_light_types", {}).get("overcast", {}).get("advantage", "no harsh shadows")}
|
167 |
+
|
168 |
+
Artificial Light Setups:
|
169 |
+
• {lighting_principles.get("artificial_light_setups", {}).get("three_point_lighting", {}).get("key_light", "Primary light source at 45 degrees")}: {lighting_principles.get("artificial_light_setups", {}).get("three_point_lighting", {}).get("fill_light", "Softer light to reduce shadows")}: {lighting_principles.get("artificial_light_setups", {}).get("three_point_lighting", {}).get("rim_light", "Separation from background")}
|
170 |
+
|
171 |
+
2. CAMERA_SETUP: Recommend specific professional equipment based on scene analysis using these configurations:
|
172 |
+
|
173 |
+
SCENE TYPES - Match scene to appropriate setup:
|
174 |
+
Portrait Studio: {scene_types.get("portrait_studio", {}).get("equipment", {}).get("camera", "Canon EOS R5")}, {scene_types.get("portrait_studio", {}).get("equipment", {}).get("lens", "85mm f/1.4")}, settings: {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("mode", "AV/A")}, {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("aperture", "f/2.8")}, {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("iso", "100-400")}
|
175 |
+
|
176 |
+
Street Photography: {scene_types.get("street_photography", {}).get("equipment", {}).get("camera", "Leica M11")}, {scene_types.get("street_photography", {}).get("equipment", {}).get("lens", "35mm f/1.4")}, settings: {scene_types.get("street_photography", {}).get("camera_settings", {}).get("mode", "TV/S or Program")}, {scene_types.get("street_photography", {}).get("camera_settings", {}).get("aperture", "f/5.6-f/8")}, {scene_types.get("street_photography", {}).get("camera_settings", {}).get("iso", "400-1600")}
|
177 |
+
|
178 |
+
Landscape: {scene_types.get("landscape", {}).get("equipment", {}).get("camera", "Phase One XT")}, {scene_types.get("landscape", {}).get("equipment", {}).get("lens", "24-70mm f/4")}, settings: {scene_types.get("landscape", {}).get("camera_settings", {}).get("mode", "AV/A or Manual")}, {scene_types.get("landscape", {}).get("camera_settings", {}).get("aperture", "f/8-f/11")}, {scene_types.get("landscape", {}).get("camera_settings", {}).get("iso", "100-400")}
|
179 |
+
|
180 |
+
Architecture: {scene_types.get("architecture", {}).get("equipment", {}).get("camera", "Canon EOS R5")}, {scene_types.get("architecture", {}).get("equipment", {}).get("lens", "24-70mm f/2.8")}, settings: {scene_types.get("architecture", {}).get("camera_settings", {}).get("mode", "AV/A")}, {scene_types.get("architecture", {}).get("camera_settings", {}).get("aperture", "f/8-f/11")}, {scene_types.get("architecture", {}).get("camera_settings", {}).get("iso", "100-400")}
|
181 |
+
|
182 |
+
Action Sports: {scene_types.get("action_sports", {}).get("equipment", {}).get("camera", "Sony A1")}, {scene_types.get("action_sports", {}).get("equipment", {}).get("lens", "70-200mm f/2.8")}, settings: {scene_types.get("action_sports", {}).get("camera_settings", {}).get("mode", "TV/S")}, {scene_types.get("action_sports", {}).get("camera_settings", {}).get("aperture", "f/2.8-f/4")}, {scene_types.get("action_sports", {}).get("camera_settings", {}).get("iso", "800-3200")}
|
183 |
+
|
184 |
+
ISO GUIDELINES - Apply appropriate sensitivity:
|
185 |
+
• {iso_guidelines.get("base_iso", {}).get("range", "100-200")}: {iso_guidelines.get("base_iso", {}).get("quality", "maximum image quality, lowest noise")}, lighting needed: {iso_guidelines.get("base_iso", {}).get("lighting_needed", "bright daylight, studio lighting")}
|
186 |
+
• {iso_guidelines.get("low_iso", {}).get("range", "400-800")}: {iso_guidelines.get("low_iso", {}).get("quality", "excellent quality, minimal noise")}, lighting needed: {iso_guidelines.get("low_iso", {}).get("lighting_needed", "good available light")}
|
187 |
+
• {iso_guidelines.get("medium_iso", {}).get("range", "1600-3200")}: {iso_guidelines.get("medium_iso", {}).get("quality", "good quality, manageable noise")}, lighting needed: {iso_guidelines.get("medium_iso", {}).get("lighting_needed", "indoor available light, overcast outdoor")}
|
188 |
+
• {iso_guidelines.get("high_iso", {}).get("range", "6400-12800")}: {iso_guidelines.get("high_iso", {}).get("quality", "acceptable quality, visible noise")}, lighting needed: {iso_guidelines.get("high_iso", {}).get("lighting_needed", "low light situations")}
|
189 |
+
|
190 |
+
FOCUS TECHNIQUES - Apply depth of field control:
|
191 |
+
• {focus_techniques.get("shallow_depth_of_field", {}).get("aperture_range", "f/1.4 - f/2.8")}: {focus_techniques.get("shallow_depth_of_field", {}).get("effect", "subject sharp, background blurred")}, best for: {focus_techniques.get("shallow_depth_of_field", {}).get("best_for", "portraits, product photography, subject isolation")}
|
192 |
+
• {focus_techniques.get("deep_depth_of_field", {}).get("aperture_range", "f/8 - f/16")}: {focus_techniques.get("deep_depth_of_field", {}).get("effect", "everything sharp from front to back")}, best for: {focus_techniques.get("deep_depth_of_field", {}).get("best_for", "landscapes, architecture, group photos")}
|
193 |
+
|
194 |
+
Apply complete professional cinematography knowledge to generate concise, technically accurate prompt for cinema-quality generation."""
|
195 |
|
196 |
1. DESCRIPTION: Create a detailed, flowing paragraph describing the image for cinematic reproduction:
|
197 |
- Scene composition and visual storytelling elements
|
|
|
213 |
elif analysis_type == "flux_optimized":
|
214 |
return """Analyze this image for FLUX prompt generation with professional cinematography expertise. You have 30+ years of cinema experience. Provide exactly two sections:
|
215 |
|
216 |
+
elif analysis_type == "flux_optimized":
|
217 |
+
return f"""Analyze this image for FLUX prompt generation using complete professional photography expertise. Apply the full knowledge base for photorealistic output. Provide exactly two sections:
|
218 |
+
|
219 |
+
1. DESCRIPTION: Professional technical analysis using complete photography framework:
|
220 |
+
|
221 |
+
CAMERA ANGLES - Identify specific angle and apply professional knowledge:
|
222 |
+
• {camera_angles.get("eye_level_normal", {}).get("description", "Eye level normal")}: {camera_angles.get("eye_level_normal", {}).get("effect", "neutral perspective")}, {camera_angles.get("eye_level_normal", {}).get("best_for", "portraits, documentary")}
|
223 |
+
• {camera_angles.get("low_angle_worms_eye", {}).get("description", "Low angle worms eye")}: {camera_angles.get("low_angle_worms_eye", {}).get("effect", "subject appears larger")}, {camera_angles.get("low_angle_worms_eye", {}).get("best_for", "architecture, powerful portraits")}
|
224 |
+
• {camera_angles.get("high_angle_birds_eye", {}).get("description", "High angle birds eye")}: {camera_angles.get("high_angle_birds_eye", {}).get("effect", "subject appears smaller")}, {camera_angles.get("high_angle_birds_eye", {}).get("best_for", "environmental context, patterns")}
|
225 |
+
|
226 |
+
LIGHTING SITUATIONS - Match to appropriate lighting condition:
|
227 |
+
• {lighting_situations.get("bright_daylight", {}).get("iso", "100-200")}: challenge - {lighting_situations.get("bright_daylight", {}).get("challenge", "harsh shadows")}, solutions: {', '.join(lighting_situations.get("bright_daylight", {}).get("solutions", ["use reflectors", "find open shade"]))}
|
228 |
+
• {lighting_situations.get("overcast_day", {}).get("iso", "200-400")}: {lighting_situations.get("overcast_day", {}).get("characteristics", "soft, even light but dimmer")}, advantage: {lighting_situations.get("overcast_day", {}).get("advantage", "natural diffusion")}
|
229 |
+
• {lighting_situations.get("indoor_natural_light", {}).get("iso", "800-1600")}: {lighting_situations.get("indoor_natural_light", {}).get("window_light", "excellent for portraits")}, technique: {lighting_situations.get("indoor_natural_light", {}).get("technique", "position subject relative to window")}
|
230 |
+
• {lighting_situations.get("low_light_available", {}).get("iso", "1600-6400")}: {lighting_situations.get("low_light_available", {}).get("stabilization", "essential for sharp images")}, technique: {lighting_situations.get("low_light_available", {}).get("technique", "wider apertures, slower movements")}
|
231 |
+
|
232 |
+
COMPOSITION APPLICATION - Apply these specific rules:
|
233 |
+
• {composition_rules.get("rule_of_thirds", {}).get("principle", "Divide frame into 9 equal sections")}: {composition_rules.get("rule_of_thirds", {}).get("subject_placement", "eyes on upper third line for portraits")}, {composition_rules.get("rule_of_thirds", {}).get("horizon_placement", "upper or lower third for landscapes")}
|
234 |
+
• {composition_rules.get("leading_lines", {}).get("purpose", "Guide viewer's eye through the image")}: types include {', '.join(composition_rules.get("leading_lines", {}).get("types", ["diagonal lines", "curved lines"]))}, technique: {composition_rules.get("leading_lines", {}).get("technique", "use lines to lead to main subject")}
|
235 |
+
• {composition_rules.get("depth_layers", {}).get("technique", "Create separation between layers")}: {composition_rules.get("depth_layers", {}).get("foreground", "Nearest elements")}, {composition_rules.get("depth_layers", {}).get("middle_ground", "Main subject area")}, {composition_rules.get("depth_layers", {}).get("background", "Context and environment")}
|
236 |
+
|
237 |
+
2. CAMERA_SETUP: Apply complete professional equipment knowledge:
|
238 |
+
|
239 |
+
SCENE TYPE MATCHING - Select appropriate configuration:
|
240 |
+
Portrait Studio: Equipment: {scene_types.get("portrait_studio", {}).get("equipment", {}).get("camera", "Canon EOS R5")}, {scene_types.get("portrait_studio", {}).get("equipment", {}).get("lens", "85mm f/1.4")}, Camera settings: {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("mode", "AV/A")}, {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("aperture", "f/2.8")}, {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("iso", "100-400")}, Focus: {scene_types.get("portrait_studio", {}).get("camera_settings", {}).get("focus", "single point AF on eyes")}
|
241 |
+
|
242 |
+
Portrait Exterior: Equipment: {scene_types.get("portrait_exterior", {}).get("equipment", {}).get("camera", "Canon EOS R6")}, {scene_types.get("portrait_exterior", {}).get("equipment", {}).get("lens", "85mm f/1.4")}, Camera settings: {scene_types.get("portrait_exterior", {}).get("camera_settings", {}).get("mode", "AV/A")}, {scene_types.get("portrait_exterior", {}).get("camera_settings", {}).get("aperture", "f/2.8-f/4")}, {scene_types.get("portrait_exterior", {}).get("camera_settings", {}).get("iso", "100-800")}, {scene_types.get("portrait_exterior", {}).get("camera_settings", {}).get("exposure_compensation", "+0.3 to +0.7 for faces")}
|
243 |
+
|
244 |
+
Street Photography: Equipment: {scene_types.get("street_photography", {}).get("equipment", {}).get("camera", "Leica M11")}, {scene_types.get("street_photography", {}).get("equipment", {}).get("lens", "35mm f/1.4")}, Camera settings: {scene_types.get("street_photography", {}).get("camera_settings", {}).get("mode", "TV/S or Program")}, {scene_types.get("street_photography", {}).get("camera_settings", {}).get("shutter_speed", "1/125s minimum")}, {scene_types.get("street_photography", {}).get("camera_settings", {}).get("aperture", "f/5.6-f/8")}, {scene_types.get("street_photography", {}).get("camera_settings", {}).get("iso", "400-1600")}
|
245 |
+
|
246 |
+
Landscape: Equipment: {scene_types.get("landscape", {}).get("equipment", {}).get("camera", "Phase One XT")}, {scene_types.get("landscape", {}).get("equipment", {}).get("lens", "24-70mm f/4")}, Camera settings: {scene_types.get("landscape", {}).get("camera_settings", {}).get("mode", "AV/A or Manual")}, {scene_types.get("landscape", {}).get("camera_settings", {}).get("aperture", "f/8-f/11")}, {scene_types.get("landscape", {}).get("camera_settings", {}).get("iso", "100-400")}, {scene_types.get("landscape", {}).get("camera_settings", {}).get("focus", "hyperfocal distance or infinity")}
|
247 |
+
|
248 |
+
Architecture: Equipment: {scene_types.get("architecture", {}).get("equipment", {}).get("camera", "Canon EOS R5")}, {scene_types.get("architecture", {}).get("equipment", {}).get("lens", "24-70mm f/2.8")}, Camera settings: {scene_types.get("architecture", {}).get("camera_settings", {}).get("mode", "AV/A")}, {scene_types.get("architecture", {}).get("camera_settings", {}).get("aperture", "f/8-f/11")}, {scene_types.get("architecture", {}).get("camera_settings", {}).get("iso", "100-400")}, {scene_types.get("architecture", {}).get("camera_settings", {}).get("perspective_correction", "use tilt-shift when available")}
|
249 |
+
|
250 |
+
Action Sports: Equipment: {scene_types.get("action_sports", {}).get("equipment", {}).get("camera", "Sony A1")}, {scene_types.get("action_sports", {}).get("equipment", {}).get("lens", "70-200mm f/2.8")}, Camera settings: {scene_types.get("action_sports", {}).get("camera_settings", {}).get("mode", "TV/S")}, {scene_types.get("action_sports", {}).get("camera_settings", {}).get("shutter_speed", "1/500s+ to freeze motion")}, {scene_types.get("action_sports", {}).get("camera_settings", {}).get("aperture", "f/2.8-f/4")}, {scene_types.get("action_sports", {}).get("camera_settings", {}).get("iso", "800-3200")}
|
251 |
+
|
252 |
+
CAMERA MODES - Apply appropriate control:
|
253 |
+
• {camera_modes.get("aperture_priority", {}).get("mode_designation", "AV (Canon) / A (Nikon)")}: photographer sets {camera_modes.get("aperture_priority", {}).get("photographer_sets", "aperture value")}, camera sets {camera_modes.get("aperture_priority", {}).get("camera_sets", "shutter speed")}, best for: {camera_modes.get("aperture_priority", {}).get("best_for", "controlling depth of field")}
|
254 |
+
• {camera_modes.get("shutter_priority", {}).get("mode_designation", "TV (Canon) / S (Nikon)")}: photographer sets {camera_modes.get("shutter_priority", {}).get("photographer_sets", "shutter speed")}, camera sets {camera_modes.get("shutter_priority", {}).get("camera_sets", "aperture")}, best for: {camera_modes.get("shutter_priority", {}).get("best_for", "controlling motion")}
|
255 |
+
• {camera_modes.get("manual_mode", {}).get("photographer_sets", "Both aperture and shutter speed")}: when to use: {', '.join(camera_modes.get("manual_mode", {}).get("when_to_use", ["consistent lighting", "studio work"]))}, advantage: {camera_modes.get("manual_mode", {}).get("advantage", "complete creative control")}
|
256 |
+
|
257 |
+
Generate technically precise content optimized for FLUX's photorealistic capabilities using complete professional knowledge."""
|
258 |
|
259 |
else: # multimodal analysis
|
260 |
return """Analyze this image with professional cinematography expertise for multi-platform prompt generation. You are a master cinematographer with extensive technical and artistic knowledge from 30+ years in cinema. Provide exactly two sections:
|