Files
slahiriandClaude Opus 4.5 bc17135b39 Enhance framing analysis with body visibility and rule of thirds
- Updated framing component (components.toml) with comprehensive analysis:
  - Body visibility tracking (head to feet, top to bottom)
  - Frame cutoff detection (where body is cropped)
  - Subject distance/scale (fills frame / medium / far)
  - Rule of thirds positioning (horizontal + vertical)
  - Enhanced JSON output schema for agentic mode

- Updated single-shot prompts (prompts.toml) for all tiers:
  - Advanced tier: detailed/extreme with FRAMING & VISIBILITY section
  - Standard tier: framing info in detailed/extreme modes
  - Basic tier: updated detailed/extreme with body visibility and positioning

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 13:31:54 +05:30

637 lines
19 KiB
TOML

# =============================================================================
# Component Definitions for Agentic Analysis
# =============================================================================
# Each component has prompts for different tiers (advanced/standard/basic)
# Advanced tier requests JSON output; Basic tier requests plain text
# =============================================================================
# FRAMING & COMPOSITION
# =============================================================================
[framing]
name = "Framing & Composition"
[framing.advanced]
prompt = """
Analyze the framing and composition in detail:
1. SHOT TYPE: ECU (extreme close-up) / BCU (big close-up) / CU (close-up) / MCU (medium close-up) / MS (medium shot) / MFS (medium full shot) / FS (full shot) / LS (long shot)
2. BODY VISIBILITY (top to bottom):
- Head: fully visible / partially cropped / not visible
- Shoulders: fully visible / partially cropped / not visible
- Chest/torso: fully visible / partially cropped / not visible
- Waist/hips: fully visible / partially cropped / not visible
- Thighs: fully visible / partially cropped / not visible
- Knees: fully visible / partially cropped / not visible
- Lower legs: fully visible / partially cropped / not visible
- Feet: fully visible / partially cropped / not visible
- Where does the frame CUT OFF the body? (e.g., "frame cuts at mid-thigh", "cropped at chest")
3. DISTANCE/SCALE: How much of the frame does the subject fill? (fills frame / medium distance / far from camera)
4. RULE OF THIRDS POSITIONING:
- Subject horizontal position: left third / center / right third
- Subject vertical position: upper third / center / lower third
- Face/eyes position relative to rule of thirds intersections
5. CAMERA ANGLE: Eye level / slightly above / high angle / slightly below / low angle
6. DEPTH OF FIELD: Shallow (blurry background) / medium / deep (sharp background)
7. COLOR MODE: Color or black & white
Output JSON:
{
"shot_type": "<ECU/BCU/CU/MCU/MS/MFS/FS/LS>",
"body_visible": {
"head": "<fully/partial/none>",
"shoulders": "<fully/partial/none>",
"chest": "<fully/partial/none>",
"waist": "<fully/partial/none>",
"thighs": "<fully/partial/none>",
"knees": "<fully/partial/none>",
"lower_legs": "<fully/partial/none>",
"feet": "<fully/partial/none>"
},
"frame_cutoff": "<where frame cuts body>",
"subject_distance": "<fills frame/medium/far>",
"rule_of_thirds": {
"horizontal": "<left/center/right>",
"vertical": "<upper/center/lower>",
"face_position": "<intersection point or position>"
},
"camera_angle": "<angle>",
"depth_of_field": "<shallow/medium/deep>",
"color_mode": "<color/bw>",
"prompt_description": "<complete framing description for image generation>"
}
"""
[framing.standard]
prompt = """
Describe the framing and composition:
SHOT TYPE: What type of shot? (close-up, medium, full shot, etc.)
BODY VISIBILITY (from top to bottom):
- Which body parts are VISIBLE in frame? (head, shoulders, chest, waist, hips, thighs, knees, legs, feet)
- Which body parts are CROPPED/CUT OFF?
- Where exactly does the frame cut the body?
POSITIONING:
- Rule of thirds: Is the subject positioned left, center, or right third?
- Is the subject in upper, center, or lower third of frame?
- How close/far is the subject? Does subject fill the frame or is there space around them?
CAMERA: Angle (eye level, above, below), depth of field (blurry or sharp background)
"""
[framing.basic]
prompt = "Describe the shot type, which body parts are visible vs cropped out of frame, where the subject is positioned (left/center/right, upper/center/lower), and whether the background is blurry or sharp."
# =============================================================================
# ETHNICITY & DEMOGRAPHICS
# =============================================================================
[ethnicity]
name = "Ethnicity & Demographics"
[ethnicity.advanced]
prompt = """
Analyze the subject's demographics:
1. ETHNICITY: Be specific (East Asian, South Asian, European, etc.)
2. SKIN TONE: Base tone + undertone (warm/cool/olive)
3. AGE RANGE: young adult, adult, middle-aged, etc.
4. GENDER: female/male
Output JSON:
{"ethnicity": "<specific>", "skin_tone_base": "<tone>", "skin_tone_undertone": "<undertone>", "age_range": "<range>", "gender": "<gender>", "prompt_description": "<demographics description>"}
"""
[ethnicity.standard]
prompt = """
Describe the subject:
- Ethnicity or heritage
- Skin tone
- Approximate age
- Gender
"""
[ethnicity.basic]
prompt = "Describe the person: their ethnicity, skin tone, approximate age, and gender."
# =============================================================================
# HAIR ANALYSIS
# =============================================================================
[hair]
name = "Hair Analysis"
[hair.advanced]
prompt = """
Analyze the hair (ARRANGEMENT FIRST):
1. ARRANGEMENT: Updo/Ponytail/Braided/Half-up/Loose/Short
2. COLOR: Base color + highlights
3. TEXTURE: Straight/wavy/curly
4. LENGTH: Short/shoulder/mid-back/long
Output JSON:
{"arrangement": "<style>", "base_color": "<color>", "texture": "<texture>", "length": "<length>", "prompt_description": "<hair description starting with arrangement>"}
"""
[hair.standard]
prompt = """
Describe the hair:
- Style/arrangement (up, down, ponytail, etc.)
- Color
- Texture (straight, wavy, curly)
- Length
"""
[hair.basic]
prompt = "Describe the hair: style, color, and length."
# =============================================================================
# FACE ANALYSIS
# =============================================================================
[face]
name = "Face Shape & Angle"
[face.advanced]
prompt = """
Analyze face shape and positioning:
1. FACE SHAPE: Oval/round/heart/square/diamond
2. FACE ANGLE: Frontal/3/4 left/3/4 right/profile
3. HEAD TILT: Level/tilted
Output JSON:
{"shape": "<shape>", "angle": "<angle>", "tilt": "<tilt>", "prompt_description": "<face description>"}
"""
[face.standard]
prompt = """
Describe the face:
- Face shape
- Which direction they're facing
- Expression
"""
[face.basic]
prompt = "Describe the face shape and which direction the person is looking."
# =============================================================================
# EYES ANALYSIS
# =============================================================================
[eyes]
name = "Eyes Analysis"
[eyes.advanced]
prompt = """
Analyze the eyes:
1. COLOR: Specific color with variations
2. SHAPE: Almond/round/hooded/monolid
3. GAZE: Direction
4. EXPRESSION: Soft/intense/playful
5. MAKEUP: If any
Output JSON:
{"color": "<color>", "shape": "<shape>", "gaze": "<direction>", "expression": "<expression>", "makeup": "<if any>", "prompt_description": "<eyes description>"}
"""
[eyes.standard]
prompt = """
Describe the eyes:
- Eye color
- Eye shape
- Where they're looking
- Any eye makeup
"""
[eyes.basic]
prompt = "Describe the eye color, shape, and any makeup."
# =============================================================================
# NOSE & LIPS
# =============================================================================
[nose_lips]
name = "Nose & Lips"
[nose_lips.advanced]
prompt = """
Analyze nose and lips:
NOSE: Shape, bridge height
LIPS: Shape, fullness, color/makeup, state (closed/parted/smiling)
Output JSON:
{"nose_shape": "<shape>", "lip_shape": "<shape>", "lip_color": "<color>", "lip_state": "<state>", "prompt_description": "<nose and lips description>"}
"""
[nose_lips.standard]
prompt = """
Describe nose and lips:
- Nose shape
- Lip shape and color
- Expression (smiling, parted, etc.)
"""
[nose_lips.basic]
prompt = "Describe the nose shape and lip color/expression."
# =============================================================================
# BODY & POSE
# =============================================================================
[body_pose]
name = "Body & Pose"
[body_pose.advanced]
prompt = """
Analyze visible body and pose:
1. VISIBLE PARTS: What's visible
2. POSTURE: Upright/relaxed/leaning
3. ARM/HAND POSITIONS: If visible
4. BODY ANGLE: Facing camera or angled
Output JSON:
{"visible_parts": ["<list>"], "posture": "<posture>", "body_angle": "<angle>", "arms": "<position>", "prompt_description": "<pose description>"}
"""
[body_pose.standard]
prompt = """
Describe the pose:
- What body parts are visible
- Posture (standing, sitting, etc.)
- Arm and hand positions
"""
[body_pose.basic]
prompt = "Describe how the person is posed and what body parts are visible."
# =============================================================================
# BODY POSITIONING (Detailed Limb Analysis)
# =============================================================================
[body_positioning]
name = "Body Positioning"
[body_positioning.advanced]
prompt = """
Analyze detailed body positioning for EACH LIMB INDEPENDENTLY:
SHOULDERS:
- LEFT SHOULDER: Position (raised/lowered/level), angle, visibility
- RIGHT SHOULDER: Position (raised/lowered/level), angle, visibility
ARMS:
- LEFT ARM: Position (raised/lowered/bent/straight/behind/crossed), angle relative to body, hand placement
- RIGHT ARM: Position (raised/lowered/bent/straight/behind/crossed), angle relative to body, hand placement
LEGS (if visible):
- LEFT LEG: Position (straight/bent/crossed/extended), weight distribution
- RIGHT LEG: Position (straight/bent/crossed/extended), weight distribution
Output JSON:
{
"left_shoulder": {"position": "<position>", "angle": "<angle>", "visible": true/false},
"right_shoulder": {"position": "<position>", "angle": "<angle>", "visible": true/false},
"left_arm": {"position": "<position>", "bend_angle": "<angle>", "hand_placement": "<placement>", "visible": true/false},
"right_arm": {"position": "<position>", "bend_angle": "<angle>", "hand_placement": "<placement>", "visible": true/false},
"left_leg": {"position": "<position>", "bend": "<bend>", "visible": true/false},
"right_leg": {"position": "<position>", "bend": "<bend>", "visible": true/false},
"weight_distribution": "<description>",
"prompt_description": "<complete body positioning description>"
}
"""
[body_positioning.standard]
prompt = """
Describe the body positioning in detail:
SHOULDERS:
- Left shoulder: position and angle
- Right shoulder: position and angle
ARMS:
- Left arm: position, bend, hand placement
- Right arm: position, bend, hand placement
LEGS (if visible):
- Left leg: position and bend
- Right leg: position and bend
"""
[body_positioning.basic]
prompt = "Describe shoulder positions (left/right), arm positions (left/right including hands), and leg positions (left/right) if visible."
# =============================================================================
# LIGHT & SHADOW ON BODY
# =============================================================================
[light_shadow_body]
name = "Light & Shadow Analysis"
[light_shadow_body.advanced]
prompt = """
Analyze how light and shadow fall on EACH BODY PART:
FACE:
- Highlight areas (forehead, cheekbones, nose bridge)
- Shadow areas (under eyes, jawline, neck shadow)
- Light direction on face
- Shadow density (soft/hard)
CHEST/TORSO (if visible):
- Highlight areas
- Shadow areas (cleavage shadow, under-bust, side shadows)
- Light wrap-around
ARMS & HANDS (if visible):
- Highlight placement
- Shadow placement
- Muscle definition from shadows
BODY OVERALL:
- Main light direction
- Key light vs fill light ratio
- Rim/edge lighting presence
- Color temperature of shadows (warm/cool/neutral)
Output JSON:
{
"face_lighting": {
"highlights": ["<areas>"],
"shadows": ["<areas>"],
"direction": "<direction>",
"shadow_density": "<soft/medium/hard>"
},
"chest_lighting": {
"highlights": ["<areas>"],
"shadows": ["<areas>"],
"visible": true/false
},
"arm_lighting": {
"highlights": "<description>",
"shadows": "<description>",
"visible": true/false
},
"overall": {
"main_direction": "<direction>",
"key_fill_ratio": "<ratio>",
"rim_light": true/false,
"shadow_color_temp": "<warm/cool/neutral>"
},
"prompt_description": "<comprehensive lighting description for image generation>"
}
"""
[light_shadow_body.standard]
prompt = """
Describe light and shadow on the body:
FACE:
- Where are the highlights? (forehead, cheeks, nose)
- Where are the shadows? (under eyes, jawline)
- Light direction
CHEST/TORSO (if visible):
- Highlight and shadow areas
- How light wraps around the body
ARMS/HANDS (if visible):
- Light and shadow placement
OVERALL:
- Main light direction
- Is there rim lighting/backlighting?
- Are shadows warm or cool?
"""
[light_shadow_body.basic]
prompt = "Describe how light falls on the face (highlights and shadows), on the chest/body, and on the arms. What direction is the light coming from?"
# =============================================================================
# CLOTHING ANALYSIS
# =============================================================================
[clothing]
name = "Clothing Analysis"
[clothing.advanced]
prompt = """
Analyze ONLY VISIBLE clothing:
For each garment:
1. TYPE: Dress/top/pants/etc.
2. NECKLINE: If visible
3. COLOR: Specific
4. MATERIAL: Silk/satin/cotton/etc.
5. FIT: Fitted/loose
ONLY describe what you can SEE - do not invent details.
Output JSON:
{"garments": [{"type": "<type>", "color": "<color>", "material": "<material>"}], "overall_style": "<style>", "prompt_description": "<clothing description>"}
"""
[clothing.standard]
prompt = """
Describe visible clothing:
- Each clothing item
- Colors
- Materials if identifiable
- Overall style
"""
[clothing.basic]
prompt = "Describe what the person is wearing. Include colors and type of clothing."
# =============================================================================
# INTIMATE APPAREL
# =============================================================================
[intimate_apparel]
name = "Intimate Apparel"
[intimate_apparel.advanced]
prompt = """
Analyze visible intimate apparel/lingerie:
BRA: Style, coverage, straps, material, color
BOTTOMS: Style, coverage, material
GARTER/STOCKINGS: If visible
Output JSON:
{"bra": {"style": "<style>", "material": "<material>", "color": "<color>"}, "bottoms": {"style": "<style>", "color": "<color>"}, "stockings": {"present": true/false, "type": "<type>"}, "prompt_description": "<intimate apparel description>"}
"""
[intimate_apparel.standard]
prompt = """
If visible, describe intimate apparel:
- Bra style and color
- Bottoms style and color
- Any stockings or garters
"""
[intimate_apparel.basic]
prompt = "If visible, describe any lingerie or intimate apparel with colors."
# =============================================================================
# TATTOOS
# =============================================================================
[tattoos]
name = "Tattoos"
[tattoos.advanced]
prompt = """
Analyze visible tattoos:
For each: Location, size, style, subject, colors
Output JSON:
{"has_tattoos": true/false, "tattoos": [{"location": "<location>", "style": "<style>", "subject": "<subject>"}], "prompt_description": "<tattoos description or 'no visible tattoos'>"}
"""
[tattoos.standard]
prompt = """
Describe any visible tattoos:
- Location on body
- What the tattoo depicts
- Style and colors
"""
[tattoos.basic]
prompt = "Describe any visible tattoos and where they are located."
# =============================================================================
# ACCESSORIES
# =============================================================================
[accessories]
name = "Accessories"
[accessories.advanced]
prompt = """
Analyze accessories/jewelry:
For each: Type, style, material, color, size
Output JSON:
{"accessories": [{"type": "<type>", "material": "<material>", "color": "<color>"}], "prompt_description": "<accessories description>"}
"""
[accessories.standard]
prompt = """
Describe accessories and jewelry:
- Type of item
- Material (gold, silver, etc.)
- Notable details
"""
[accessories.basic]
prompt = "Describe any jewelry or accessories the person is wearing."
# =============================================================================
# LIGHTING & BACKGROUND
# =============================================================================
[lighting]
name = "Lighting & Background"
[lighting.advanced]
prompt = """
Analyze lighting and background:
LIGHTING: Type, direction, quality, color temperature
SHADOWS: Density, direction
BACKGROUND: Type, color, blur level
Output JSON:
{"light_type": "<type>", "light_direction": "<direction>", "light_quality": "<quality>", "background_type": "<type>", "background_color": "<color>", "background_blur": "<blur>", "prompt_description": "<lighting and background description>"}
"""
[lighting.standard]
prompt = """
Describe lighting and background:
- Light source direction
- Light quality (soft, harsh)
- Background description
- How blurred is the background
"""
[lighting.basic]
prompt = "Describe the lighting (soft or harsh, direction) and the background."
# =============================================================================
# SUBJECT DETECTION
# =============================================================================
[subject_detection]
name = "Subject Detection"
[subject_detection.advanced]
prompt = """
Identify the PRIMARY SUBJECT TYPE:
WOMAN, MAN, COUPLE, GROUP, VEHICLE, LANDSCAPE, ANIMAL, PRODUCT, OTHER
Output JSON:
{"subject_type": "<type>", "has_human": true/false, "human_gender": "<female/male/none>", "main_focus": "<description>"}
"""
[subject_detection.standard]
prompt = "What is the main subject of this image? Is it a person (specify gender), vehicle, landscape, or something else?"
[subject_detection.basic]
prompt = "What is the main subject: a woman, man, or something else?"
# =============================================================================
# ANALYSIS MODE CONFIGURATIONS
# =============================================================================
# Which components to analyze for each mode
[modes.quick]
components = ["framing", "ethnicity", "clothing"]
description = "Fast single-call caption"
include_lighting = false
include_pose = false
include_intimate = false
include_tattoos = false
[modes.standard]
components = ["framing", "ethnicity", "hair", "face", "eyes", "body_pose", "clothing", "lighting"]
description = "Balanced analysis"
include_lighting = true
include_pose = true
include_intimate = false
include_tattoos = false
[modes.detailed]
components = ["framing", "ethnicity", "hair", "face", "eyes", "nose_lips", "body_pose", "body_positioning", "clothing", "intimate_apparel", "tattoos", "accessories", "lighting", "light_shadow_body"]
description = "Full analysis with body positioning and lighting details"
include_lighting = true
include_pose = true
include_intimate = true
include_tattoos = true
[modes.extreme]
components = ["framing", "ethnicity", "hair", "face", "eyes", "nose_lips", "body_pose", "body_positioning", "clothing", "intimate_apparel", "tattoos", "accessories", "lighting", "light_shadow_body"]
description = "Maximum detail with full body positioning and shadow analysis"
include_lighting = true
include_pose = true
include_intimate = true
include_tattoos = true
raw_mode = true