import os import torch import numpy as np import gradio as gr from PIL import Image import random import csv from datetime import datetime # Import rendering logic from the main GaussianAvatars package from gaussian_renderer import FlameGaussianModel from gaussian_renderer import render # --- Demographic groups: each group has its own matched faces and LLM-derived prompts. # To edit prompt text, find the group below and edit the string. # To add more faces, add the Subject name to the relevant group's 'subjects' list # AND add the subject to the upload_models.py script. DEMOGRAPHIC_GROUPS = { "Black Female": { "subjects": ["Subject 175"], "prompts": [ {"text": "Emotion: Anger\n**Anger**\n\nThe facial expression most closely matches **anger**. Key indicators include:\n\n- **Furrowed brow**: The eyebrows are drawn down and together, creating visible tension and vertical lines between the brows \u2014 a hallmark of anger.\n- **Intense, glaring eyes**: The gaze is sharp and focused, conveying hostility or frustration.\n- **Open mouth with tense shape**: The mouth is open as if shouting or speaking forcefully, with the lower jaw dropped and lips tensed \u2014 consistent with an angry vocalization rather than a surprised gasp.\n- **Overall tension**: The facial muscles appear tight and engaged, rather than relaxed or shocked.\n\nWhile *surprise* could be a secondary guess due to the open mouth, surprise typically features **raised** eyebrows and wide, rounded eyes \u2014 whereas here the brows are clearly **lowered and knitted**, ruling it out. The expression strongly conveys angry confrontation, possibly an argument over the phone.\n\n**Highest similarity: anger.**", "source": "Claude"}, {"text": "Emotion: Anger\n**anger**\n\n**Explanation:**\nAs an expert in facial expression classification, I identify this expression as anger based on the distinct morphological features and muscle movements (Action Units) present in the face:\n\n* **Eyebrow Region:** The eyebrows are pulled sharply down and drawn tightly together (activation of the corrugator muscles). This creates prominent vertical wrinkles (furrows) between the brows, which is a primary indicator of anger.\n* **Eye Region:** The eyelids are tense, and the eyes are narrowed into a hard, focused stare or glare. Unlike surprise or fear where the eyes widen, anger often features this tightening around the ocular cavity.\n* **Mouth and Jaw Region:** The jaw is dropped and the mouth is open, but crucially, the lips are tightly tensioned and protruding outward. This configuration is highly characteristic of an individual who is shouting, asserting aggressive dominance, or expressing intense frustration. \n\nThe combination of the lowered, furrowed brow, the intense glare, and the tense, vocalizing mouth exclusively aligns with the universal facial markers for anger.", "source": "Gemini"}, {"text": "Emotion: Anger\nanger\n\nThe expression shows a furrowed brow, narrowed/tense eyes, and a strongly open mouth as if speaking forcefully or shouting, which most closely matches anger.", "source": "GPT"}, {"text": "Emotion: Anger\nAnger.**Explanation:** The facial expression in the image exhibits classic markers of anger. The most prominent feature is the pronounced furrowing of the eyebrows, which are drawn closely together and downwards. Additionally, the mouth is open and tensed, suggesting the person is either shouting or speaking very forcefully. The overall high level of facial muscle tension combined with the context of an intense phone conversation strongly points to anger over the other categories.", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Contempt**\n\nThe facial expression shows a subtle, one-sided tightening of the lips, with the corner of the mouth slightly raised on one side while the rest of the face remains relatively neutral. The eyes are steady and slightly narrowed, without the widened look of surprise or the raised cheeks of genuine happiness. This asymmetrical lip movement combined with a composed, almost skeptical gaze is the hallmark micro-expression of **contempt**.\n\nRanking from highest to lowest similarity:\n**Contempt > happiness > disgust > sadness > anger > surprise > fear**\n\nThe highest similarity category is: **Contempt**.", "source": "Claude"}, {"text": "Emotion: Contempt\n**Contempt**\n\n**Explanation:**\nBased on facial expression analysis, this image most closely aligns with contempt due to the following specific facial markers:\n\n* **Mouth:** The most characteristic feature of contempt is a unilateral or subtle asymmetrical tightening or raising of the lip corner, or a slight pursing of the lips. In this image, the lips are closed and slightly pursed, projecting a sense of disdain or judgment rather than the hard press of anger or the downturn of sadness.\n* **Eyes and Brows:** The gaze is direct but the eyes are slightly narrowed, conveying a critical, evaluative, or dismissive look. The eyebrows are slightly lowered but lack the intense furrowing seen in full anger.\n* **Absence of other core emotions:** There is no upward pull of the cheeks (happiness), no wrinkling of the nose (disgust), no widening of the eyes (surprise/fear), and the inner corners of the eyebrows are not drawn up (sadness). The overall subtle, judgmental expression squarely fits the criteria for contempt.", "source": "Gemini"}, {"text": "Emotion: Contempt\ncontempt\n\nThe expression appears most similar to contempt due to the slightly asymmetrical, tightened mouth and raised/arched eyebrow, giving a skeptical or dismissive look rather than clear happiness, sadness, anger, fear, disgust, or surprise.", "source": "GPT"}, {"text": "Emotion: Contempt\nBased on the analysis of the facial features, here is the classification:\n\n**Highest Similarity Category:** contempt\n\n**Explanation:**\nThe facial expression exhibits subtle but distinct cues associated with **contempt**.\n1. **Asymmetry:** The most defining characteristic of contempt is facial asymmetry. In this image, there is a noticeable asymmetry in the eyebrows (the eyebrow on the viewer's right is arched higher than the other) and a slight unevenness in the mouth, resembling a unilateral lip raise or a smirk (a \"sneer\").\n2. **Mouth:** The lips are pressed together but not in a tight line of anger; rather, the corners appear slightly tight or pulled, suggesting a feeling of disapproval or superiority.\n3. **Gaze:** The direct, steady gaze combined with the head tilt conveys an evaluative, skeptical, or \"unimpressed\" attitude, which is characteristic of contempt.\n\nWhile there are minor elements that could overlap with **anger** (slight brow furrowing) or **sadness** (heavy eyelids), the specific combination of the skeptical eyebrow raise and the asymmetrical mouth posture makes **contempt** the most accurate classification among the provided options.\n\n**Sorted Order (High to Low Similarity):**\n1. contempt\n2. anger\n3. disgust\n4. sadness\n5. fear\n6. surprise\n7. happiness", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe facial expression most closely resembles **disgust**. Key indicators include:\n\n- **Wrinkled/scrunched nose**: The bridge of the nose shows visible tension and creasing, a hallmark of disgust.\n- **Raised upper lip**: The upper lip is pulled upward, exposing a tense mouth area.\n- **Lowered/furrowed brows**: The eyebrows are drawn down and inward, contributing to a look of aversion.\n- **Tightened cheeks**: The cheeks are raised due to the nose and lip movement, reinforcing the expression.\n\nWhile there is a slight element of anger (due to the furrowed brows), the dominant nose-scrunching and lip-curling are more characteristic of disgust than any other emotion in the list.\n\n**Highest similarity: Disgust**", "source": "Claude"}, {"text": "Emotion: Disgust\n**Disgust**\n\n**Explanation:**\nAs a facial expression classification expert, my analysis relies on specific facial muscle micro-expressions (Action Units). The expression in this image aligns most closely with physical manifestations of \"disgust\" due to the following key indicators:\n\n1. **Wrinkled Nose (Levator labii superioris alaeque nasi muscle):** The most prominent feature indicating disgust is the deep wrinkling across the bridge of the nose. Biologically, this is an innate response to close off the nasal passages to offensive odors.\n2. **Raised Upper Lip:** The upper lip is pulled upward, which almost always accompanies the wrinkled nose in a classic disgust response, historically linked to rejecting unpleasant tastes.\n3. **Lowered Brow and Narrowed Eyes:** The eyebrows are pulled down and together (furrowed), and the eyes are narrowed. While this can sometimes indicate anger, when combined closely with the wrinkled nose and raised upper lip, it signifies aversion and an attempt to block out an offending visual stimulus. \n\nThese combined features strongly categorize the dominant expression as disgust.", "source": "Gemini"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe expression shows narrowed eyes, a tense/parted mouth, and a slightly strained nose/upper-face area, which are most consistent with a reaction of aversion or distaste.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the facial features presented in the image, the category with the highest similarity is **disgust**.\n\n**Explanation:**\nThe facial expression exhibits several key indicators of disgust:\n1. **Nose Wrinkling:** The bridge of the nose is wrinkled, which is a primary characteristic of the disgust expression (caused by the *levator labii superioris alaeque nasi* muscle).\n2. **Upper Lip Raise:** The upper lip is raised, exposing the teeth slightly, which often accompanies the nose wrinkling.\n3. **Narrowed Eyes:** The eyes are slightly narrowed and the gaze is directed downward or away, suggesting aversion.\n4. **Mouth Shape:** The mouth is slightly open in a grimace, further indicating a reaction to something unpleasant.\n\nWhile there are elements of anger (furrowed brows) and contempt (which often involves a unilateral lip raise), the combination of the wrinkled nose and raised upper lip strongly points to disgust as the dominant emotion.\n\n**Sorted Similarity (Mental Check):**\n1. **Disgust** (Highest)\n2. Contempt\n3. Anger\n4. Surprise\n5. Sadness\n6. Fear\n7. Happiness", "source": "Qwen"}, {"text": "Emotion: Fear\n**Fear**\n\nThe facial expression most closely matches **fear**. \n\nKey indicators:\n- **Widely opened eyes** with visible sclera above the iris, a hallmark of fear\n- **Raised and drawn-together eyebrows**, creating tension in the forehead\n- **Slightly parted lips** with a tense, downturned mouth, suggesting apprehension\n- The overall **frozen, alert quality** of the expression, as if reacting to a threat or shocking stimulus\n\nWhile there is some overlap with surprise (due to the wide eyes), the tension in the brow and mouth \u2014 rather than a relaxed, dropped jaw \u2014 points more strongly to fear than surprise.", "source": "Claude"}, {"text": "Emotion: Fear\n**Fear**\n\n**Explanation:**\nAs a facial expression classification expert, I identify this expression as \"fear\" based on the presence of specific, highly characteristic facial muscle movements (Action Units):\n\n1. **The Eyes:** The eyes are widened significantly, exposing a large amount of the sclera (the white of the eyes) above the iris. This is a classic physiological response to a threat, aimed at increasing the visual field.\n2. **The Eyebrows:** The eyebrows are raised and drawn together simultaneously. This creates distinct vertical and horizontal wrinkling in the center of the forehead above the nose. While \"surprise\" also features raised eyebrows, the drawing *together* of the brows indicates a negative valence, differentiating it from pure surprise and pulling it into fear or alarm.\n3. **The Mouth:** The mouth is slightly open with the lips somewhat tense and pulled back, rather than relaxed or downturned. \n\nThe combination of the wide, staring eyes and the tense, pinched brow is the universal hallmark of a fearful expression.", "source": "Gemini"}, {"text": "Emotion: Fear\n**Fear**\n\nThe expression shows wide-open eyes and a tense, alert facial posture, suggesting alarm or apprehension. The furrowed brow adds intensity, but the widened eyes make it most similar to **fear**.", "source": "GPT"}, {"text": "Emotion: Fear\n**Fear**\n\n**Explanation:**\nThe facial expression in the image is characterized by prominently widened eyes, raised eyebrows, and a slightly open mouth with tense facial muscles. These are hallmark physical cues of the \"fear\" expression. When humans experience fear, their eyes naturally widen to take in more of their environment to assess potential threats, and the brow raises. This combination of features strongly aligns with the category of fear rather than the other options provided (like surprise, which typically has a more dropped jaw and less intense, rigid tension).", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Highest similarity: happiness**\n\nThe facial expression clearly displays happiness. Key indicators include:\n\n- **Wide, genuine smile** with the corners of the mouth pulled upward and outward, revealing the teeth\n- **Raised cheeks**, which push up slightly under the eyes \u2014 a hallmark of a Duchenne (authentic) smile\n- **Crinkling around the eyes** (orbicularis oculi activation), reinforcing the genuineness of the joy\n- **Relaxed brow** with no tension, indicating no negative emotion is present\n\nThere are no signs of sadness (no downturned mouth or drooping eyelids), anger (no furrowed brow), fear (no widened eyes or tense mouth), disgust (no nose wrinkling or raised upper lip), surprise (no raised brows or dropped jaw), or contempt (no asymmetrical lip tightening).\n\n**Answer: happiness**", "source": "Claude"}, {"text": "Emotion: Happiness\nhappiness\n\n**Explanation:**\nThe facial expression in the image strongly aligns with the universally recognized markers for happiness (often referred to as a \"Duchenne smile\"). \n\nFrom an anatomical and expression-analysis standpoint:\n1. **Lower Face:** The lip corners are pulled sharply upward and backward, parting the lips and exposing the teeth. This is driven by the *zygomaticus major* muscle. \n2. **Cheeks and Eyes:** The cheeks are prominently raised. This upward movement pushes against the lower eyelids, causing the eyes to narrow slightly and creating characteristic folds (dimples and nasolabial folds) around the mouth and cheeks. This engages the *orbicularis oculi* muscle, which is a key indicator of genuine, spontaneous joy.\n3. **Upper Face:** The eyebrows remain relaxed in their natural position, lacking any of the furrowing, raising, or tension associated with negative emotions like anger, fear, or sadness. \n\nThere are no asymmetrical micro-expressions (which might indicate contempt) or facial wrinkling around the nose (which would indicate disgust). Therefore, happiness is the definitive classification.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person is showing a broad smile with visible teeth, raised cheeks, and slightly narrowed eyes, which are strong indicators of happiness.", "source": "GPT"}, {"text": "Emotion: Happiness\nBased on the analysis of the facial features in the image, the category with the highest similarity is **happiness**.\n\n**Explanation:**\nThe expression displays a clear, broad smile with the corners of the mouth pulled back and raised, revealing the teeth. Additionally, the cheeks are lifted, and there is noticeable crinkling around the eyes (often referred to as \"crow's feet\"). These combinations of muscle movements\u2014specifically the upward pull of the mouth and the contraction around the eyes\u2014are the primary universal indicators of genuine joy and happiness. None of the other categories (sadness, anger, fear, disgust, surprise, contempt) fit these visual cues.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Sadness**\n\nThe facial expression in the image most closely matches **sadness**. \n\nKey observations supporting this classification:\n- **Visible tears** streaming down both cheeks, which is a hallmark indicator of sadness or emotional distress\n- **Downturned corners of the mouth**, with lips pressed together in a subdued, heavy manner\n- **Drooping upper eyelids** and a slightly downcast, weary gaze\n- **Inner eyebrows** appear slightly raised and drawn together, a classic micro-expression associated with sorrow\n- Overall **slack facial muscles** conveying emotional heaviness rather than tension (which would suggest anger) or wide-eyed alertness (which would suggest fear or surprise)\n\nWhile tears can occasionally accompany other emotions, the combination of the downturned mouth, heavy eyelids, and lack of tension in the brow strongly points to sadness as the dominant expression.", "source": "Claude"}, {"text": "Emotion: Sadness\nBased on my analysis as a facial expression classification expert, the category with the highest similarity to the input image is:\n\n**sadness**\n\n**Explanation:**\nMy classification is based on specific facial action units and visual cues present in the image:\n\n* **Tears/Watery Eyes:** The most striking and salient feature is the clear presence of distinct tears rolling down both cheeks, along with highly visibly watered eyes. While crying can occasionally happen with extreme joy or physical pain, it is the primary biological indicator of sadness.\n* **Eyebrow Positioning:** The inner corners of the eyebrows are slightly drawn inward and upward. This specific muscle movement (involving the corrugator and frontalis muscles) is a classic, virtually involuntary physiological marker of psychological distress and sorrow.\n* **Mouth and Lower Face:** The lips are closed and relatively relaxed, but the overall shape shows a subtle downward droop at the corners. There is no muscle tension indicative of anger (tightened lips), fear (stretched lips), or contempt (asymmetrical smirk).\n* **Overall Facial Tone:** The face lacks the tightening and hard lines associated with aggressive or high-arousal emotions (like anger or fear), and instead displays a \"heaviness\" or drooping effect in the facial musculature, which perfectly aligns with the low-arousal state of sadness.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe face shows visible tears, heavy/watery eyes, and a subdued, downturned expression, which are most consistent with sadness.", "source": "GPT"}, {"text": "Emotion: Sadness\nBased on the facial features in the image, the classification is:\n\n**sadness**\n\n**Explanation:**\nThe most prominent feature in this image is the presence of tears streaming down the person's cheeks, which is a universal indicator of crying. Additionally, the eyebrows are slightly drawn together and raised in the middle (often called the \"grief muscle\" action), the eyelids appear heavy or drooping, and the mouth is set in a neutral to slightly downturned position. These combined features strongly align with the expression of sadness, distinguishing it from other emotions like anger (which would involve furrowed brows and a tighter mouth), fear (wide eyes), or disgust (wrinkled nose). While there might be elements of contemplation, the tears make \"sadness\" the definitive primary emotion.", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Surprise**\n\nThe facial expression most closely matches **surprise**. Key indicators include:\n\n- **Widely opened eyes** with raised upper eyelids, exposing more of the sclera \u2014 a hallmark of surprise.\n- **Raised eyebrows**, creating a more alert and startled look.\n- **Rounded, puckered mouth** in an \"O\"-like shape, which is characteristic of a surprised reaction.\n- **Tense facial muscles** suggesting a sudden emotional response rather than a sustained negative emotion.\n\nWhile there could be a slight hint of fear (due to the widened eyes), the overall configuration \u2014 especially the rounded mouth rather than a horizontally stretched one \u2014 aligns more strongly with **surprise**.", "source": "Claude"}, {"text": "Emotion: Surprise\n**surprise**\n\n**Explanation:**\nBased on the principles of facial expression analysis, the subject's face displays the classic physiological markers of surprise. This conclusion is drawn from the following specific facial actions:\n\n* **Eyes:** The eyes are widely opened, with the sclera (the white of the eye) clearly visible above the irises, indicating a startled or highly alert state.\n* **Eyebrows:** The eyebrows are distinctly raised and arched upward, which causes subtle horizontal wrinkling on the forehead.\n* **Mouth:** The jaw is dropped and relaxed, while the lips are parted and pushed forward into a distinct \"O\" shape. \n\nThese combined features\u2014wide eyes, raised brows, and an open, rounded mouth\u2014are the universal, defining characteristics of a \"surprise\" expression.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe person\u2019s eyes are wide open and the mouth is rounded in an \u201cO\u201d shape, which are strong visual cues commonly associated with surprise.", "source": "GPT"}, {"text": "Emotion: Surprise\nBased on the visualfeatures of the face, here is the classification:\n\n**Surprise**\n\n**Explanation:**\nThe facial expression displays the classic markers of surprise.\n1. **Eyebrows:** The eyebrows are raised high, creating visible horizontal wrinkles on the forehead. This is a primary indicator of surprise.\n2. **Eyes:** The eyes are widened significantly, exposing more of the sclera (the white part of the eye) than usual. This indicates a high level of alertness or shock.\n3. **Mouth:** The mouth is open with the lips rounded and protruding slightly in an \"O\" shape, which is characteristic of a gasp or an expression of astonishment (like saying \"Oh!\").\n\nWhile there is some intensity that could border on fear (due to the wide eyes), the specific rounding of the lips and the raised (rather than drawn together and lowered) eyebrows point most strongly to surprise.\n\n**Sorted Similarity (Mental Check):**\n1. **Surprise** (Highest similarity)\n2. Fear (Similar eye widening, but mouth shape differs)\n3. Disgust (Lip protrusion can sometimes mimic disgust, but eyes don't match)\n4. Sadness\n5. Anger\n6. Contempt\n7. Happiness", "source": "Qwen"}, ], }, "Indian Female": { "subjects": ["Subject 264"], "prompts": [ {"text": "Emotion: Anger\n**Anger**\n\nThe facial expression most closely resembles **anger**. Key indicators include:\n\n- **Brow region:** The eyebrows appear slightly drawn down and together, creating tension in the forehead area.\n- **Eyes:** The gaze is direct, intense, and hard, with a fixed stare that conveys displeasure.\n- **Mouth:** The lips are pressed firmly together in a tight, straight line, with the corners neither raised nor significantly lowered \u2014 a classic sign of suppressed anger or stern disapproval.\n- **Overall tension:** The face shows a controlled, rigid quality rather than the softness of sadness or the openness of surprise.\n\nWhile there is a slight overlap with **contempt** (due to the tight mouth and intense gaze), the symmetry of the mouth and the brow tension lean more strongly toward anger rather than the typically asymmetrical, one-sided lip tightening of contempt.\n\n**Highest similarity: Anger**", "source": "Claude"}, {"text": "Emotion: Anger\n**Anger**\n\n**Explanation:**\nAs a facial expression classification expert, I identified this expression as anger based on several distinct visual cues:\n\n* **Brow Region:** The eyebrows are pulled centrally and downward, creating a deep vertical furrow between them. This is a primary indicator of frustration or anger.\n* **Eye Region:** The eyes are locked in an intense, fixed glare. The upper and lower eyelids are tense, narrowing the gaze slightly without fully squinting.\n* **Mouth and Jaw:** The lips are pressed firmly together in a tight, unyielding horizontal line, rather than being relaxed or turned up/down. This indicates significant tension in the jaw and lower face. \n\nTogether, the lowered and contracted brows, piercing stare, and tightly pursed lips are the universal hallmark muscle movements associated with anger.", "source": "Gemini"}, {"text": "Emotion: Anger\n**Anger**\n\nThe expression appears stern, with a direct intense gaze and tightly set lips. There are no clear signs of happiness, surprise, or fear; the overall facial tension most closely resembles mild anger or seriousness.", "source": "GPT"}, {"text": "Emotion: Anger\nBased on the visual analysis of the facial features, here is the classification:\n\n**anger**\n\n**Explanation:**\nThe facial expression exhibits key indicators associated with anger, specifically a stern or suppressed form of it.\n1. **Eyebrows:** The eyebrows are slightly furrowed and lowered (drawn together), creating vertical lines between them. This \"glare\" is a primary signal of anger or intense concentration/disapproval.\n2. **Eyes:** The eyes are wide and staring directly and intensely at the viewer. This direct, fixed gaze is often associated with confrontational emotions like anger.\n3. **Mouth:** The lips are pressed firmly together (lip tightening). This indicates tension and suppression, which is a common feature of anger (as opposed to the open mouth of surprise/fear or the upturned corners of happiness).\n\nWhile the expression is serious and could be interpreted as neutral or sad in a different context, the combination of the furrowed brow, intense stare, and tight lips aligns most closely with **anger** (or disapproval) among the provided options. It lacks the nose wrinkling of disgust, the asymmetric smirk of contempt, or the raised inner eyebrows typical of sadness.", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Contempt**\n\nThe facial expression shows subtle but distinct markers of contempt: the mouth displays a slight unilateral tightening/pull on one side (a hallmark asymmetric lip movement associated with contempt), while the rest of the face remains relatively neutral. The eyes are steady and slightly narrowed without the raised brows of surprise, the furrowed brow of anger, or the nose wrinkling of disgust. There is no smile (ruling out happiness), no downturned mouth or drooping eyelids (ruling out sadness), and no widened eyes (ruling out fear). The composed, slightly dismissive asymmetry of the mouth most closely matches **contempt**.", "source": "Claude"}, {"text": "Emotion: Contempt\ncontempt\n\n**Explanation:**\nAs an expert in facial expression classification, I identify the primary emotion here as contempt. Contempt is unique among the universal facial expressions because it is the only one that is asymmetrical (occurring on only one side of the face). \n\nIn the provided image, the subject's eyes and eyebrows are in a relaxed, mostly neutral state. However, looking at the mouth, there is a slight, unilateral tightening and a very subtle inward press/lift on one side of the lips (viewer's left) compared to the other. This subtle, one-sided smirk or lip tightening is the classic neurological marker for contempt.", "source": "Gemini"}, {"text": "Emotion: Contempt\ncontempt\n\nThe expression appears mostly neutral, but among the given categories it is closest to contempt: the lips are pressed/pursed with a slight asymmetry, and the gaze is steady without signs of happiness, sadness, anger, fear, disgust, or surprise.", "source": "GPT"}, {"text": "Emotion: Contempt\n**Contempt**\n\n**Explanation:** \nThe facial expression is classified as contempt primarily due to the distinct action of the mouth. The lips are tightly pressed together and pulled slightly to one side in a unilateral manner, which is the classic facial marker for contempt. Additionally, the gaze is averted, which can accompany this expression of disapproval or disdain. There are no indicators of the other categories, such as the raised cheeks of happiness, the furrowed brows of anger, or the widened eyes of surprise or fear.", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe facial expression most closely matches **disgust**. Key indicators include:\n\n- **Wrinkled nose**: The bridge of the nose shows distinct creasing, a hallmark of the disgust expression.\n- **Raised upper lip**: The upper lip is pulled upward, exposing tension around the mouth area.\n- **Lowered, furrowed brows**: The eyebrows are drawn down and together, creating tension in the forehead.\n- **Tightened cheeks**: The cheeks are raised due to the nose-wrinkling action, narrowing the eyes slightly.\n- **Downturned mouth corners**: The mouth shows a slight grimace, reinforcing aversion rather than anger or sadness.\n\nWhile there are minor traces of **anger** (due to the furrowed brow), the prominent nose wrinkle and raised upper lip make **disgust** the highest-similarity match.", "source": "Claude"}, {"text": "Emotion: Disgust\n**disgust**\n\n**Explanation:**\nAs a facial expression classification expert, I identify this expression as disgust based on several quintessential facial micro-expressions (Action Units) present in the image:\n\n1. **Nose Wrinkling:** The most prominent indicator of disgust is the pronounced wrinkling across the bridge and sides of the nose. \n2. **Raised Upper Lip:** The subject's upper lip is visibly pulled upward, which alters the shape of the mouth and deepens the nasolabial folds (the lines running from the nose to the mouth).\n3. **Lowered Brow and Narrowed Eyes:** The eyebrows are pulled down slightly, and the upward movement of the cheeks (caused by the raised upper lip) causes the eyes to narrow. \n\nThese combined features form the universal, prototypical expression of disgust, representing a biological reaction simulating the rejection of an offensive smell or taste.", "source": "Gemini"}, {"text": "Emotion: Disgust\ndisgust\n\nThe expression shows a wrinkled nose, tightened/raised upper lip, and furrowed brows, which are characteristic signs of disgust.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the visualfeatures of the face, here is the classification:\n\n**disgust**\n\n**Explanation:**\nThe facial expression displays the classic characteristics of disgust. The most significant indicator is the wrinkling of the nose and the raising of the upper lip, which creates a \"sneering\" look associated with revulsion or distaste. Additionally, the eyebrows are drawn together and lowered (furrowed), and the mouth is compressed in a grimace. While the furrowed brows can also appear in anger or sadness, the specific combination with the scrunched nose strongly points to disgust as the primary emotion. It lacks the wide eyes of fear or surprise, the unilateral lip raise of contempt, and the upturned mouth of happiness.", "source": "Qwen"}, {"text": "Emotion: Fear\n**Highest similarity: fear**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image, I focus on the key features:\n\n- **Eyes:** Widely opened with a fixed, intense gaze. The upper eyelids are raised, exposing more of the sclera, which is a hallmark indicator of fear.\n- **Eyebrows:** Slightly drawn together and raised, creating subtle tension in the forehead \u2014 consistent with fear rather than pure surprise.\n- **Mouth:** Closed and tense, with lips neither smiling nor frowning, suggesting apprehension or wariness rather than shock.\n- **Overall demeanor:** The expression conveys alertness, vulnerability, and unease rather than joy, anger, or disgust.\n\nWhile there is a slight overlap with **surprise** (due to the wide eyes), the tension in the brow and the guarded, non-open mouth point more strongly to **fear**. There are no indicators of happiness (no smile), sadness (no drooping features), anger (no furrowed scowl), disgust (no nose wrinkling or lip curl), or contempt (no asymmetric lip raise).\n\n**Final classification: Fear**", "source": "Claude"}, {"text": "Emotion: Fear\nfear\n\n**Explanation:**\nBased on the facial features presented in the image, the expression most closely signifies fear. The primary indicators are the eyes, which are wide open with the sclera (the white of the eye) clearly visible above the irises. This eye-widening is a classic physiological response to fear or apprehension, designed to increase the field of vision. Additionally, the eyebrows are slightly drawn together and flattened rather than arched high (which would normally distinguish pure surprise). The mouth is firmly closed with the lips slightly tensed, lacking the downward pull of sadness or the snarl of anger, pointing towards a state of heightened, apprehensive alertness.", "source": "Gemini"}, {"text": "Emotion: Fear\nfear\n\nThe expression shows wide, alert eyes and a tense, closed mouth, suggesting apprehension or unease more than happiness, sadness, anger, disgust, surprise, or contempt.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the visual cues in the face:\n\n**Fear**\n\n**Explanation:**\nWhile the eyes are wide open, a trait shared with surprise, the overall intensity and guarded nature of the stare strongly suggest fear or high alertness. The slight furrowing of the brow and the tense, closed mouth do not indicate happiness, anger, or disgust. The expression conveys a sense of wariness and intense, perhaps fearful, scrutiny rather than simple curiosity or surprise. (Note: Depending on the specific dataset, this image is sometimes labeled as Surprise, but the tension in the facial muscles heavily leans towards Fear).", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Highest similarity: happiness**\n\n**Explanation:**\n\nThe facial expression in the image displays clear hallmarks of happiness:\n\n1. **Mouth/Smile:** There is a wide, genuine smile with the corners of the lips pulled upward and outward, revealing the upper teeth \u2014 a classic indicator of joy.\n\n2. **Cheeks:** The cheeks are raised and rounded, which is characteristic of an authentic (Duchenne) smile.\n\n3. **Eyes:** The eyes show slight crinkling and narrowing at the outer corners, consistent with genuine positive emotion rather than a posed or forced smile.\n\n4. **Overall demeanor:** The relaxed brow, soft eyes, and uplifted mouth together convey warmth and pleasure, with no signs of tension, fear, sadness, or negative affect.\n\nThere are no features suggesting sadness (no downturned mouth or furrowed brow), anger (no tightened lips or lowered brows), fear (no widened eyes or stretched lips), disgust (no wrinkled nose or raised upper lip), surprise (no raised brows or dropped jaw), or contempt (no asymmetrical lip corner).\n\n**Result: happiness**", "source": "Claude"}, {"text": "Emotion: Happiness\n**Happiness**\n\n**Explanation:**\nBased on facial expression analysis, the subject exhibits clear, universal physiological markers associated with joy or happiness. \n\nThe primary indicator is the bilateral upward and backward pulling of the lip corners (activation of the zygomaticus major muscle) into a broad smile, which parts the lips and exposes the teeth. Furthermore, there is a visible elevation of the cheeks, which naturally narrows the eyes slightly\u2014a classic hallmark of a genuine (Duchenne) smile. The brow and forehead area remain relaxed, showing no signs of muscle tension associated with negative emotions like anger, fear, or sadness.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person is smiling broadly with raised cheeks and relaxed eyes, which are strong indicators of a happy expression.", "source": "GPT"}, {"text": "Emotion: Happiness\nBasedon the facial features, the category with the highest similarity is **happiness**. \n\n**Explanation:** The person in the image is displaying a clear, broad smile with their teeth visible. The corners of the mouth are turned upwards, and there is a relaxed, pleasant appearance to the face, which are classic indicators of happiness or joy.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Sadness**\n\nThe facial expression most closely resembles **sadness**. Key indicators include:\n\n- **Closed/squinted eyes** with tension around them, suggesting crying or emotional distress\n- **Downturned mouth corners** with the lips slightly parted, a classic marker of sorrow\n- **Furrowed and raised inner eyebrows**, creating the characteristic \"grief\" shape\n- **Tension in the cheeks and chin**, consistent with weeping\n- The overall **strained, contorted look** of the face suggests deep emotional pain rather than physical exertion or other emotions\n\nWhile there could be a hint of physical distress that might overlap with fear or pain, the dominant configuration of features\u2014particularly the eyebrow shape and mouth position\u2014aligns most strongly with **sadness**.", "source": "Claude"}, {"text": "Emotion: Sadness\n**sadness**\n\n**Explanation:**\nBased on the visible facial features, the expression most closely aligns with deep sadness or distress/agony. Here is the breakdown of the specific facial markers indicating this:\n\n* **Eyebrows:** The inner corners of the eyebrows are drawn together and pulled slightly upward, a classic micro-expression associated with grief and sadness.\n* **Eyes:** The eyes are narrowed and the upper eyelids are drooping heavily, which is characteristic of crying or intense emotional pain. \n* **Mouth:** The mouth is open in a manner consistent with gasping or sobbing. The corners of the lips are not turned upward (ruling out happiness) and are instead loose and slightly downturned, further indicating distress rather than a shout of anger or an open jaw of surprise.\n* **Overall facial tension:** The contraction of the facial muscles around the nose and eyes strongly suggests the act of weeping or experiencing profound sorrow.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe person\u2019s facial expression shows signs of distress: the eyebrows appear drawn upward and together, the eyes look narrowed/tearful, and the mouth is open with a downturned, strained appearance, which most closely matches sadness.", "source": "GPT"}, {"text": "Emotion: Sadness\nBased on the analysis of the facial features, here is the classification:\n\n**Sadness**\n\n**Explanation:**\nThe facial expression in the image strongly aligns with **sadness** (specifically intense sadness or distress/crying). Here is the breakdown of the features:\n* **Eyebrows:** The eyebrows are furrowed and drawn together, with the inner corners appearing slightly raised. This \"knitted\" brow is a primary indicator of grief and sadness.\n* **Eyes:** The eyes are tightly closed or squinting, which is typical when someone is crying or in emotional pain.\n* **Mouth:** The mouth is slightly open with the corners tensed and pulling down or back in a grimace, consistent with wailing or sobbing.\n* **Overall Tension:** The entire face shows tension and distress, ruling out positive emotions like happiness or surprise. While there is some similarity to fear or anger due to the distress, the specific configuration of the brows (raised inner corners) and the closed eyes point most strongly to sadness.\n\nThe ranking of similarity would generally be: Sadness > Fear > Anger > Disgust > Surprise > Contempt > Happiness. However, as requested, only the highest similarity is presented.", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Surprise**\n\nThe facial expression most closely matches **surprise**. Key indicators include:\n\n- **Widely opened eyes** with raised upper eyelids, exposing more of the sclera\n- **Raised eyebrows**, creating a heightened, alert appearance\n- **Dropped jaw** with the mouth open in a rounded \"O\" shape\n- **Overall tense yet unguarded** facial musculature, typical of a sudden, unexpected reaction\n\nWhile there could be a slight overlap with **fear** (which also involves wide eyes and an open mouth), the absence of tightened lower eyelids, drawn-back lips, or furrowed brows rules fear out. The expression reads as a momentary, startled reaction rather than distress.\n\n**Highest similarity: Surprise**", "source": "Claude"}, {"text": "Emotion: Surprise\nSurprise\n\n**Explanation:**\nBased on the analysis of facial muscle movements, this expression perfectly aligns with the emotion of extreme surprise. The classification is derived from three primary physiological markers present in the image:\n\n1. **Raised Eyebrows:** The eyebrows are significantly elevated and arched upward across the forehead.\n2. **Widened Eyes:** The eyelids are pulled back, exposing a large amount of the sclera (the whites of the eyes) both above and below the irises. \n3. **Dropped Jaw:** The mouth is wide open due to a pronounced dropping of the jaw. Unlike \"fear\" (which can also feature an open mouth, but typically with lips stretched horizontally and tense), the mouth here is open in a looser, somewhat rounded shape characteristic of a sudden, reflexive reaction to an unexpected stimulus.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe person has wide-open eyes and an open mouth, which are strong indicators of a surprised expression.", "source": "GPT"}, {"text": "Emotion: Surprise\nBased on thefacial features presented in the image, the category with the highest similarity is **surprise**.\n\n**Explanation:**\nThe facial expression displays the classic universal markers of surprise as defined in facial expression analysis (such as the FACS system):\n1. **Eyebrows:** The eyebrows are raised and curved, creating horizontal wrinkles on the forehead (though less visible here due to lighting/angle, the arch is clear).\n2. **Eyes:** The eyes are wide open, with both the upper and lower eyelids retracted, exposing more of the sclera (the white part of the eye).\n3. **Mouth:** The jaw is dropped open, leaving the mouth in a wide \"O\" shape or gasp.\n\nWhile **fear** can share some similarities like wide eyes, fear typically involves the eyebrows being drawn together and the lower eyelid being tense. In this image, the open mouth and raised brows are most indicative of a sudden shock or **surprise**. The other emotions (happiness, sadness, anger, disgust, contempt) do not match these features (e.g., there is no smiling for happiness, no furrowed brow for anger, and no wrinkled nose for disgust).", "source": "Qwen"}, ], }, "Indian Male": { "subjects": ["Subject 074"], "prompts": [ {"text": "Emotion: Anger\n**Anger**\n\nThe facial expression most closely resembles **anger**. \n\nKey observations supporting this classification:\n- **Eyebrows**: Furrowed and drawn downward and together, creating tension in the forehead and between the brows.\n- **Eyes**: Narrowed with an intense, hardened gaze \u2014 a hallmark of anger.\n- **Mouth**: Lips are pressed tightly together and turned downward, with the lower lip pushed up, suggesting suppressed frustration or rage.\n- **Overall tension**: The facial muscles appear tense, particularly around the jaw and cheeks, reinforcing the impression of hostility or displeasure.\n\nWhile there is a slight element that could suggest **disgust** (due to the tightened mouth), the dominant brow furrow and glaring eyes make **anger** the highest-similarity match.", "source": "Claude"}, {"text": "Emotion: Anger\nanger\n\n**Explanation:**\nBased on facial expression analysis, the expression exhibits the classic morphological features associated with anger. \n\n1. **Brows and Forehead:** The eyebrows are distinctly lowered and drawn together, creating noticeable vertical furrows (glabella lines) between the brow. \n2. **Eyes:** There is tension in both the upper and lower eyelids, resulting in a fixed, intense glare.\n3. **Mouth:** The lips are pressed firmly together in a tight line, showing tension in the lower face without the corners turning upward (as in happiness) or downward (as in sadness). \n\nThis combination of a furrowed, lowered brow, intense gaze, and tightened lips strongly aligns with the facial action units characteristic of anger, eliminating the other provided categories.", "source": "Gemini"}, {"text": "Emotion: Anger\nanger\n\nThe expression shows a furrowed brow, tightened eyes, and a firm downturned mouth, which are most consistent with anger.", "source": "GPT"}, {"text": "Emotion: Anger\nBased on the facialfeatures presented in the image, here is the classification:\n\n**Anger**\n\n**Explanation:**\nThe facial expression displays several key indicators of anger. The eyebrows are furrowed and drawn together (glabellar region tension), and the eyes are narrowed in an intense, direct stare. The lips are pressed together firmly in a tight line, and the corners of the mouth are slightly downturned, indicating displeasure or hostility. While there are elements that could overlap with disgust (such as the tension around the mouth and nose) or sadness (downturned mouth), the aggressive furrowing of the brows and the intense gaze are most characteristic of anger.\n\nFor completeness, the sorted order of similarity from high to low would likely be:\n1. **Anger** (Strongest match due to furrowed brows and intense stare)\n2. **Disgust** (Due to the downturned mouth and general look of displeasure)\n3. **Contempt** (Due to the serious, dismissive look)\n4. **Sadness** (Due to the downturned corners of the mouth)\n5. **Fear** (Low similarity; eyes are narrowed rather than wide)\n6. **Surprise** (Low similarity; brows are lowered rather than raised)\n7. **Happiness** (Lowest similarity; no smiling features)", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Highest similarity: contempt**\n\n**Explanation:**\n\nLooking at the facial expression, I observe the following key features:\n\n1. **Asymmetrical mouth**: One corner of the lips is subtly tightened and slightly raised compared to the other side \u2014 this unilateral lip corner tightening is the hallmark indicator of contempt.\n\n2. **Eyes**: The gaze is directed sideways/upward with a slightly narrowed, scrutinizing look, suggesting judgment or skepticism rather than fear or sadness.\n\n3. **Neutral brow**: The eyebrows are not raised (ruling out surprise/fear) nor drawn down and together (ruling out anger).\n\n4. **No nose wrinkling or raised upper lip**: This rules out disgust.\n\n5. **No smile or cheek raising (no Duchenne markers)**: This rules out happiness.\n\n6. **No downturned lips or drooping eyelids**: This rules out sadness.\n\nThe combination of the one-sided lip tightening with a sideways, evaluative glance is the classic, textbook signature of **contempt**.", "source": "Claude"}, {"text": "Emotion: Contempt\n**Contempt**\n\n**Explanation:**\nAs a facial expression classification expert, I identify this expression as contempt primarily due to its distinct asymmetry. The universal marker for contempt is a unilateral (one-sided) pulling or tightening of the lip corner, which is clearly visible here. One side of the mouth is slightly raised into what appears to be a subtle smirk, while the other side remains relatively neutral. \n\nAdditionally, his gaze is averted to the side rather than making direct contact, which, combined with the hand resting on the chin, conveys a sense of critical evaluation, skepticism, or mild superiority. There is an absence of the symmetrical muscle contractions associated with a genuine smile (happiness), raised eyebrows (surprise/fear), or lowered, tightly drawn brows (anger). Therefore, the combination of the asymmetrical mouth posture and the evaluating gaze aligns most strongly with contempt.", "source": "Gemini"}, {"text": "Emotion: Contempt\ncontempt\n\nThe expression shows a slight asymmetrical smirk with pressed lips and a sideways gaze, which is most consistent with contempt or skepticism rather than happiness, sadness, anger, fear, disgust, or surprise.", "source": "GPT"}, {"text": "Emotion: Contempt\nBased on the visual features of the face, here is the classification:\n\n**Contempt**\n\n**Explanation:**\nThe facial expression exhibits several key indicators of contempt, often associated with skepticism, doubt, or mild disdain.\n1. **Mouth:** The lips are pressed together tightly and show a slight asymmetry (resembling a suppressed smirk or a unilateral tightening of the lip corner), which is a hallmark of contempt. It conveys a sense of holding back a negative judgment.\n2. **Eyes and Gaze:** The eyes are looking upward and to the side (averted gaze). This often signals disengagement, skepticism, or a \"rolling eyes\" attitude, suggesting the person is dismissing what they are seeing or hearing.\n3. **Eyebrows:** The eyebrows are slightly furrowed or knitted. While this can appear in sadness or anger, combined with the averted gaze and tight mouth, it reinforces a look of confusion, disapproval, or critical evaluation rather than pure distress or aggression.\n\nWhile there are elements that could suggest mild disgust (due to the tightness) or sadness (due to the brow furrow), the overall \"skeptical\" or \"dismissiveness\" of the expression\u2014looking away with a tight, slightly asymmetrical mouth\u2014aligns best with **contempt**.\n\n**Sorted Order (for internal logic, though only the top one is presented as requested):**\n1. Contempt\n2. Disgust\n3. Sadness\n4. Fear\n5. Anger\n6. Surprise\n7. Happiness", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Highest similarity: disgust**\n\nThe facial expression shows classic markers of disgust:\n\n1. **Wrinkled nose (nose scrunching)** \u2013 The bridge of the nose is visibly creased, which is the hallmark action unit of disgust (AU9 - nose wrinkler).\n2. **Raised upper lip** \u2013 The upper lip is pulled upward, exposing the upper teeth in an aversive manner (AU10 - upper lip raiser).\n3. **Lowered/furrowed brows** \u2013 The eyebrows are drawn down and together, creating tension around the eyes.\n4. **Narrowed eyes** \u2013 The eyes are partially squinted due to the cheek raising and nose wrinkling.\n5. **Asymmetrical mouth tension** \u2013 The mouth shows a slight sneer-like quality rather than the downturned corners of sadness or the bared teeth of anger.\n\nWhile anger shares the furrowed brow, it lacks the distinctive nose wrinkle and raised upper lip seen here. Contempt would typically be more one-sided and subtle. The combination of nose wrinkling + raised upper lip is the signature of **disgust**.", "source": "Claude"}, {"text": "Emotion: Disgust\n**disgust**\n\n**Explanation:**\nBased on the principles of facial expression analysis, the subject is displaying the universal physiological markers associated with disgust. The core morphological features present in this image include:\n\n1. **Wrinkled Nose:** The skin along the bridge of the nose is sharply gathered and wrinkled (known in the Facial Action Coding System as Action Unit 9). This is the hallmark indicator of disgust, originating as a biological response to block offensive odors.\n2. **Raised Upper Lip:** The upper lip is pulled upward and tensed, slightly exposing the teeth.\n3. **Lowered Brows and Narrowed Eyes:** The eyebrows are pulled down and together, and the cheeks are raised, causing the eyes to narrow into a squint. This is a defensive facial posture used to protect the eyes from aversive stimuli. \n\nNone of the other categories align with this specific combination of muscle movements. Anger shares the lowered brow, but lacks the prominent nose wrinkle; contempt involves a one-sided lip movement; and the remaining emotions have entirely different facial profiles.", "source": "Gemini"}, {"text": "Emotion: Disgust\ndisgust\n\nThe face shows a wrinkled nose, tightened/narrowed eyes, and a raised upper lip, which are strong cues associated with disgust.", "source": "GPT"}, {"text": "Emotion: Disgust\n**Highest similarity: Disgust**\n\n**Explanation:**\nThe facial features presented in the image are classic universal markers for disgust. Specifically, the pronounced wrinkling of the nose, the narrowed eyes (squinting), the furrowing of the brow, and the pulling up of the upper lip (exposing the teeth) are the primary muscle movements associated with experiencing or reacting to something repulsive.", "source": "Qwen"}, {"text": "Emotion: Fear\n**Highest similarity: fear**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image, several key features point to **fear**:\n\n1. **Eyes:** Widely opened with visible sclera (whites showing prominently around the iris), which is a hallmark indicator of fear.\n2. **Eyebrows:** Raised and drawn together, creating tension and horizontal wrinkles across the forehead \u2014 a classic fear configuration (distinct from pure surprise, where brows are raised but not pulled together).\n3. **Mouth:** Open with lips stretched horizontally rather than rounded, suggesting tension rather than the \"O\" shape typical of surprise.\n4. **Overall tension:** The combination of stretched mouth, furrowed-yet-raised brows, and wide eyes conveys apprehension and alarm rather than mere astonishment.\n\nWhile **surprise** shares some features (wide eyes, open mouth), surprise typically involves raised brows *without* the inner-brow knitting, and a more rounded mouth. The tension and brow-pulling here tip the expression firmly toward **fear**.", "source": "Claude"}, {"text": "Emotion: Fear\n**fear**\n\n**Explanation:**\nBased on facial action unit analysis, the expression strongly aligns with fear due to the following specific features:\n\n* **Eyebrows:** The eyebrows are raised and pulled drawn together, creating distinct horizontal and vertical tension lines in the center of the forehead. This differs from pure surprise, where the eyebrows are typically just raised in relaxed arches.\n* **Eyes:** The eyes are widened significantly, exposing a large amount of the sclera (the white of the eyes) above the iris, indicating heightened alertness to a potential threat. \n* **Mouth:** The jaw is dropped with the mouth hanging open, and the lips appear tense rather than relaxed. \n* **Gaze:** The sharp, darting eye movement to the side suggests the subject is fixating on an alarming or unexpected stimulus in their periphery.", "source": "Gemini"}, {"text": "Emotion: Fear\nfear\n\nThe expression shows widened eyes, raised and drawn-together eyebrows, and a slightly open, tense mouth, which are most consistent with fear or worry rather than neutral surprise.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the visual evidence in the image, here is the analysis:\n\n**Highest Similarity Category:** **fear**\n\n**Explanation:**\nAs a facial expression classification expert, I analyze the specific Action Units (AUs) and muscle movements presented:\n\n1. **Eyebrows and Forehead:** The most distinctive feature is the position of the eyebrows. They are raised (indicating alertness or surprise) but also drawn together and knitted in the center (furrowed). This combination of raised and furrowed brows (creating horizontal wrinkles on the forehead and vertical wrinkles between the eyes) is a primary marker for **fear** (specifically Action Units 1, 2, and 4). In contrast, *surprise* typically involves raised eyebrows that are more curved and not knitted together, while *sadness* involves the inner corners being raised but the outer corners lower, without the wide-eyed alertness seen here.\n2. **Eyes:** The eyes are wide open with the upper eyelids raised and the lower eyelids appearing tense. This \"wide-eyed\" look is common to both fear and surprise, but combined with the brow position, it signals a threat response.\n3. **Mouth:** The mouth is slightly open with the lips parted. While an open mouth is also a sign of *surprise* (jaw drop), in this image, the lips appear slightly tense rather than fully relaxed, which leans more towards the tension found in fear.\n\nTherefore, while the expression shares features with *surprise* (wide eyes, open mouth), the furrowed, raised eyebrows clearly distinguish it as **fear**, representing a state of alarm, apprehension, or shock.\n\n**Sorted Order (Mental Check for context):**\n1. **fear** (Highest similarity due to raised/knitted brows and wide eyes)\n2. **surprise** (High similarity due to wide eyes and open mouth, but lacks the specific brow knitting)\n3. **sadness** (Some brow similarity, but eyes are too wide/alert)\n4. **anger** (Brows are raised, not lowered)\n5. **disgust** (No nose wrinkling or upper lip raise)\n6. **contempt** (No asymmetrical mouth movement)\n7. **happiness** (No smiling or cheek raising)", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Happiness**\n\nThe facial expression shows clear indicators of happiness: the corners of the mouth are turned upward in a genuine smile, the teeth are visible, and the cheeks are raised, creating subtle crinkling around the eyes (characteristic of a Duchenne smile). The overall relaxed and open expression, combined with the bright, engaged eyes, strongly conveys a positive, joyful emotion.", "source": "Claude"}, {"text": "Emotion: Happiness\nBased on a facial expression analysis, the category with the highest similarity to the input image is:\n\n**happiness**\n\n**Explanation:**\nAs an expert in facial expression classification, I identify \"happiness\" based on several key physiological markers present in the image:\n\n* **Mouth and Lips:** The most prominent feature is the engagement of the *zygomaticus major* muscle, which pulls the corners of the mouth upward and backward. The lips are parted, naturally exposing the upper teeth in a broad smile. \n* **Cheeks and Facial Folds:** The upward pull of the mouth raises the cheeks significantly. This action deepens the nasolabial folds (the smile lines running from the edges of the nose down to the corners of the mouth).\n* **Eyes and Brows:** The eyes are open and alert, but lack the tension or widened sclera (white of the eye) associated with fear or intense surprise. The eyebrows are naturally positioned and relaxed. There is also a subtle contraction of the *orbicularis oculi* muscle (evident by the slight lifting of the lower eyelids and mild crinkling at the outer corners of the eyes), which is a strong indicator of a genuine, positive affective state rather than just a social smile.\n\nNone of the specific facial muscle contractions associated with the other categories (such as the narrowed brows of anger, the wrinkled nose of disgust, or the downward pull of sadness) are present here.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person shows a clear slight smile with relaxed facial muscles and open, engaged eyes, which most closely matches a happy expression.", "source": "GPT"}, {"text": "Emotion: Happiness\nBased onthe facial features present in the image, here is the classification:\n\n**happiness**\n\n**Explanation:**\nThe primary indicator for this classification is the presence of a smile. The corners of the mouth are turned upwards, the teeth are slightly visible, and the cheeks are raised. Furthermore, there are subtle creases around the edges of the eyes (often referred to as \"crow's feet\"), which are characteristic of a genuine, positive emotional expression. These features strongly align with the category of happiness and do not match the typical indicators for anger, sadness, fear, disgust, surprise, or contempt.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Sadness**\n\nThe facial expression most closely resembles **sadness**. \n\nKey observations supporting this classification:\n- **Eyes**: The eyes appear glossy/watery and slightly squinted, with the inner corners of the eyebrows drawn slightly upward \u2014 a hallmark indicator of sadness.\n- **Eyebrows**: The inner brows are raised and pulled together, creating subtle furrows, which is characteristic of grief or sorrow rather than anger (where brows would be lowered and pulled together).\n- **Mouth**: The corners of the mouth are turned downward, and the lips appear slightly parted in a way that suggests distress or emotional strain.\n- **Overall tension**: There is a visible tightness in the cheeks and around the mouth, consistent with someone trying to suppress crying or emotional pain.\n\nWhile there are minor traces of other emotions (a hint of anger due to the furrowed brow, or fear from the tense facial muscles), the dominant cues \u2014 particularly the raised inner brows and downturned mouth \u2014 point most strongly to **sadness**.", "source": "Claude"}, {"text": "Emotion: Sadness\n**sadness**\n\n**Explanation:**\nBased on facial expression analysis, the most prominent emotion displayed is sadness. The defining features leading to this classification include:\n* **Eyebrows:** The inner corners of the eyebrows are raised and drawn together, which is a classic, difficult-to-fake involuntary muscle movement associated with distress, grief, or sorrow.\n* **Eyes:** The eyes appear heavy and squinted, lacking the crinkling mostly associated with genuine joy (Duchenne marker). \n* **Mouth:** While the lips are parted and upper teeth are visible, the corners of the mouth are not pulled upward into a smile. Instead, the lower face shows tension that resembles a grimace\u2014often seen when someone is experiencing emotional pain or on the verge of crying. The overall lack of upward facial muscle engagement strongly rules out happiness in favor of sadness.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe expression appears most similar to sadness: the eyes are narrowed and strained, the brow is furrowed, and the mouth looks tense with a slight downward/strained shape, giving an overall distressed or sorrowful appearance.", "source": "GPT"}, {"text": "Emotion: Sadness\nBased on the visual evidencein the image, here is the analysis:\n\n**Classification:** sadness\n\n**Explanation:**\nThe facial expression exhibits several key markers associated with **sadness** and distress:\n1. **Eyebrows:** The eyebrows are strongly furrowed and drawn together, with the inner corners appearing slightly raised and pulled in (Action Units 1 and 4). This \"grief muscle\" activation is a primary indicator of sadness and emotional pain.\n2. **Eyes:** The eyes are narrowed and squinted, with tension around the eyelids (Action Unit 7). This \"lid tightener\" often accompanies intense sorrow, crying, or physical/mental suffering. The gaze appears weary and distressed.\n3. **Mouth and Chin:** The mouth is slightly open with teeth visible in a grimace, and the corners of the mouth appear tense and pulled down or back. The chin muscles appear bunched (Action Unit 17), which is a classic sign of sadness and the onset of crying (sobbing). While there is some nose wrinkling which can look like disgust, in this context, combined with the chin bunching and brow shape, it indicates a grimace of intense emotional pain or sobbing rather than revulsion.\n\nTherefore, the expression is most similar to **sadness**.", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Highest similarity: surprise**\n\nLooking at the facial expression, the key features I observe are:\n- Raised eyebrows, creating horizontal forehead tension\n- Widened eyes with visible sclera around the irises\n- A slightly open or slack mouth posture\n- An overall alert, reactive look on the face\n\nThese features\u2014particularly the raised brows combined with the wide-eyed gaze\u2014are the hallmark indicators of **surprise**. The expression lacks the smile lines of happiness, the downturned features of sadness, the furrowed brow of anger, the tension of fear, the nose wrinkling of disgust, or the asymmetrical lip raise of contempt.", "source": "Claude"}, {"text": "Emotion: Surprise\nsurprise\n\n**Explanation:**\nBased on the visual evidence, the facial expression aligns best with \"surprise\". This classification is supported by the following specific facial features:\n\n* **Eyes:** The eyes are visibly widened, with the upper eyelids strongly raised. This action exposes the white part of the eye (sclera) above the iris, which is a primary and classic indicator of a startled or surprised state.\n* **Eyebrows:** Both eyebrows are lifted and arched upward, further contributing to the wide-eyed appearance typical of surprise.\n\nWhile the mouth remains relatively neutral and closed, the dominant signals coming from the upper half of the face (the wide eyes and raised eyebrows) strongly point to surprise as the most accurate category among the options provided.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe expression shows widened eyes and slightly raised eyebrows, which are most consistent with surprise. The mouth is closed rather than open, so it appears to be a mild or restrained form of surprise.", "source": "GPT"}, {"text": "Emotion: Surprise\nBasedon the visual evidence in the image, here is the classification:\n\n**Highest Similarity Category:** surprise\n\n**Explanation:**\nThe facial expression is dominated by the upper face features which are classic indicators of **surprise**.\n1. **Eyes:** The eyes are widened significantly, with the upper eyelids raised, exposing more of the sclera (white of the eye). This indicates alertness or a startle response.\n2. **Eyebrows:** The eyebrows are raised high, creating horizontal wrinkles across the forehead. This arching and lifting of the brows is a primary feature of surprise.\n3. **Mouth:** While the mouth is closed and the lips are pressed together (which can sometimes indicate tension seen in fear or suppressed emotion), the overwhelming signal from the wide eyes and raised eyebrows aligns most strongly with the category of surprise (specifically a mild or suppressed surprise, or a \"wide-eyed\" look). The other categories like anger, sadness, or disgust require different brow and mouth configurations (e.g., lowered brows for anger, wrinkled nose for disgust) that are not present here. Fear is the second closest candidate due to the wide eyes, but the eyebrows appear more arched and raised (typical of surprise) rather than drawn together and lowered (typical of fear).", "source": "Qwen"}, ], }, "White Female": { "subjects": ["Subject 302", "Subject 304", "Subject 460"], "prompts": [ {"text": "Emotion: Anger\n**Anger**\n\nThe facial expression most closely resembles **anger**. \n\nKey observations supporting this classification:\n- **Eyebrows**: Slightly drawn down and together, creating subtle tension in the brow area\n- **Eyes**: Direct, intense gaze with a hardened look\n- **Mouth**: Lips are pressed firmly together in a tight, straight line \u2014 a hallmark of suppressed anger or displeasure\n- **Jaw**: Appears subtly tensed\n- **Overall demeanor**: Stern and confrontational rather than sad (no downturned mouth corners or drooping eyelids) or contemptuous (no asymmetrical lip raise)\n\nWhile there are minor traces that could suggest contempt, the symmetry of the tightened mouth and the overall facial tension align more strongly with anger.", "source": "Claude"}, {"text": "Emotion: Anger\nanger\n\n**Explanation:**\nAs an expert in facial expression analysis, scanning the distinct muscular movements (Action Units) of the face provided leads to this conclusion. The classification of \"anger\" is based on the following specific indicators:\n\n1. **The Eyes and Brow Area:** The subject exhibits a fixed, piercing stare. The lower eyelids show slight tension, and while the eyebrows are not severely furrowed, they are lowered and set firmly. This indicates focus and hostility, contrasting with the wide-open eyes of fear or surprise.\n2. **The Mouth:** This is the strongest indicator in the image. The lips are pressed tightly together, forming a firm, horizontal line with a slight downward pressure. This tightening of the lips (without rolling them inward) is a classic physiological response associated with suppressed or \"cold\" anger and tension.\n3. **Absence of Alternative Indicators:** The face lacks the bilateral upward lip pull (happiness), the wrinkled nose and raised upper lip (disgust), the distinct asymmetrical lip corner tightening (contempt), the raised inner eyebrows and downturned mouth (sadness), or the slack jaw and raised brows (surprise/fear). \n\nOverall, the combination of a hard stare and tightly compressed lips points directly to anger as the highest similarity match.", "source": "Gemini"}, {"text": "Emotion: Anger\nAnger\n\nThe expression shows slightly furrowed/lowered brows, a firm direct gaze, and pressed lips, which are most consistent with a mild anger or irritation expression among the provided categories.", "source": "GPT"}, {"text": "Emotion: Anger\nBasedon the facial features present in the image, the category with the highest similarity is **anger**.\n\n**Explanation:**\nThe classification is based on the following facial action units and cues:\n1. **Eyebrows:** The eyebrows are lowered and drawn together (furrowed), creating vertical lines between them. This is a primary indicator of anger (Action Unit 4: Brow Lowerer). It signals concentration, annoyance, or aggression.\n2. **Eyes:** The eyes appear narrowed and the gaze is intense and direct. The eyelids are slightly tensed, which often accompanies anger (Action Unit 7: Lid Tightener).\n3. **Mouth:** The lips are pressed together firmly in a straight line. This compressing of the lips (Action Unit 24: Lip Presser) often signifies suppressed emotion, determination, or holding back words, which is very common in expressions of anger or annoyance.\n\nWhile the expression is subtle and could be interpreted as annoyance or skepticism (which borders on contempt), the physical combination of the furrowed brow and pressed lips aligns most strongly with the physiological markers of **anger** in facial expression classification models. It lacks the nose wrinkling of disgust, the raised inner eyebrows of sadness, or the unilateral lip raise typical of contempt.", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Contempt**\n\nLooking at the facial expression, I observe:\n\n- **Eyes**: Neutral to slightly narrowed, with a steady, direct gaze \u2014 not wide (ruling out surprise or fear), not crinkled (ruling out happiness), and not drawn down (ruling out sadness).\n- **Eyebrows**: Relaxed and level, without the furrowing associated with anger or the raising associated with surprise/fear.\n- **Mouth**: The key indicator \u2014 the lips are closed with a subtle, asymmetrical tightening at one corner, characteristic of a unilateral lip raise. There is no smile (ruling out happiness), no frown (ruling out sadness/anger), and no wrinkled nose (ruling out disgust).\n\nThe slight one-sided lip tension combined with the cool, composed gaze is the hallmark expression of **contempt**, which is why it ranks highest in similarity among the given categories.", "source": "Claude"}, {"text": "Emotion: Contempt\n**Contempt**\n\n**Explanation:**\nAs a facial expression classification expert, evaluating this image requires looking closely at micro-expressions and muscle activations (Action Units) based on the Facial Action Coding System (FACS), especially since a standard \"Neutral\" category is not provided in your list. \n\nHere is the breakdown of why **contempt** is the highest similarity match among the given options:\n\n1. **Absence of High-Arousal/Negative Features:** The upper half of the face is entirely at rest. The eyebrows are relatively flat and relaxed (ruling out anger, fear, sadness, and surprise). The eyes are slightly relaxed but not widened (ruling out fear and surprise), and there is no wrinkling around the nose (ruling out disgust). \n2. **Lack of Genuine Happiness:** While a posed, resting face can sometimes mimic a faint smile, there is no activation of the *orbicularis oculi* muscles (the muscles that cause \"crow's feet\" wrinkling around the eyes), which is required for genuine happiness.\n3. **The Deciding Feature (Asymmetry):** The defining characteristic of contempt is that it is the only unilateral (one-sided) expression among the universal basic emotions. If you examine the mouth closely, it is not perfectly symmetrical. The corner of the lips on the right side of the image (the subject's left) is very subtly tighter and fractionally higher than the other side. This faint, unilateral lip corner tightening (Action Unit 14 in FACS) is the universal marker for contempt. \n\nBecause a \"Neutral\" baseline is not an option, this microscopic asymmetric tightening makes contempt the closest anatomical match among the provided categories.", "source": "Gemini"}, {"text": "Emotion: Contempt\ncontempt\n\nThe expression appears mostly neutral, but among the provided categories, it most closely resembles contempt due to the composed, unsmiling face, firm closed lips, and slightly skeptical/intense gaze.", "source": "GPT"}, {"text": "Emotion: Contempt\nBased on the visual features of the face, the category with the highest similarity is **contempt**.\n\n**Explanation:**\nThe facial expression is largely neutral but carries a serious, unamused quality typical of contempt when \"neutral\" is not an option. \n* **Mouth:** The lips are closed and slightly pressed together, with the corners not raised in a smile. While there isn't a distinct unilateral lip raise (the classic sign of contempt), the tightness and lack of movement suggest a withholding of positive emotion or a sense of superiority/seriousness.\n* **Eyes:** The gaze is direct and intense. The eyes are open but have a heavy-lidded appearance (exacerbated by the makeup), which lacks the wide-eyed nature of surprise or fear, and lacks the crinkling of happiness. \n* **Overall demeanor:** The combination of a direct, unwavering stare and a completely unsmiling, slightly tense mouth gives off an air of confidence or mild disdain, which aligns closest with **contempt** among the given choices (often used in limited emotion sets to capture negative, low-arousal or unimpressed expressions that aren't clearly sad or angry). (Note: Many models might also classify this as *sadness* due to the slightly downturned mouth corners, or *anger* due to the intense stare and tightened lips, but *contempt* captures the serious, non-reactive nature best).", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe facial expression shows several key indicators of disgust:\n\n1. **Wrinkled/furrowed brow** \u2013 The eyebrows are drawn together with visible tension between them.\n2. **Raised upper lip and tightened mouth** \u2013 The lips are pursed and pulled downward at the corners, with the upper lip slightly raised, which is a hallmark of the disgust expression.\n3. **Nose crinkling** \u2013 There is subtle tension around the nose area, consistent with the \"nose wrinkle\" associated with disgust.\n4. **Narrowed eyes** \u2013 The eyes appear slightly squinted, adding to the aversive quality of the expression.\n\nWhile the expression shares some overlap with sadness (downturned mouth) and contempt (asymmetrical mouth tension), the combination of the wrinkled nose, raised upper lip, and tightened mouth most strongly aligns with **disgust**.", "source": "Claude"}, {"text": "Emotion: Disgust\n**disgust**\n\n**Explanation:**\nBased on facial action coding principles, the expression in the image strongly aligns with the criteria for \"disgust.\" The classification is supported by the following distinct facial muscle movements:\n* **Nose Wrinkle:** The most prominent indicator is the distinct wrinkling along the bridge and sides of the nose.\n* **Brow Furrow:** The eyebrows are pulled down and slightly together.\n* **Narrowed Eyes:** The cheeks are raised, pushing up and causing the eyes to narrow/squint.\n* **Mouth Position:** The upper lip is slightly raised and tense, while the lips are pressed together in a way that suggests an involuntary rejection or aversion to an unpleasant stimulus. \n\nThese combined features are the universal morphological markers for disgust, distinguishing it clearly from the other provided categories.", "source": "Gemini"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe expression shows a wrinkled/raised nose area, tightened eyes, furrowed brows, and a slightly curled/downturned mouth, which are typical cues associated with disgust.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the facial features present in the image, the category with the highest similarity is **disgust**.\n\n**Explanation:**\nThe primary indicators for this classification are the distinct movements of the mid-face.\n* **Nose Wrinkling:** The most prominent feature is the scrunching or wrinkling of the nose (activation of the *levator labii superioris alaeque nasi* muscle). This is the universal hallmark of disgust, representing a reaction to something offensive or unpleasant (often originally related to bad smells).\n* **Eye Narrowing:** The eyes are squinted and narrowed, which typically accompanies the nose wrinkling to protect the eyes from the offending stimulus.\n* **Lip Movement:** The upper lip is raised, and the mouth is pursed or slightly downturned, signaling aversion or distaste.\n\nWhile there are elements of furrowed brows (which can appear in anger) and a downturned mouth (sadness), the specific combination of the scrunched nose and raised upper lip strongly points to disgust as the dominant emotion.\n\n**Sorted Order (for internal reference, though only the top is presented as requested):**\n1. **Disgust** (Highest similarity)\n2. Contempt\n3. Anger\n4. Sadness\n5. Fear\n6. Surprise\n7. Happiness", "source": "Qwen"}, {"text": "Emotion: Fear\n**Highest similarity: fear**\n\nThe facial expression shows classic hallmarks of fear:\n\n- **Widely opened eyes** with visible sclera above and below the iris, indicating heightened alertness and threat perception\n- **Raised and drawn-together eyebrows**, creating tension in the forehead \u2014 a key distinguishing marker of fear (as opposed to surprise, where brows are raised but not pulled together)\n- **Horizontally stretched mouth, opened wide**, showing the lower teeth \u2014 consistent with a scream or gasp of terror\n- **Tensed facial muscles**, particularly around the eyes and neck, suggesting a stress response\n- **Visible strain and wrinkles** around the eyes and forehead, reflecting intense emotional distress\n\nWhile *surprise* shares the wide eyes and open mouth, surprise typically features a more rounded (O-shaped) mouth and relaxed, arched brows without the pulled-together tension seen here. The overall combination of horizontal mouth stretch, drawn brows, and muscular tension clearly points to **fear** rather than surprise or any other emotion listed.", "source": "Claude"}, {"text": "Emotion: Fear\n**fear**\n\n**Explanation:**\nBased on facial action coding principles, the expression in the image strongly aligns with the markers for extreme fear (terror or panic). The key facial features contributing to this classification are:\n\n* **Eyes:** The eyes are widened dramatically, exposing a large amount of the sclera (the white of the eyes) above the iris. This is an evolutionary response to increase the field of vision in a threatening situation.\n* **Eyebrows and Forehead:** The eyebrows are raised and pulled together, resulting in deep, concentrated wrinkles in the center of the forehead. This differentiates it from pure \"surprise,\" where the brows are simply raised without being drawn together.\n* **Mouth:** The mouth is stretched wide open, but unlike the relaxed jaw drop of surprise, the lips are tightly stretched and drawn backward in a scream or gasp, indicating severe distress and tension.", "source": "Gemini"}, {"text": "Emotion: Fear\nfear\n\nThe facial expression shows wide-open eyes, raised brows, and a widely open mouth resembling a scream, which are strong indicators of fear.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the facial features shown in the image, the category with the highest similarity is:\n\n**Fear**\n\n**Explanation:**\nThe person in the image displays several classic signs of fear. Her eyes are wide open with the whites visible (scleral show), and her eyebrows are raised and pulled together, creating tension in the forehead. Additionally, her mouth is wide open, resembling a scream or gasp. These combined features strongly indicate a state of fear or extreme alarm.", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Happiness**\n\nThe facial expression in the image most closely matches **happiness**. \n\nKey indicators:\n- **Wide, genuine smile** with visible teeth, showing upturned corners of the mouth\n- **Raised cheeks**, which create a slight squint and crinkling around the eyes \u2014 a hallmark of a Duchenne (authentic) smile\n- **Relaxed forehead and brows**, with no signs of tension, sadness, or negative emotion\n- **Bright, engaged eyes** that convey warmth and joy\n\nThese features collectively rule out other categories: there is no downturned mouth (sadness), no furrowed brow (anger/fear), no nose wrinkling (disgust), no raised eyebrows or open jaw drop (surprise), and no one-sided smirk (contempt).\n\n**Highest similarity: happiness**", "source": "Claude"}, {"text": "Emotion: Happiness\n**Happiness**\n\n**Explanation:**\nBased on facial expression analysis, the subject exhibits classic, universally recognized physiological markers associated with happiness. The key indicators observed are:\n\n1. **Lower Face:** The corners of the mouth are drawn prominently upward and backward, exposing the teeth in a broad smile. This indicates the strong contraction of the *zygomatic major* muscle. \n2. **Upper Face/Cheeks:** The cheeks are raised, which creates a slight upward push and narrowing around the eyes. This secondary activation (involving the *orbicularis oculi* muscle) is a characteristic marker of a \"Duchenne smile\" or genuine enjoyment.\n\nThere are no visible muscle contractions associated with the other categories (such as furrowed brows, widened eyes, wrinkled nose, or asymmetrical lip tightening). Therefore, happiness is the only accurate classification.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person is smiling broadly with visible teeth and raised cheeks, which are strong indicators of a happy expression.", "source": "GPT"}, {"text": "Emotion: Happiness\nBased on the facial cuesin the image, here is the classification:\n\n**Highest Similarity:** happiness\n\n**Explanation:**\nThe individual in the image is displaying a clear and genuine smile, characterized by the upward turning of the mouth's corners, an open mouth showing teeth, and the involvement of the muscles around the eyes (often called a Duchenne smile). These are universal and definitive indicators of the happiness expression. Other categories such as sadness, anger, fear, disgust, or contempt describe negative emotions that are visually opposite to the positive display seen here. While surprise can sometimes involve an open mouth, it typically features raised eyebrows and a lack of a smile, making happiness by far the most accurate classification.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Sadness**\n\nThe facial expression most closely matches **sadness**. \n\nKey observations supporting this classification:\n- The eyes appear watery and glistening, suggesting tears\n- The eyebrows are slightly drawn together and raised in the inner corners, a classic indicator of sadness\n- The corners of the mouth are turned downward\n- The lower lip appears slightly pushed up (chin puckering), which is a hallmark of sadness or the effort to suppress crying\n- The overall facial tension and the reddened, puffy appearance around the eyes reinforce an emotional, distressed state\n\nWhile there could be slight overlap with other negative emotions, the combination of watery eyes, downturned mouth, and the characteristic inner-brow raise makes **sadness** the highest-similarity match among the provided categories.", "source": "Claude"}, {"text": "Emotion: Sadness\n**Sadness**\n\n**Explanation:**\nAs a facial expression classification expert, I have identified \"sadness\" as the category with the highest similarity based on specific facial muscle movements (Action Units):\n\n1. **Eyebrows:** The most prominent indicator is the inner corners of the eyebrows being drawn upwards and together. This specific movement is a classic marker of distress, grief, or sadness.\n2. **Eyes:** The upper eyelids are slightly drooping, and the eyes appear glassy or tearful, reflecting a lack of the muscle tension seen in alertness (fear/surprise) or aggression (anger). \n3. **Mouth and Chin:** The corners of the lips are angled slightly downward. Additionally, there is subtle tension in the chin (mentalis muscle) pushing the lower lip up into a slight pout, which frequently accompanies a sad or crying expression. \n\nThese combined features lack the distinct markers of the other categories (such as the raised cheeks in happiness, the wrinkled nose in disgust, or the widened eyes in fear) and definitively point to sadness.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe facial expression shows watery/red eyes, slightly raised inner eyebrows, and a downturned, tense mouth\u2014features most consistent with sadness.", "source": "GPT"}, {"text": "Emotion: Sadness\n**Sadness**\n\n**Explanation:**\nThe facial features in the image strongly indicate sadness. Key indicators include:\n* **Mouth:** The corners of the lips are slightly turned downward in a subdued manner.\n* **Eyes and Eyebrows:** The eyebrows are slightly furrowed and angled in a way that often signals distress. The eyes appear heavy or glassy, which is common in expressions of unhappiness or being on the verge of tears.\n* **Overall Affect:** The overall facial tension and lack of positive engagement rule out happiness or surprise, while the passive nature of the expression makes anger, contempt, or disgust unlikely. Fear typically involves wider eyes and raised eyebrows, which are not present here. Therefore, sadness is the most accurate classification.", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Surprise**\n\nThe facial expression most closely matches **surprise**. Key indicators include:\n\n- **Widely opened eyes** with raised upper eyelids, exposing a large portion of the sclera (white of the eye).\n- **Raised eyebrows**, creating horizontal forehead wrinkles.\n- **Dropped jaw** with the mouth open in an oval shape, a hallmark of a startled or astonished reaction.\n- **Overall tense yet unguarded facial muscles**, lacking the tightness typical of fear or the asymmetry of contempt.\n\nThese features collectively align strongly with the classic presentation of surprise rather than fear (which would include more tension in the brow and lips) or other emotions on the list.", "source": "Claude"}, {"text": "Emotion: Surprise\n**surprise**\n\n**Explanation:**\nBased on facial expression analysis, this image strongly exhibits the classic physiological markers (Action Units) associated with the emotion of surprise:\n\n1. **Eyebrows:** The eyebrows are raised high and curved upwards, which creates prominent, horizontal wrinkles across the forehead.\n2. **Eyes:** The eyes are widened significantly, exposing a large amount of the sclera (the white part of the eye) completely around the iris.\n3. **Mouth:** The jaw is dropped, causing the mouth to open widely with the lips parted in a relaxed manner, rather than being pulled tightly back as they might be in a fear response. \n\nThese combined facial muscle movements perfectly align with the typical profile for sudden astonishment or surprise.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe expression shows wide-open eyes, raised eyebrows, and an open mouth, which are strong indicators of surprise.", "source": "GPT"}, {"text": "Emotion: Surprise\n**surprise**\n\n**Explanation:**\nThe facial expression in the image displays the classic universal indicators of surprise. The eyebrows are raised high, causing horizontal furrows across the forehead. The eyes are wide open, revealing more of the sclera (whites of the eyes) than usual. Additionally, the jaw is dropped, leaving the mouth open in a relaxed 'O' shape. While fear can also present with an open mouth and widening eyes, the relaxed nature of the lower face and the specific arch of the eyebrows point definitively to surprise rather than fear or anger.", "source": "Qwen"}, ], }, "Older White Female": { "subjects": ["Subject 238"], "prompts": [ {"text": "Emotion: Anger\n**Highest similarity: anger**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image, several key features stand out:\n\n1. **Furrowed and lowered brow**: The eyebrows are drawn down and together, creating deep vertical wrinkles between them \u2014 a hallmark of anger.\n2. **Intense, glaring eyes**: The eyes are narrowed and focused, conveying hostility rather than fear or surprise.\n3. **Exposed clenched teeth**: The lips are pulled back tightly, revealing gritted teeth. While bared teeth can appear in disgust, the tension here is aggressive rather than repulsed.\n4. **Tightened facial muscles**: The cheeks and jaw show strong muscular tension, consistent with rage.\n5. **Nose**: There is some wrinkling, which could suggest disgust, but it appears secondary to the dominant brow and mouth configuration.\n\nComparing to the categories:\n- **Anger** \u2014 strongest match (furrowed brow + clenched teeth + glaring eyes).\n- Disgust \u2014 partial match (nose wrinkle), but lacks the raised upper lip characteristic of pure disgust.\n- Contempt \u2014 no asymmetrical lip corner.\n- Fear/Surprise \u2014 eyes are not widened; brows are not raised.\n- Sadness/Happiness \u2014 clearly not present.\n\n**Final answer: Anger**", "source": "Claude"}, {"text": "Emotion: Anger\n**Anger**\n\n**Explanation:**\nBased on a morphological analysis of the facial features, the expression heavily aligns with the universal markers for intense anger. \n\n* **Eyebrow/Forehead Region:** The eyebrows are pulled sharply downward and aggressively drawn together, creating deep vertical furrows between the brows.\n* **Eye Region:** The upper and lower eyelids are tense, creating a fixed, glaring appearance.\n* **Nasal Region:** There is pronounced wrinkling at the bridge of the nose. While this is often a prominent feature of disgust, in this context, it functions as part of a \"snarl,\" which is a primal display of aggression and rage.\n* **Lower Face/Mouth:** The jaws are visibly clenched, and the lips are actively highly retracted and tensed to expose the teeth. The squared-off, open-mouth posture with bared teeth is a classic, high-intensity indicator of anger. \n\nThe combination of extreme muscle tension across the entire face, the glaring eyes, and the bared-teeth snarl makes \"anger\" the category with the highest similarity.", "source": "Gemini"}, {"text": "Emotion: Anger\nAnger\n\nThe facial expression shows furrowed brows, narrowed eyes, a tense jaw, and bared/clenched teeth, which are most strongly associated with anger.", "source": "GPT"}, {"text": "Emotion: Anger\nBasedon the visual cues in the image, the facial expression with the highest similarity is **anger**.\n\n**Explanation:**\n* **Eyebrows:** The eyebrows are lowered and drawn together, creating deep vertical wrinkles between them. This tension in the forehead and glabella is a primary indicator of anger.\n* **Eyes:** The eyes are narrowed into an intense glare, showing contraction of the muscles surrounding the eyes.\n* **Mouth:** The lips are pulled back tightly, exposing the teeth in a snarl. This \"bare teeth\" display is a common aggressive signal associated with anger.\n* **Overall Tension:** The entire facial posture is tightly compressed and confrontational, lacking the relaxation or specific directional pulls seen in emotions like sadness, surprise, or happiness.", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Highest similarity: disgust**\n\n**Explanation:** The facial expression shows classic markers of disgust:\n\n- **Wrinkled/scrunched nose** \u2014 a hallmark indicator of disgust, caused by contraction of the levator labii superioris muscle.\n- **Raised upper lip**, exposing a tense mouth area.\n- **Narrowed, squinting eyes** with tightened lower eyelids, creating creases around the eyes.\n- **Lowered brows** pulled slightly together, adding to the aversive quality.\n- **Downturned corners of the mouth** combined with a puckered chin, suggesting rejection or revulsion.\n\nThese combined action units (particularly nose wrinkling and upper lip raising) are the definitive signals of **disgust** rather than anger (which would show more direct brow-lowering and glaring eyes) or contempt (which is typically unilateral, involving only one side of the mouth).", "source": "Claude"}, {"text": "Emotion: Disgust\n**Disgust**\n\n**Explanation:**\nBased on facial expression analysis, the prominent features in the image strongly align with the universal markers for disgust. \n\nSpecific indicators include:\n* **Wrinkled Nose:** The central and most defining feature of disgust is present here, characterized by the deep wrinkling across the bridge and sides of the nose.\n* **Raised Upper Lip:** The upper lip is pulled upward sharply. This action pushes up the cheeks and deepens the nasolabial folds (the lines running from the sides of the nose down to the corners of the mouth).\n* **Lowered Brows and Narrowed Eyes:** The eyebrows are drawn down and pushed together, causing the eyes to squint tightly. This overall facial contraction is a classic biological response mechanism designed to close off the senses (sight and smell) to an offensive or noxious stimulus.", "source": "Gemini"}, {"text": "Emotion: Disgust\n**Disgust**\n\nThe expression shows a wrinkled nose, tightened facial muscles, narrowed eyes, and a downturned/tensed mouth, which are most characteristic of **disgust**.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the visual cues in the image, the category with the highest similarity is **disgust**.\n\n**Explanation:**\nThe facial expression shows several key features characteristic of disgust:\n1. **Wrinkled Nose:** The skin around the bridge of the nose is crinkled.\n2. **Raised Upper Lip:** The upper lip is pulled up, which often reveals the teeth or gums.\n3. **Squinted Eyes:** The eyes are narrowed or partially closed, indicating a reaction to something unpleasant.\n4. ** downturned Mouth:** The shape of the mouth suggests a physical rejection or recoil.\n\nThese combined features strongly align with the universal facial expression for disgust.", "source": "Qwen"}, {"text": "Emotion: Fear\n**Fear**\n\nThe facial expression most closely matches **fear**. \n\nKey observations supporting this classification:\n- **Wide, tense eyes** with raised upper eyelids, exposing more of the sclera \u2014 a hallmark of fear\n- **Raised and drawn-together eyebrows**, creating tension in the forehead\n- **Horizontally stretched lips** pulled back, exposing the clenched teeth \u2014 characteristic of a fear grimace rather than a smile\n- **Overall facial tension**, particularly around the mouth and jaw, suggesting apprehension or dread rather than joy or anger\n\nWhile the exposed teeth might superficially resemble happiness, the absence of raised cheeks, crow's feet, or upturned mouth corners rules that out. The tension and eye widening distinguish it from disgust or contempt.\n\n**Highest similarity: Fear**", "source": "Claude"}, {"text": "Emotion: Fear\n**fear**\n\n**Explanation:**\nBased on the analysis of facial muscle movements, the expression exhibits the classic morphological features associated with fear. \n\n* **Eyes and Brows:** The most prominent indicators are in the upper face. The eyes are wide open, with the upper eyelids raised so high that the sclera (the white of the eye) is visible above the iris. Furthermore, the eyebrows are raised and drawn together, creating both horizontal wrinkles across the forehead and tension between the brows. This \"raised and knit\" brow distinguishes fear from pure surprise, where the brows are typically only raised and arched.\n* **Mouth and Lower Face:** The mouth is open, but rather than a relaxed jaw drop (as seen in surprise), the lips are tense and drawn horizontally backward, exposing the teeth. This tension in the lower half of the face is a key component of the fear response.", "source": "Gemini"}, {"text": "Emotion: Fear\nfear\n\nThe face shows wide, tense eyes with raised brows and a slightly open, strained mouth with exposed teeth, which are most consistent with a fearful or anxious expression.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the visual analysis of the facial features, here is the classification:\n\n**Fear**\n\n**Explanation:**\nThe facial expression exhibits several key indicators of fear (or high anxiety/alarm):\n1. **Eyes and Eyebrows:** The eyes are wide open and staring intensely, and the eyebrows are raised. This \"wide-eyed\" look is a primary signal of alertness to a threat or something shocking.\n2. **Mouth:** The mouth is slightly open with the teeth visible, but the lips are pulled back in a tense, horizontal grimace rather than dropping open (which would suggest surprise) or curving up (which would suggest happiness). This \"stretched mouth\" appearance is characteristic of fear.\n3. **Overall Tension:** The facial muscles appear tense, particularly around the mouth and eyes, suggesting distress or apprehension rather than a neutral or positive emotion like surprise or happiness.\n\nWhile there are elements of surprise (raised eyebrows, wide eyes), the tension in the mouth and the anxious quality of the stare point more strongly towards **fear**.\n\n**Sorted Order (High to Low Similarity):**\n1. **Fear** (Highest similarity)\n2. Surprise\n3. Disgust\n4. Sadness\n5. Anger\n6. Contempt\n7. Happiness", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Highest similarity: happiness**\n\nThe facial expression clearly displays happiness. Key indicators include:\n\n- **Mouth**: The corners of the lips are turned upward in a genuine smile, with the lips parted slightly to reveal a warm expression.\n- **Cheeks**: The cheeks are raised, which is a hallmark of an authentic (Duchenne) smile.\n- **Eyes**: There is slight crinkling around the eyes with the formation of subtle crow's feet, indicating the smile reaches the eyes\u2014another sign of true happiness.\n- **Overall demeanor**: The face appears relaxed, open, and friendly, with no tension in the brow or jaw that would suggest negative emotions.\n\nThere are no signs of sadness (no downturned mouth or drooping eyelids), anger (no furrowed brow or tightened lips), fear (no widened eyes or raised eyebrows), disgust (no wrinkled nose or raised upper lip), surprise (no dropped jaw or raised brows), or contempt (no asymmetrical lip corner).\n\n**Answer: happiness**", "source": "Claude"}, {"text": "Emotion: Happiness\nhappiness\n\nThe facial expression in the image is classified as happiness. This conclusion is based on several key facial muscle movements: \n- **Mouth:** The corners of the mouth are distinctly pulled upward and backward, forming a clear and pronounced smile. The lips are parted, revealing the teeth.\n- **Cheeks and Eyes:** The cheeks are elevated, which pushes up the skin under the eyes. This action creates visible wrinkles, commonly known as crow's feet, at the outer corners of the eyes. \n\nThe combination of the upwardly curved mouth and the engagement of the muscles around the eyes (a Duchenne smile) is the hallmark indicator of genuine happiness. There are no signs of muscle tension in the forehead or jaw that would suggest negative emotions like anger or fear, nor is there asymmetry that might suggest contempt.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person is smiling with upturned mouth corners and a relaxed, pleasant facial expression, which most closely matches happiness.", "source": "GPT"}, {"text": "Emotion: Happiness\nhappiness\n\n**Explanation:**\nThe person in the image is displaying a clear smile, with the corners of their mouth turned upwards. Additionally, there is crinkling around the eyes (often referred to as 'crow's feet'), which is a strong indicator of a genuine, positive emotional state. These facial cues are classic characteristics of happiness.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Sadness**\n\nThe facial expression in the image most closely resembles **sadness**. \n\nKey observations supporting this classification:\n- **Downcast gaze**: The eyes are looking downward, a hallmark indicator of sadness or introspection.\n- **Drooping eyelids**: The upper eyelids appear slightly heavy, contributing to a melancholic look.\n- **Downturned mouth**: The corners of the lips are subtly pulled down, with lips pressed together in a neutral-to-negative manner.\n- **Relaxed brow with slight inner tension**: There is no strong furrowing associated with anger, but a soft heaviness around the brow area consistent with sorrow.\n- **Overall subdued affect**: The face lacks the tension of anger/disgust, the widening of fear/surprise, or the upward pull of happiness.\n\nRanked similarity (high to low): sadness > contempt > disgust > anger > fear > surprise > happiness.\n\n**Highest similarity: Sadness.**", "source": "Claude"}, {"text": "Emotion: Sadness\nsadness\n\n**Explanation:**\nBased on the analysis of facial morphology and muscle positioning, the expression aligns overwhelmingly with sadness. Here is the breakdown of the specific features that lead to this classification:\n\n* **Eyes and Brows:** The subject's gaze is cast downward, which is a primary indicator of withdrawal associated with sadness. The upper eyelids are visibly drooping and relaxed, creating a heavy-eyed appearance rather than the wide or tense eyes seen in fear, surprise, or anger.\n* **Mouth:** The lips are closed without tension, and the extreme corners of the mouth are pulled slightly downward (lip corner depressor action). \n* **Overall Muscle Tone:** The face lacks the localized muscle tension required for other negative emotions (such as a wrinkled nose for disgust, a tightened jaw/pressed lips for anger, or a unilateral smirk for contempt). Instead, there is an overall loss of muscle tone, giving the face a deflated, sorrowful, and lethargic appearance characteristic of sadness.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe face shows a downward gaze, relaxed/drooping eyelids, and slightly downturned mouth corners, which are most consistent with a sad expression among the listed categories.", "source": "GPT"}, {"text": "Emotion: Sadness\nBased on my analysis of the facial features in the image, the category with the highest similarity is **sadness**.\n\n**Explanation:**\nThis conclusion is drawn from observing several key facial indicators:\n* **Gaze and Eyes:** The person's eyes are looking downward, and the eyelids appear heavy or slightly drooping. A downcast gaze is a universal non-verbal cue for sadness, withdrawal, or contemplation of negative feelings.\n* **Eyebrows:** There is a subtle tension and downward pull in the inner corners of the eyebrows, which often accompanies distress or grief.\n* **Mouth:** The lips are closed, and the corners of the mouth are distinctly turned downwards. This is a primary anatomical marker for sadness. \n\nWhen viewed together, these features\u2014the lowered gaze, the furrowed brow, and the inverted lip line\u2014combine to create a classic and clear presentation of sadness. There are no indicators of the other emotions listed (such as widened eyes for fear/surprise, raised lip corners for happiness, or asymmetrical mouth tightening for contempt).", "source": "Qwen"}, {"text": "Emotion: Surprise\nLooking at the facial expression in the image, I'll analyze the key features:\n\n- The mouth is slightly open with an asymmetrical pull, with one corner drawn back/down more than the other\n- The eyes appear neutral to slightly tense, without wide-opening (ruling out surprise/fear) or crinkling from smiling (ruling out happiness)\n- The brows are relatively neutral, not strongly furrowed (reducing likelihood of anger) or raised\n- There's no strong nose wrinkling or upper lip raise typical of disgust\n- The overall expression lacks the downturned mouth and drooping features of sadness\n\n**Highest similarity category: contempt**\n\n**Explanation:** The defining feature here is the **unilateral (one-sided) tightening and pulling of the mouth corner**, which is the hallmark action unit (AU14) of contempt in the Facial Action Coding System (FACS). Unlike disgust, there's no nose wrinkle or symmetrical upper lip raise. Unlike anger, the brows aren't strongly lowered or drawn together. Unlike happiness, the asymmetry and lack of eye engagement (no Duchenne marker) rule out a genuine smile. The subtle, asymmetrical mouth expression combined with a relatively composed upper face is most characteristic of **contempt**.", "source": "Claude"}, {"text": "Emotion: Surprise\n**Surprise**\n\n**Explanation:**\nBased on the principles of facial expression analysis (such as the Facial Action Coding System), the expression displayed in the image aligns most strongly with \"surprise.\" Here is the breakdown of the specific facial features that lead to this classification:\n\n1. **Eyebrows and Forehead:** The eyebrows are distinctly raised and curved upward. This action creates the prominent, horizontal wrinkles stretched across the forehead. \n2. **Eyes:** The upper eyelids are raised, and the eyes are wide open. The sclera (the white of the eyes) is highly visible above the iris, which is a classic indicator of a sudden, startling stimulus.\n3. **Mouth:** The jaw is slightly dropped, resulting in a parted mouth with the lips relaxed. There is no horizontal pulling back of the lips (which would indicate fear) or upward pulling of the lip corners (which would indicate happiness). \n\nThe combination of the raised brows, widened eyes, and the open, relaxed jaw is the universal micro-expression and macro-expression for surprise.", "source": "Gemini"}, {"text": "Emotion: Surprise\n**Surprise**\n\nThe face shows raised eyebrows, widened eyes, and a slightly open mouth, which are most consistent with a surprised expression.", "source": "GPT"}, {"text": "Emotion: Surprise\nBased on the analysis of the facial features in the image, here is the classification:\n\n**Highest Similarity Category:** **surprise**\n\n**Explanation:**\nTo determine the facial expression, I analyzed the key facial action units (movements of facial muscles):\n1. **Eyebrows:** The eyebrows are raised significantly, which is evidenced by the deep horizontal wrinkles across the forehead. This corresponds to the \"inner brow raiser\" and \"outer brow raiser\" actions typical of surprise.\n2. **Eyes:** The eyes are wide open and the upper eyelids appear raised, exposing more of the sclera (white of the eye) than in a neutral state. This is a strong indicator of surprise or fear.\n3. **Mouth:** The mouth is slightly open with the jaw dropped. In the context of the raised eyebrows and wide eyes, a dropped jaw is the primary differentiator between surprise and other emotions like fear (which often involves a tenser, stretched mouth).\n\nWhile the person is elderly and has natural wrinkles, the specific combination of **raised eyebrows**, **widened eyes**, and an **open mouth** aligns most closely with the facial expression of **surprise**. The other categories (happiness, sadness, anger, fear, disgust, contempt) do not fit as well because there is no distinct smiling (happiness), downturned mouth (sadness), furrowed brow (anger), nose wrinkling (disgust), or asymmetrical lip raise (contempt). Fear is the closest alternative, but the mouth is dropped rather than stretched in tension, making surprise the best fit.", "source": "Qwen"}, ], }, "White Male": { "subjects": ["Subject 104", "Subject 140", "Subject 165", "Subject 218", "Subject 253", "Subject 306"], "prompts": [ {"text": "Emotion: Anger\n**Highest similarity: anger**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image, the key features I observe are:\n\n1. **Lowered and drawn-together eyebrows** \u2014 creating a pronounced furrow between the brows, which is a hallmark of anger.\n2. **Intense, narrowed eyes** with a hard, focused stare \u2014 suggesting hostility or confrontation rather than fear or sadness.\n3. **Tightened lower face** with a firm, slightly tense mouth \u2014 lips pressed together rather than turned down (sadness) or pulled back (fear).\n4. **Overall muscular tension** in the forehead and jaw area, consistent with the AU4 (brow lowerer) and AU7 (lid tightener) action units typically associated with anger in FACS coding.\n\nThe expression lacks the raised inner brows of sadness, the widened eyes and stretched mouth of fear, the wrinkled nose of disgust, the unilateral lip corner of contempt, or any upward features of happiness/surprise.\n\n**Ranking from highest to lowest similarity:**\n**anger** > contempt > disgust > sadness > fear > surprise > happiness\n\n**Final answer: anger**", "source": "Claude"}, {"text": "Emotion: Anger\n**Anger**\n\n**Explanation:**\nBased on an analysis of the facial musculature and features, this expression highly aligns with the markers for anger:\n* **Eyebrows:** The brows are pulled downward and drawn closely together, creating prominent vertical wrinkles (furrows) between the eyes. This is a primary indicator of anger, concentration, or frustration.\n* **Eyes:** The eyes are slightly narrowed in an intense, fixed stare (a \"glare\"), lacking the widening seen in fear or surprise.\n* **Mouth and Jaw:** The jaw appears rigidly set, and there is visible tension in the muscles around the slightly parted lips. \n\nThe expression lacks the nose-wrinkling of disgust, the asymmetrical lip raise of contempt, or the inner-brow raise associated with sadness, making anger the most accurate classification.", "source": "Gemini"}, {"text": "Emotion: Anger\nanger\n\nThe expression shows strongly furrowed brows, narrowed eyes, and a tense mouth, which are typical indicators of anger or irritation.", "source": "GPT"}, {"text": "Emotion: Anger\nBased on theanalysis of the facial features, the category with the highest similarity is **anger**.\n\n**Explanation:**\nThe person's facial expression strongly exhibits the universal signs of anger. The most prominent feature is the furrowing of the eyebrows, which are lowered and drawn closely together, indicating tension and aggression. The eyes have an intense, hard stare, and the overall facial muscles appear rigid and tense. This combination of facial cues\u2014especially the deep frown and intense gaze\u2014is characteristic of anger rather than other emotions like sadness, fear, or disgust.", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Contempt**\n\nThe facial expression most closely resembles **contempt**. This is indicated by the subtle, asymmetrical tightening of one corner of the mouth (a slight one-sided smirk), combined with a slightly raised chin and a somewhat narrowed, sidelong gaze. These are the hallmark features of contempt \u2014 a unilateral lip movement paired with a look of superiority or dismissiveness.\n\nWhile there is a faint hint of a smile that could suggest happiness, the asymmetry and the cool, evaluative quality of the eyes push the expression away from genuine happiness and toward contempt.", "source": "Claude"}, {"text": "Emotion: Contempt\n**Contempt**\n\n**Explanation:**\nAs a facial expression classification expert, I evaluate expressions based on specific facial muscle movements (Action Units). The most distinguishing feature in this image is the asymmetry in the lower face. The subject's lips are pressed together, and only one corner of the mouth (the subject's left side) is tightened and slightly raised, creating a dimpled look or a \"smirk.\" \n\nIn the standardized study of facial expressions, a unilateral (one-sided) lip corner contraction is the universal, defining marker for contempt. Furthermore, the expression lacks the symmetrical lip raising and engagement of the orbital muscles around the eyes (crow's feet) that would indicate genuine happiness. The slightly tilted head and relaxed, sideways gaze further support an attitude of mild superiority or dismissal, which aligns perfectly with contempt.", "source": "Gemini"}, {"text": "Emotion: Contempt\n**Contempt**\n\nThe facial expression shows a slight, asymmetric smirk with one corner of the mouth raised and a somewhat narrowed, unimpressed gaze, which is most consistent with **contempt** among the listed categories.", "source": "GPT"}, {"text": "Emotion: Contempt\nBased on the analysis of the facial features, the category with the highest similarity is **contempt**.\n\n**Explanation:**\nThe most distinctive feature of this facial expression is the slight, asymmetrical raising of one corner of the mouth (specifically the viewer's right side), forming a smirk. In facial expression classification (such as Paul Ekman's FACS), this unilateral lip raise is the primary characteristic marker of **contempt**. \n\nWhile there is a slight upward turn of the lips that might superficially resemble happiness, genuine happiness typically presents with a symmetrical smile and crinkling around the eyes (Duchenne smile). This expression lacks that full symmetry and warmth. The lips are pressed together tightly, and the gaze is slightly averted, suggesting a feeling of skepticism, superiority, or mild disdain rather than joy, anger, or disgust (which would usually involve wrinkling of the nose). Therefore, contempt is the most accurate classification.", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Highest similarity: disgust**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image, I observe the following key features:\n\n- **Wrinkled/scrunched nose**: There are pronounced creases along the bridge and sides of the nose, which is a hallmark indicator of disgust.\n- **Raised upper lip**: The upper lip appears slightly curled upward, exposing tension in the mouth area \u2014 another classic disgust marker.\n- **Lowered brow and narrowed eyes**: The eyes are squinted with the brow pulled downward, contributing to a look of aversion rather than anger.\n- **Downward head tilt**: The head is angled downward, suggesting withdrawal from something unpleasant.\n\nThese features collectively align most strongly with the **disgust** expression, as defined by Ekman's basic emotion framework (nose wrinkling and upper lip raising being the primary action units, AU9 and AU10).\n\n**Ranking from highest to lowest similarity:**\ndisgust > anger > contempt > sadness > fear > surprise > happiness\n\n**Final answer: disgust**", "source": "Claude"}, {"text": "Emotion: Disgust\n**disgust**\n\n**Explanation:**\nAs a facial expression classification expert, I determine the highest similarity to be \"disgust\" based on the visible activation of specific facial muscles (Action Units). The most definitive marker present in this image is the pronounced wrinkling along the bridge and sides of the nose (Action Unit 9). Accompanying this, the upper lip is raised and drawn upward, while the lower lip is slightly pushed up and protruding. Furthermore, the eyebrows are lowered and drawn together, causing noticeable creasing between the brows and a narrowing of the eyes. These combined features\u2014specifically the \"nose wrinkle\" and \"upper lip raise\"\u2014are the textbook universal indicators of disgust.", "source": "Gemini"}, {"text": "Emotion: Disgust\ndisgust\n\nThe facial expression shows a wrinkled nose, tightened/raised upper lip, and compressed mouth with the eyes narrowed or closed, which are strong indicators of disgust.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the visual evidence, here is the classification:\n\n**Disgust**\n\n**Explanation:**\nThe facial expression displayed is a classic example of **disgust**. The key features leading to this conclusion are:\n1. **Wrinkled Nose:** The most prominent feature is the scrunching of the nose and the wrinkling of the nasal bridge. This is a universal sign of disgust (often associated with the *levator labii superioris alaeque nasi* muscle), typically mimicking the reaction to a bad smell.\n2. **Raised Upper Lip:** The upper lip is curled upwards, exposing the teeth slightly, which accompanies the nose wrinkling.\n3. **Narrowed Eyes:** The eyes are squinted and the brow is furrowed, indicating a rejection or avoidance response.\n\nWhile there is some brow furrowing that could suggest anger, the specific combination of the scrunched nose and raised lip distinguishes this primarily as disgust rather than anger or contempt.", "source": "Qwen"}, {"text": "Emotion: Fear\n**Highest similarity: fear**\n\n**Explanation:**\n\nLooking at the facial expression in the image, several key features stand out:\n\n1. **Eyes:** Widened with visible tension, and the gaze is directed sharply to the side, as if looking at something alarming or unexpected off-frame. This sideways, alert glance is characteristic of fear or apprehension.\n\n2. **Eyebrows:** Slightly raised and drawn together, creating subtle tension in the forehead \u2014 a hallmark of fear rather than pure surprise.\n\n3. **Mouth:** Slightly open with the lips tense and pulled back a bit, not smiling. This tense, parted mouth suggests anxiety or fright rather than joy or disgust.\n\n4. **Overall tension:** The combination of the sideways alert gaze, raised brows, and tense mouth conveys a sense of nervous anticipation or being startled by something threatening.\n\nWhile **surprise** shares some features (wide eyes, open mouth), surprise typically involves higher, more arched brows and a more rounded open mouth without the lateral tension seen here. The wary, sideways glance tips the expression toward **fear**.\n\n**Answer: fear**", "source": "Claude"}, {"text": "Emotion: Fear\n**fear**\n\n**Explanation:**\nBased on a facial expression analysis, the subject displays several key anatomical muscle movements (Action Units) that are hallmark indicators of fear:\n\n1. **Eyes:** The eyes are intensely widened, with the upper eyelids raised high enough to expose the sclera (the white of the eyes) above the iris. This involuntary widening is an evolutionary response to increase the field of vision in the presence of a perceived threat.\n2. **Eyebrows:** The eyebrows are raised but also appear slightly drawn together, creating tension in the forehead. This distinguishes the expression from pure surprise, where the eyebrows are typically raised high and curved without the inward contraction.\n3. **Mouth and Jaw:** The jaw is slightly dropped and the mouth is open, but the lips are stretched backward horizontally and tense, rather than being in a relaxed, open position. \n\nThe combination of tense, wide eyes, raised/drawn brows, and horizontally stretched lips strongly aligns with the categorization of fear or intense apprehension.", "source": "Gemini"}, {"text": "Emotion: Fear\nfear\n\nThe expression shows raised and tense eyebrows, widened eyes looking sideways, and a slightly parted, tense mouth\u2014features most consistent with concern or apprehension, which aligns best with fear.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the visual evidence of the facial features, here is the classification:\n\n**Highest Similarity Category:**\n**fear**\n\n**Explanation:**\nAs a facial expression classification expert, I analyzed the key Facial Action Units (AUs) present in the image:\n1. **Eyes (High Arousal):** The most dominant feature is the widening of the eyes (AU 5 - Upper Lid Raiser), with significant visibility of the sclera (whites of the eyes) around the iris. This indicates a state of high alertness or shock, which is a primary characteristic of **fear** and surprise.\n2. **Eyebrows (Distress/Tension):** The eyebrows are drawn together and furrowed (AU 4 - Brow Lowerer), creating tension in the glabella region (between the brows). While the forehead shows some wrinkling suggesting the brows are also slightly raised (AU 1/2), the combination of raised and drawn-together brows is the classic \"fear brow.\"\n3. **Mouth (Tension):** The mouth is slightly open with the lips appearing tense and stretched, rather than relaxed or smiling. This grimace is consistent with the tension found in **fear**.\n4. **Nose (Ambiguity):** There is a slight wrinkling of the nose (AU 9), which is typically associated with **disgust**. However, in intense expressions of fear or \"creeped out\" reactions, this muscle tension often co-occurs.\n\n**Ranking Logic (Internal Sorting):**\n* **Fear:** Fits the wide eyes, furrowed brows, and tense mouth best (High arousal, negative valence).\n* **Disgust:** Fits the nose wrinkle and the \"side-eye\" gaze (aversion), but the eyes are usually narrower in pure disgust.\n* **Surprise:** Fits the wide eyes and open mouth, but the eyebrows are usually raised high and curved, not furrowed/lowered in tension.\n* **Anger:** Fits the furrowed brows, but the eyes are usually narrowed/glaring, not wide.\n* **Contempt:** Fits the judgmental \"side-eye\" look, but lacks the characteristic unilateral lip raise (sneer).\n* **Sadness:** Lacks the drooping eyelids and mouth corners.\n* **Happiness:** Clearly not present.\n\nTherefore, **fear** is the category with the highest similarity due to the combination of wide, alert eyes and tense, furrowed brows.", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Happiness**\n\nThe facial expression most closely matches **happiness**. \n\nKey indicators:\n- **Mouth**: A wide, genuine smile with the corners of the lips pulled upward and outward, revealing the upper teeth.\n- **Cheeks**: Raised and rounded, which is characteristic of an authentic smile.\n- **Eyes**: Slightly narrowed with crinkling at the outer corners (suggestive of a Duchenne smile, indicating genuine enjoyment).\n- **Brows**: Relaxed and neutral, with no tension or furrowing.\n\nThere are no signs of negative emotions such as sadness (no downturned lips), anger (no furrowed brow), fear (no widened eyes), disgust (no nose wrinkling), surprise (no raised brows or open mouth), or contempt (no asymmetrical lip raise). The overall expression is symmetrical, warm, and open \u2014 clearly conveying happiness.", "source": "Claude"}, {"text": "Emotion: Happiness\n**happiness**\n\n**Explanation:** \nAs an expert in facial expression classification, analyzing the micro and macro muscle movements in this image reveals the classic markers of a genuine \"Duchenne\" smile, which is universally associated with happiness. \n\nSpecifically, two key facial action units are engaged:\n1. **The Zygomaticus Major (Mouth):** The corners of the lips are symmetrically drawn backward and upward, exposing the upper teeth in away that indicates joy rather than tension.\n2. **The Orbicularis Oculi (Eyes/Cheeks):** The cheeks are elevated, which pushes up the lower eyelids, causing the eyes to narrow slightly and creating characteristic wrinkles (\"crow's feet\") at the outer corners of the eyes. \n\nThere are no muscular signs of brow furrowing (anger/sadness/fear), asymmetric lip tightening (contempt), nose wrinkling (disgust), or widened eyes (surprise). Therefore, happiness is the definitive classification.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person is smiling with raised cheeks and relaxed eyes, which strongly indicates a happy expression.", "source": "GPT"}, {"text": "Emotion: Happiness\nHappiness**Explanation:** \nThe facial expression in the image is characterized by a wide, open-mouthed smile that clearly reveals the teeth. Additionally, the cheeks are raised, and there are subtle creases around the eyes, all of which are distinct markers of happiness or joy. None of the other categories (such as anger, sadness, or fear) fit the relaxed and positive facial features shown here.", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Highest similarity: sadness**\n\nThe facial expression in the image most closely matches **sadness**. Key indicators supporting this classification:\n\n1. **Tears visible on the cheeks** \u2014 the most prominent and defining cue, strongly associated with sadness.\n2. **Downturned corners of the mouth** \u2014 the lips are pressed together with a slight downward pull, a classic marker of sorrow.\n3. **Drooping upper eyelids and a subtle inner-brow raise** \u2014 the eyes appear heavy and slightly downcast, consistent with grief or emotional distress.\n4. **Overall slack facial muscle tone** in the cheeks and jaw, lacking the tension seen in anger or the wide-open features of surprise/fear.\n\nWhile some traces of contempt or subdued anger could be argued from the tight lips, the presence of tears and the softened, downward-oriented features make **sadness** the clearest match.", "source": "Claude"}, {"text": "Emotion: Sadness\nsadness\n\n**Explanation:**\nAs a facial expression classification expert, I have determined the highest similarity is to sadness based on the following specific visual indicators present in the image:\n\n* **The Eyes and Tears:** The most defining and immediate indicators are the visible tear tracks running down the cheeks, combined with watery, heavily glazed, and reddened eyes. \n* **The Eyebrows and Forehead:** The inner corners of the eyebrows are drawn slightly up and together. This specific muscle movement creates a distinct pattern of horizontal wrinkles in the center of the forehead, which is a primary, involuntary micro-expression associated with grief, emotional pain, and crying.\n* **The Eyelids:** The upper eyelids appear heavy and slightly lowered, creating a lack of focus often seen in expressions of sorrow.\n* **The Mouth:** The lips are kept together in a subdued manner, with a very slight downturn at the commissures (corners of the mouth). The jaw shows no aggressive tension (which would indicate anger) or extreme stretching (which would indicate fear or surprise). \n\nThe combination of the inner brow raise, heavy eyelids, downturned mouth corners, and active crying places this expression firmly and exclusively into the sadness category.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe facial expression shows visible tears, slightly downturned lips, and a subdued gaze, which are most consistent with sadness.", "source": "GPT"}, {"text": "Emotion: Sadness\n**sadness**\n\n**Explanation:**\nThe most prominent and defining feature in this facial expression is the presence of tears (tear tracks) running down the cheeks. Additionally, the mouth is closed in a slightly downturned or tightly held position, and the overall muscle tension in the face is relaxed but heavy, rather than active or aggressive. These visual cues\u2014specifically the visible crying and the solemn facial posture\u2014are universally recognized indicators of sorrow, grief, or profound emotion, which fall directly under the category of **sadness**. There are no signs of smiling (happiness), widened eyes or raised brows (surprise/fear), or furrowed brows with clenched jaws (anger).", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Highest similarity: surprise**\n\n**Explanation:**\nLooking at the facial expression, the key features I observe are:\n- The eyes appear widened behind the glasses\n- The mouth is open in a rounded shape (forming an \"O\"-like configuration)\n- The eyebrows appear slightly raised\n- The overall facial tension suggests a reactive, startled state\n\nThese features\u2014particularly the open, rounded mouth combined with widened eyes and raised brows\u2014are the classic hallmarks of **surprise**. \n\nWhile there could be a secondary hint of fear (which shares the widened eyes and open mouth), the expression lacks the horizontal mouth stretching and pulled-back lip corners typically associated with fear. The mouth shape here is more circular/vertical, which aligns more strongly with surprise.\n\n**Top match: Surprise**", "source": "Claude"}, {"text": "Emotion: Surprise\n**surprise**\n\n**Explanation:**\nBased on facial expression analysis, the subject's face exhibits the primary markers associated with the emotion of surprise. \n\n* **Eyes:** The upper eyelids are significantly raised, widening the eyes and exposing the sclera (the white part of the eye) above the iris. \n* **Eyebrows:** The eyebrows are raised upward.\n* **Mouth:** The jaw is dropped open, parting the lips in a relaxed manner without the lateral stretching or tension typically seen in fear or anger. \n\nThe combination of widened eyes, raised brows, and an openly dropped jaw with low facial tension strongly categorizes this expression as surprise.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe person\u2019s eyes appear widened and the mouth is slightly open/rounded, which are common cues associated with a surprised expression.", "source": "GPT"}, {"text": "Emotion: Surprise\nBased on the visual evidence in the image, here is the classification:\n\n**Highest Similarity Category:** Surprise\n\n**Explanation:**\nThe facial expression exhibits the classic indicators of surprise.\n1. **Eyes and Eyebrows:** The most prominent feature is the widening of the eyes and the raising of the eyebrows. This \"wide-eyed\" look is a primary signal of surprise or shock, indicating that the person is taking in unexpected information.\n2. **Mouth:** The mouth is slightly open with the teeth visible, suggesting a gasp or a jaw-drop reaction, which typically accompanies surprise.\n3. **Overall Tension:** While there is some intensity, the face lacks the furrowed brow of anger, the curled lip of disgust, or the downturned mouth of sadness. It aligns most closely with a startled or amazed reaction.\n\n**Sorting of categories (for internal reference):**\n1. **Surprise** (Highest similarity: wide eyes, raised brows, open mouth)\n2. **Fear** (Secondary similarity: wide eyes can indicate fear, but the mouth shape is less tense/stretched than typical fear)\n3. **Anger** (Low similarity: lacks furrowed brows)\n4. **Disgust** (Low similarity: lacks nose wrinkling)\n5. **Happiness** (Low similarity: no smile)\n6. **Sadness** (Low similarity: no drooping features)\n7. **Contempt** (Low similarity: no asymmetrical lip raise)", "source": "Qwen"}, ], }, "Older White Male": { "subjects": ["Subject 210"], "prompts": [ {"text": "Emotion: Anger\n**Anger**\n\nThe facial expression most closely matches **anger**. Key indicators include:\n\n- **Furrowed, lowered brow**: The eyebrows are drawn down and together, creating deep vertical creases between them (glabellar lines), a hallmark of anger.\n- **Tense, narrowed eyes**: The eyes appear hardened with a fixed, intense gaze.\n- **Tightly pressed lips**: The mouth is closed firmly with the corners pulled slightly downward, and the lower lip is pushed up, suggesting suppressed hostility or displeasure.\n- **Tightened jaw and cheek muscles**: Visible tension along the jawline reinforces the impression of controlled aggression.\n\nWhile there is a slight overlap with **disgust** (due to the tightened mouth) and **contempt**, the symmetrical lip compression and strongly furrowed brow point more decisively to anger rather than the asymmetrical lip-corner tightening typical of contempt or the nose-wrinkling typical of disgust.\n\n**Highest similarity: Anger**", "source": "Claude"}, {"text": "Emotion: Anger\n**anger**\n\n**Explanation:**\nAs an expert in facial expression classification, analyzing the specific facial muscle movements (Action Units) in this image clearly points to anger as the primary emotion. \n\nThe classification is based on the following key facial features:\n* **Eyebrow Region:** The eyebrows are heavily pulled down and drawn together, creating distinct, deep vertical wrinkles (corrugator muscle contraction) between the brows. This is a classic indicator of a glaring or hostile expression.\n* **Eye Region:** The eyes are narrowed, and the area around them is tense. The lowering of the brow creates a harsh, intense focus characteristic of anger.\n* **Mouth and Jaw:** The lips are pressed tightly together in a firm, tense, and elongated line. There is no relaxation in the lower face, and the jaw appears rigidly set, which denotes suppressed or overt frustration and aggression, distinguishing it from the downward pull of sadness or the raised upper lip of disgust. \n\nThese combined features\u2014the lowered, contracted brows, narrowed eyes, and tightened lips\u2014are the universal morphological markers for anger.", "source": "Gemini"}, {"text": "Emotion: Anger\nanger\n\nThe expression shows a furrowed brow, narrowed eyes, and tightly pressed lips, which are strong indicators of anger or irritation.", "source": "GPT"}, {"text": "Emotion: Anger\nAnger.\n\nThe person in the image exhibits classic indicators of anger: their brows are drawn together and furrowed, their eyes appear narrowed and somewhat glaring, and their lips are tightly pressed together in a firm, straight line. These combined facial muscle movements strongly convey a feeling of hostility, frustration, or displeasure, distinguishing it clearly from the other provided emotional categories.", "source": "Qwen"}, {"text": "Emotion: Contempt\n**Highest similarity: contempt**\n\n**Explanation:**\n\nLooking at the facial expression, I observe the following key features:\n\n- **Asymmetrical mouth**: One corner of the lips is slightly raised/tightened while the other side remains neutral \u2014 this unilateral lip corner tightening is the hallmark indicator of contempt.\n- **Eyes**: The gaze is direct and steady, with a slight narrowing, but not widened (ruling out surprise/fear) nor drooping (ruling out sadness).\n- **Brows**: Relaxed and neutral, without the lowering/furrowing seen in anger, nor the raising seen in fear or surprise.\n- **Overall demeanor**: The expression conveys a subtle, smug, or dismissive quality rather than overt positive emotion \u2014 the slight smirk lacks the symmetrical cheek raise (Duchenne marker) that would indicate genuine happiness.\n- **No nose wrinkling or upper lip raise**, which rules out disgust.\n\nThe defining diagnostic feature \u2014 the **one-sided lip corner tightening/raise** \u2014 is universally recognized (per Ekman's FACS) as the signature of **contempt**.\n\n**Answer: contempt**", "source": "Claude"}, {"text": "Emotion: Contempt\nBased on my analysis of the image, the category with the highest similarity is: **contempt**.\n\n**Explanation:**\nAs a facial expression expert, I look for specific muscle movements (Action Units) to classify emotions. Contempt is unique among the primary human emotions because it is the only one consistently characterized by an asymmetrical facial expression. \n\nIn this image, the upper half of the face (eyes, eyebrows, forehead) is relatively relaxed and neutral. He is not exhibiting the lowered and drawn-together brows of anger, nor the widened eyes of fear or surprise. The defining factor is in the mouth. The subject's lips are closed, but there is a distinct, unilateral (one-sided) tightening and slight raising of the lip corner on his left side (the right side from the viewer's perspective). This asymmetrical \"half-smile\" or tightened lip corner, unaccompanied by the genuine eye-crinkling muscle movement (orbicularis oculi) seen in happiness, is the classic, universal physiological marker for contempt.", "source": "Gemini"}, {"text": "Emotion: Contempt\n**Contempt**\n\nThe expression shows a tight, slightly asymmetrical mouth with a subtle smirk-like lift and narrowed eyes, which are common cues associated with contempt rather than happiness or anger.", "source": "GPT"}, {"text": "Emotion: Contempt\nBased on the visual cues in the image, here is the classification:\n\n**contempt**\n\n**Explanation:**\nThe facial expression exhibits several key features associated with contempt. The most prominent feature is the tightly pressed lips (lip compression), forming a thin, firm line. While the mouth corners might appear slightly upturned, the tension in the lips suggests a \"tight-lipped\" smile or a sneer rather than a genuine, relaxed smile of happiness. The gaze is steady and slightly narrowed, which often accompanies feelings of disdain or superiority. Although there are wrinkles around the eyes (crow's feet), in this context, combined with the pressed lips and the overall stern demeanor, they contribute to a squinting look of judgment ordismissal rather than the crinkling of genuine joy (Duchenne smile). The expression lacks the overt brow furrowing of anger or the nose wrinkling of disgust, fitting best with the subtle, often asymmetrical (though here fairly subtle) nature of contempt.", "source": "Qwen"}, {"text": "Emotion: Disgust\n**Highest similarity: disgust**\n\n**Explanation:**\n\nFocusing purely on the facial expression (ignoring identity), the key features observed are:\n\n- **Raised upper lip** with visible upper teeth, creating a sneer-like appearance\n- **Wrinkled/scrunched nose area**, with nasolabial folds deeply pronounced\n- **Lowered and tightened brow**, narrowing the eyes\n- **Tense cheeks** pulled upward\n- **Downturned mouth corners** combined with the lip curl\n\nThese features \u2014 particularly the nose wrinkling, raised upper lip, and tightened facial musculature \u2014 are the hallmark action units (AU9 + AU10) associated with the expression of **disgust** in the Facial Action Coding System (FACS).\n\nWhile there are secondary hints of **contempt** (asymmetrical lip tightening) and **anger** (lowered brow, tense jaw), the dominant nose-wrinkling and upper-lip curl most closely match **disgust**.", "source": "Claude"}, {"text": "Emotion: Disgust\n**disgust**\n\n**Explanation:**\nAs a facial expression classification expert, analyzing the specific morphological features (Facial Action Units) without regard to the subject's identity reveals key markers for disgust. \n\nThe primary indicators in this image include:\n* **Nasal/Upper Lip Pull:** There is tension around the center of the face. The upper lip is slightly raised, which subsequently deepens the nasolabial folds (the clear brackets or lines running from the outer edges of the nose down toward the mouth).\n* **Nose Wrinkling:** There is subtle tension/wrinkling visible along the sides and bridge of the nose, which is the hallmark trigger of a disgust expression.\n* **Eye & Brow Area:** The eyes are slightly narrowed (squinted) and the eyebrows are brought down and slightly together. In the context of disgust, this is a natural physiological defense mechanism to shield the eyes from perceived offensive stimuli. \n* **Lower Face:** The mouth is open with tension in the chin boss and lower lip, lacking the horizontal stretch of fear or the distinct asymmetrical corner raise of contempt. \n\nThese combined muscular movements strongly align with universally recognized markers for disgust.", "source": "Gemini"}, {"text": "Emotion: Disgust\n**Highest similarity: Disgust**\n\nThe facial expression shows a tightened, slightly raised upper lip and a wrinkled/tense nose area, with narrowed eyes and an overall tense look. These cues are most consistent with **disgust** rather than happiness, sadness, fear, or surprise.", "source": "GPT"}, {"text": "Emotion: Disgust\nBased on the facial features shown in the image, the category with the highest similarity is: **disgust**.\n\n**Explanation:** As a facial expression expert, I observe the following key features:\n* **Nose and Upper Lip:** There is a distinct wrinkling of the nose (nasal root) and a slight raising of the upper lip (snarl), which are classic physiological markers of disgust (often representing a reaction to something unpalatable).\n* **Chin and Mouth:** The chin is visibly tensed and bunched up (mentalis muscle activity), and the lips are pulled back slightly into a tight grimace, revealing the teeth. This combination of facial tension around the mouth and chin indicates a strong aversive reaction.\n* **Eyes/Brows:** The eyes are narrowed and the brows are slightly tensed/furrowed, reinforcing a negative, skeptical, or distasteful evaluation rather than fear, sadness, or happiness.\n\nWhile there is some asymmetry that could hint at contempt, the bilateral muscle engagement (especially the nose wrinkle and chin bunching) makes **disgust** the most accurate classification among the provided options.", "source": "Qwen"}, {"text": "Emotion: Fear\n**Highest similarity: fear**\n\n**Explanation:**\n\nAnalyzing the facial expression in the image:\n\n- **Eyes:** Widely opened with visible sclera around the irises, giving an intense, alarmed stare. This is a hallmark indicator of fear.\n- **Eyebrows:** Slightly raised and drawn together, which is characteristic of fear rather than pure surprise.\n- **Mouth:** Closed with tension in the lips, and the jaw appears slightly tight. In surprise, the mouth typically drops open, whereas here it remains closed \u2014 suggesting apprehension rather than astonishment.\n- **Overall tension:** The face shows a frozen, vigilant quality, consistent with a fearful reaction to something perceived as threatening.\n\nWhile **surprise** would be the second closest match (due to the wide eyes), the tense mouth and drawn brows tip the classification toward **fear**.", "source": "Claude"}, {"text": "Emotion: Fear\n**fear**\n\n**Explanation:**\nBased on a facial expression analysis, the distinct features present in the image most closely align with the universal markers for fear:\n\n* **The Eyes:** The most prominent indicator is the wide-open eyes with the sclera (the white of the eye) clearly visible above the iris. This \"deer in the headlights\" gaze is a classic biological response to fear, meant to widen the field of vision to assess threats.\n* **The Mouth:** Unlike surprise, where the jaw drops and the mouth relaxes open, the mouth here is closed, tense, and drawn horizontally tight. This lip tightening indicates stress and apprehension.\n* **Overall Tension:** The face lacks the relaxed, arched brow of surprise or the lowered, furrowed brow of anger. Instead, a stiff, rigid (\"frozen\") tension is held across the facial muscles, which corresponds strongly with a fearful or profoundly alarmed state.", "source": "Gemini"}, {"text": "Emotion: Fear\n**Fear**\n\nThe expression shows widened eyes, slightly raised brows, and a tense, closed mouth, which most closely aligns with a fearful or apprehensive facial expression.", "source": "GPT"}, {"text": "Emotion: Fear\nBased on the analysis of the facial features, here is the classification:\n\n**Fear**\n\n**Explanation:**\nWhile the expression is subtle, the most prominent feature is the widening of the eyes, with the upper eyelids raised and significant sclera (white of the eye) visible. In the Facial Action Coding System (FACS), this combination of raised eyebrows and widened eyes (specifically the upper lid raiser) is a primary indicator of **fear** or **surprise**. \n\nSince the mouth is closed and the lips appear pressed together or slightly tense (rather than dropped open in an \"O\" shape which would indicate surprise), and there is a sense of alertness in the gaze, **fear** is the category with the highest similarity. \n\nIf we were to sort the categories by similarity, the order would likely be:\n1. **Fear** (Wide eyes, raised brows, tense mouth)\n2. **Surprise** (Wide eyes, raised brows, but mouth is closed)\n3. **Sadness** (The gaze is somber, but the eyes are too wide/alert for classic sadness which usually involves drooping eyelids)\n4. **Contempt** (Neutral mouth, but lacks asymmetry)\n5. **Anger** (Brows are not sufficiently furrowed downwards)\n6. **Disgust** (No nose wrinkling)\n7. **Happiness** (No smile)", "source": "Qwen"}, {"text": "Emotion: Happiness\n**Highest similarity: happiness**\n\nThe facial expression clearly displays happiness. Key indicators include:\n\n- **Upturned mouth corners** forming a genuine smile with visible teeth\n- **Raised cheeks** that push upward, creating fullness in the mid-face\n- **Crow's feet wrinkles** radiating from the outer corners of the eyes\n- **Narrowed/crinkled eyes** caused by the cheek elevation \u2014 a hallmark of a Duchenne (authentic) smile\n- **Relaxed forehead and brow**, with no tension suggesting negative emotion\n\nThe combination of the genuine eye crinkling and the broad, open smile strongly aligns with happiness rather than any other category. There are no signs of sadness (no downturned mouth or drooping eyelids), anger (no brow furrowing), fear (no widened eyes), disgust (no nose wrinkling or upper lip raise), surprise (no raised brows or dropped jaw), or contempt (no asymmetrical lip corner tightening).", "source": "Claude"}, {"text": "Emotion: Happiness\n**happiness**\n\n**Explanation:**\nBased on facial expression analysis, the subject displays the classic physiological markers of happiness (specifically, a Duchenne smile). \n\n* **Mouth:** The corners of the mouth are distinctly pulled upward and backward, parting the lips to reveal the teeth. \n* **Lower Face:** There is a pronounced deepening of the nasolabial folds (the lines extending from the side of the nose downwards to the corners of the mouth) caused by the lifting of the facial muscles.\n* **Cheeks and Eyes:** The cheeks are visibly raised. This upward movement narrows the eyes and creates slight wrinkling at the outer corners (crow's feet). The engagement of the muscle around the eye (*orbicularis oculi*) combined with the smiling mouth is the strongest indicator of genuine happiness. \n* **Absence of other emotional markers:** The brow is relaxed without the furrowing seen in anger or sadness, and the eyes are not widened as they would be in fear or surprise.", "source": "Gemini"}, {"text": "Emotion: Happiness\nhappiness\n\nThe person shows a gentle smile with slightly raised cheeks and relaxed eyes, which are most consistent with a happy or pleasant expression.", "source": "GPT"}, {"text": "Emotion: Happiness\nhappiness\n\n**Explanation:**\nThe facial expression in the image clearly displays a smile. The corners of the mouth are turned upwards, revealing teeth, and there are visible crinkles around the eyes (often associated with a genuine smile). These features are classic indicators of a positive, happy emotional state, making \"happiness\" the most accurate classification among the provided options. There are no signs of furrowed brows (anger/sadness), wide eyes (fear/surprise), or a wrinkled nose (disgust).", "source": "Qwen"}, {"text": "Emotion: Sadness\n**Highest similarity: sadness**\n\nLooking at the facial expression in the image, I observe the following key features:\n\n- **Eyes**: The upper eyelids appear slightly drooped, and the outer corners of the eyes turn downward. There is no widening (which would suggest surprise or fear) or tightening (which would suggest anger).\n- **Eyebrows**: The inner corners appear slightly raised, a classic marker of sadness.\n- **Mouth**: The corners of the lips are turned downward, and the mouth is slightly parted in a neutral-to-downward position, without tension or asymmetry (ruling out contempt or disgust).\n- **Overall demeanor**: The face conveys a heavy, weary, and somber quality, without any signs of joy, shock, or aggression.\n\nThe combination of downturned lip corners, drooping eyelids, and slightly raised inner brows most strongly aligns with **sadness**.", "source": "Claude"}, {"text": "Emotion: Sadness\n**sadness**\n\n**Explanation:**\nBased on the facial features present in the image, the expression aligns most closely with sadness. The primary indicators are:\n* **Eyes:** The upper eyelids are drooping slightly, and the gaze appears somewhat unfocused and directed downward, which is a common psychological and physiological marker of sadness.\n* **Mouth:** The corners of the lips are subtly pulled downward. \n* **Overall Muscle Tone:** There is a general lack of tension in the facial muscles. Instead of active contraction (which would indicate anger or fear), the face appears somewhat deflated and relaxed in a downward direction, characteristic of a melancholic or sorrowful state.", "source": "Gemini"}, {"text": "Emotion: Sadness\nsadness\n\nThe face shows slightly drooping eyelids and a downturned, tense mouth, with an overall subdued expression. There are no strong signs of happiness, surprise, anger, fear, disgust, or contempt, so sadness is the closest match.", "source": "GPT"}, {"text": "Emotion: Sadness\nBased on the facial features in the image, the emotion is:\n\n**sadness**\n\n**Explanation:**\nThe person's facial expression displays several key indicators of sadness. The corners of the mouth are slightly downturned and not forming a smile. The eyes appear heavy and slightly drooping, with a weary look, and there is a slight upward pull of the inner eyebrows, which is a classic sign of sorrow or distress. The overall facial demeanor lacks the tension associated with anger or fear, and instead conveys a somber and melancholy state. Therefore, among the given categories, sadness is the most accurate classification.", "source": "Qwen"}, {"text": "Emotion: Surprise\n**Surprise**\n\nLooking at the facial expression in the image, the most prominent features are:\n\n- **Slightly raised eyebrows**, creating subtle horizontal lines on the forehead\n- **Widened eyes** behind the glasses, with visible attentiveness\n- **Parted lips/slightly open mouth**, as if mid-reaction or about to speak\n- A generally alert, reactive facial posture\n\nThese cues \u2014 particularly the open mouth combined with raised brows and engaged eyes \u2014 most closely align with **surprise**. There is no smiling (ruling out happiness), no downturned mouth or furrowed brow indicating sadness or anger, no nose wrinkling for disgust, no tension suggesting fear, and no asymmetrical lip raise indicating contempt.\n\n**Highest similarity category: Surprise**", "source": "Claude"}, {"text": "Emotion: Surprise\n**surprise**\n\n**Explanation:**\nBased on an analysis of the specific facial muscle movements, this expression aligns most closely with surprise. The key features leading to this classification are:\n\n1. **Mouth and Jaw:** The jaw is slightly dropped with the lips parted in a relaxed, open position. This lacks the tension or horizontal stretching seen in fear, or the downward pull seen in sadness.\n2. **Eyes and Eyebrows:** The eyes are slightly widened, and the eyebrows are gently raised. \n3. **Absence of Other Indicators:** There is no wrinkling of the nose (which would indicate disgust), no tightening of the lips or lowering of the brows (anger), and no asymmetrical lifting of a mouth corner (contempt). The general relaxation of the face combined with the parted lips and alert eyes points primarily to a mild state of surprise.", "source": "Gemini"}, {"text": "Emotion: Surprise\nsurprise\n\nThe person\u2019s mouth is slightly open in an \u201co\u201d shape, with the eyes appearing somewhat widened and the brows mildly raised, which are cues most consistent with surprise.", "source": "GPT"}, {"text": "Emotion: Surprise\nBased on the visual evidence in the image, here is the classification:\n\n**Highest Similarity Category:** **Surprise**\n\n**Explanation:**\nWhile the subject's expression is subtle and appears to be a neutral \"speaking\" face (likely mid-sentence), we must map it to the closest available category using facial features (Facial Action Coding System principles):\n\n1. **Eyebrows and Forehead:** The subject's eyebrows are slightly raised, indicated by the horizontal wrinkles visible on the forehead. The raising of the eyebrows (Action Unit 1 and 2) is a primary indicator of surprise.\n2. **Mouth:** The mouth is slightly open with the jaw dropped (Action Unit 26). An open mouth is a key characteristic of surprise (as well as fear, but the eyes lack the tension of fear).\n3. **Overall Configuration:** The combination of raised eyebrows and a dropped jaw is the canonical facial configuration for **surprise**.\n\nAlthough the intensity is low and the expression lacks the wide-eyed look of a strong surprise, the geometric features (raised brows + open mouth) align more closely with **surprise** than with happiness (no smile), anger (no furrowed glare or tight lips), or sadness (no distinctly downturned mouth corners or drooping eyelids, though the gaze is serious).\n\n**Sorted Order (Mental Ranking for context):**\n1. **Surprise** (Due to raised brows and open mouth).\n2. **Fear** (Similar features\u2014open mouth, brow movement\u2014but usually involves more tension and brow knitting).\n3. **Sadness** (The gaze is serious/somber, but the mouth shape doesn't fit well).\n4. **Anger** (The face is serious, but lacks the aggressive brow/lip tightening).\n5. **Contempt** (No unilateral lip raise).\n6. **Disgust** (No nose wrinkling).\n7. **Happiness** (No smiling).", "source": "Qwen"}, ], }, } # Derived flat lists used by Gradio dropdowns and random pickers SUBJECTS = [s for g in DEMOGRAPHIC_GROUPS.values() for s in g["subjects"]] # Reverse lookup: Subject name -> its group dict SUBJECT_TO_GROUP = {} for group in DEMOGRAPHIC_GROUPS.values(): for subj in group["subjects"]: SUBJECT_TO_GROUP[subj] = group # Directory to save participant data on the Hugging Face Space SAVE_DIR = "participant_data" os.makedirs(SAVE_DIR, exist_ok=True) from utils.viewer_utils import OrbitCamera from dataclasses import dataclass base_cam = OrbitCamera(512, 512, r=1.0, fovy=20, convention="opencv", save_path="dummy.json") # A virtual camera configured to look directly at the head straight on @dataclass class FrontalCamera: image_height: int = 512 image_width: int = 512 FoVx: float = float(np.radians(base_cam.fovx)) FoVy: float = float(np.radians(base_cam.fovy)) world_view_transform: torch.Tensor = torch.tensor(base_cam.world_view_transform).float().cuda().T full_proj_transform: torch.Tensor = torch.tensor(base_cam.full_proj_transform).float().cuda().T camera_center: torch.Tensor = torch.tensor(base_cam.pose[:3, 3]).cuda() class PipelineConfig: debug = False compute_cov3D_python = False convert_SHs_python = False pipeline = PipelineConfig() cam = FrontalCamera() bg_color = torch.tensor([1., 1., 1.]).cuda() # --- Model Loading --- loaded_models = {} from huggingface_hub import hf_hub_download def load_model(subject_name): if subject_name in loaded_models: return loaded_models[subject_name] print(f"Downloading {subject_name} from Dataset...") try: # Pulls the face straight from your 50GB dataset (passing the token because the dataset is Private!) hf_token = os.environ.get("HF_TOKEN") ply_path = hf_hub_download(repo_id="jhduofg/gaussianavatarsstudy", repo_type="dataset", filename=f"models/{subject_name}/point_cloud.ply", token=hf_token) npz_path = hf_hub_download(repo_id="jhduofg/gaussianavatarsstudy", repo_type="dataset", filename=f"models/{subject_name}/flame_param.npz", token=hf_token) model = FlameGaussianModel(3) model.load_ply(ply_path, has_target=False, disable_fid=[]) loaded_models[subject_name] = model return model except Exception as e: print("Failed to download model:", e) return None def get_random_subject(): return random.choice(SUBJECTS) def get_prompt_for_subject(subject_name): """Return (text, source) for a random prompt from the subject's demographic group.""" group = SUBJECT_TO_GROUP.get(subject_name) if group: p = random.choice(group["prompts"]) return p["text"], p["source"] return "Please recreate a facial expression using the sliders.", "Unknown" # Keep for practice tab — returns just the text def get_random_prompt(): all_prompts = [p for g in DEMOGRAPHIC_GROUPS.values() for p in g["prompts"]] return random.choice(all_prompts)["text"] def clean_prompt(text): """Strip markdown and formatting artefacts so the textbox shows clean plain text.""" import re as _re # Remove markdown bold/italic text = _re.sub(r'\*\*(.+?)\*\*', r'\1', text) text = _re.sub(r'\*(.+?)\*', r'\1', text) # Remove duplicate emotion word on line 2: # e.g. "Emotion: Happiness\nHappiness\n..." -> "Emotion: Happiness\n..." emotions = ['Anger', 'Contempt', 'Disgust', 'Fear', 'Happiness', 'Sadness', 'Surprise'] for em in emotions: text = _re.sub(r'(Emotion: ' + em + r')\n' + em + r'\s*\n', r'\1\n', text, flags=_re.IGNORECASE) # Remove any remaining bare numbered list artefacts at line start (e.g. "1. ", "2. ") text = _re.sub(r'^\d+\.\s+', '', text, flags=_re.MULTILINE) return text.strip() def randomize_sliders(): # Returns 11 values: [jaw_open_close, expr_0..expr_9] # Jaw: 0.0 = closed, up to 1.0 = wide open jaw = round(random.uniform(0.0, 0.5), 2) exprs = [round(random.uniform(-1.0, 1.0), 2) for _ in range(10)] return [jaw] + exprs def render_image(subject_name, jaw_val, *ui_expressions): # ui_expressions[0..9] are in UI order: [expr2..expr9, expr0, expr1] # Remap to mathematical tensor order [0..9] expressions = [ ui_expressions[8], ui_expressions[9], ui_expressions[0], ui_expressions[1], ui_expressions[2], ui_expressions[3], ui_expressions[4], ui_expressions[5], ui_expressions[6], ui_expressions[7] ] model = load_model(subject_name) if model is None: return Image.new("RGB", (512, 512), "black") flame_param = { 'expr': torch.zeros(1, model.n_expr), 'rotation': torch.zeros(1, 3), 'neck': torch.zeros(1, 3), 'jaw': torch.zeros(1, 3), 'eyes': torch.zeros(1, 6), 'translation': torch.zeros(1, 3), } for i, val in enumerate(expressions): flame_param['expr'][0, i] = val # Jaw open/close: x-rotation of the jaw joint flame_param['jaw'][0, 0] = float(jaw_val) model.update_mesh_by_param_dict(flame_param) with torch.no_grad(): out = render(cam, model, pipeline, bg_color) img = out["render"].permute(1, 2, 0).contiguous() img = torch.clip(img * 255, 0, 255).cpu().numpy().astype(np.uint8) return Image.fromarray(img) from huggingface_hub import HfApi import json import threading def upload_to_hf(img_filepath, json_filepath, prolific_id, file_prefix): try: api = HfApi(token=os.environ.get("HF_TOKEN")) dataset_repo = "jhduofg/gaussianavatarsstudy" api.upload_file( path_or_fileobj=img_filepath, path_in_repo=f"images/{prolific_id}/{file_prefix}.png", repo_id=dataset_repo, repo_type="dataset" ) api.upload_file( path_or_fileobj=json_filepath, path_in_repo=f"data/{prolific_id}/{file_prefix}.json", repo_id=dataset_repo, repo_type="dataset" ) except Exception as e: print(f"Background upload failed: {e}") def submit_and_save(prolific_id, subject_name, prompt, prompt_source, trial_count, attention_idx, jaw_val, *ui_expressions): if not prolific_id.strip(): return "ERROR: Please enter your Prolific ID before submitting.", prompt, prompt_source, subject_name, trial_count, attention_idx, gr.update(), *[gr.update() for _ in range(11)] # Remap back to strict mathematical order before logging expressions = [ ui_expressions[8], ui_expressions[9], ui_expressions[0], ui_expressions[1], ui_expressions[2], ui_expressions[3], ui_expressions[4], ui_expressions[5], ui_expressions[6], ui_expressions[7] ] timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") file_prefix = f"{prolific_id}_{timestamp}" img_filepath = os.path.join(SAVE_DIR, f"{file_prefix}.png") json_filepath = os.path.join(SAVE_DIR, f"{file_prefix}.json") # 1. Generate & Save the current image locally img = render_image(subject_name, jaw_val, *ui_expressions) img.save(img_filepath) # 2. Package all data securely into a JSON file # (JSON is much safer than CSV for 100+ concurrent remote users! No file lock clashes) participant_data = { "Prolific_ID": prolific_id, "Timestamp": timestamp, "Generated_Image": f"images/{prolific_id}/{file_prefix}.png", "Subject_Face": subject_name, "Prompt_Text": prompt, "Prompt_Source": prompt_source, "Jaw_Open_Close": float(jaw_val), "Expression_Muscle_1": expressions[0], "Expression_Muscle_2": expressions[1], "Expression_Muscle_3": expressions[2], "Expression_Muscle_4": expressions[3], "Expression_Muscle_5": expressions[4], "Expression_Muscle_6": expressions[5], "Expression_Muscle_7": expressions[6], "Expression_Muscle_8": expressions[7], "Expression_Muscle_9": expressions[8], "Expression_Muscle_10": expressions[9] } with open(json_filepath, 'w') as f: json.dump(participant_data, f, indent=4) # 3. Securely upload directly to your Hugging Face Dataset try: # It will use the HF_TOKEN environment variable in your Space's Secret settings api = HfApi(token=os.environ.get("HF_TOKEN")) dataset_repo = "jhduofg/gaussianavatarsstudy" # Upload the Image api.upload_file( path_or_fileobj=img_filepath, path_in_repo=f"images/{prolific_id}/{file_prefix}.png", repo_id=dataset_repo, repo_type="dataset" ) # Upload the structured JSON metadata api.upload_file( path_or_fileobj=json_filepath, path_in_repo=f"data/{prolific_id}/{file_prefix}.json", repo_id=dataset_repo, repo_type="dataset" ) status_msg = f"Success! Data securely uploaded to {dataset_repo} for {prolific_id}." except Exception as e: status_msg = f"Saved locally! (But failed to upload to dataset: Check HF_TOKEN error: {e})" trial_count += 1 MAX_TRIALS = 11 # 10 real + 1 attention check if trial_count >= MAX_TRIALS: completion_msg = 'You have now completed the task. To proceed, please enter the code 6789012345 in the box at the bottom of the page, then press "Next page".' # Put the completion message in the "Your Instruction" box (not just Status) -- # that's the prominent box participants have been reading all along, so # leaving the last trial's stale prompt there made it look like more work remained. return status_msg, completion_msg, prompt_source, subject_name, trial_count, attention_idx, gr.update(interactive=False), *[gr.update(interactive=False) for _ in range(11)] # Pick a new randomised face, then get a matched prompt from its demographic group new_subj = get_random_subject() if trial_count == attention_idx: new_prompt_text, new_prompt_source = "Please reset all sliders to 0 for this expression.", "Attention Check" else: new_prompt_text, new_prompt_source = get_prompt_for_subject(new_subj) new_sliders = randomize_sliders() return status_msg, clean_prompt(new_prompt_text), new_prompt_source, new_subj, trial_count, attention_idx, gr.update(), *[gr.update(value=s) for s in new_sliders] def init_prac_task(): subj = get_random_subject() vals = randomize_sliders() return [subj] + vals def init_main_task(): attention_idx = random.randint(0, 10) subj = get_random_subject() if attention_idx == 0: prompt, source = "Please reset all sliders to 0 for this expression.", "Attention Check" else: prompt, source = get_prompt_for_subject(subj) vals = randomize_sliders() return [subj, clean_prompt(prompt), source, attention_idx] + vals # --- Gradio UI Layout --- css = """ /* Force classic, persistently-visible scrollbars (instead of auto-hiding overlay scrollbars) for both the outer app document and the inner slider column, so participants can always see there is more content to scroll. */ html, body { overflow-y: scroll !important; scrollbar-width: auto; } html::-webkit-scrollbar, body::-webkit-scrollbar { width: 12px; } html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.35); border-radius: 6px; } html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.06); } .sticky-column { position: -webkit-sticky; position: sticky; top: 20px; height: max-content; min-width: 0; } .scrollable-column { max-height: 80vh; overflow-y: scroll !important; /* always-visible inner vertical scrollbar */ overflow-x: hidden !important; /* never scroll sideways */ flex-wrap: nowrap !important; display: flex !important; flex-direction: column !important; padding-right: 15px; min-width: 0; scrollbar-width: auto; } .scrollable-column::-webkit-scrollbar { width: 12px; } .scrollable-column::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, 0.35); border-radius: 6px; } .scrollable-column::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.06); } /* Root cause of the per-slider scrollbars: Gradio's rows default to flex-shrink:1, so when max-height is too small for all 11 rows, the flexbox compresses EVERY row to fit -- each row then becomes shorter than its own label/track/button, and Gradio's own per-row overflow:auto turns that into a tiny internal scrollbar. Forcing flex-shrink:0 on each direct child stops the compression: rows keep their natural height, the column's total content genuinely exceeds max-height, and only the column's own scrollbar (above) ever needs to scroll. Confirmed live via DOM inspection before applying here. */ .scrollable-column > * { flex-shrink: 0 !important; flex-basis: auto !important; } /* Belt-and-suspenders: nothing inside the column should scroll on its own. */ .scrollable-column * { overflow-y: visible !important; } /* Let slider rows shrink to fit the column instead of overflowing sideways. */ .scrollable-column .compact-row, .scrollable-column .compact-slider { min-width: 0 !important; overflow-x: hidden !important; } .scrollable-column .compact-slider input { min-width: 0 !important; } /* Compact styling for sliders and buttons to save space */ .compact-row { margin-bottom: -15px !important; flex-wrap: nowrap !important; } .compact-slider label { font-size: 0.72em !important; line-height: 1.15 !important; } .compact-btn { min-width: 52px !important; font-size: 0.75em !important; padding: 2px !important; margin-top: 25px !important; height: 30px !important; } """ with gr.Blocks(theme=gr.themes.Soft(), css=css) as interface: gr.Markdown("# Recreate facial expressions") # Expression slider labels (jaw handled separately above) — edit these labels here to update BOTH tabs at once expr_slider_names = [ "2: Mouth Tilt", "3: Lip Press & Jaw Opening", "4: Brow Height & Lip Tightness", "5: Forehead & Mouth Corner", "6: Eye Expansion & Chin Texture", "7: Alertness & Mouth Arch", "8: Bottom Eyelid & Lip Firming", "9: Full Eye & Lower Lip Tension", "10: Mouth Width & Pucker", "11: Nose & Upper Lip Scrunch" ] with gr.Tabs(): # ================================================================ # TAB 1: PRACTICE # ================================================================ with gr.TabItem("Practice - Try it out first"): gr.Markdown( "**Welcome!** Use this page to get familiar with the sliders before starting the real task.\n\n" "Please try all **11 sliders** by pulling them left and right to see how the face changes.\n\n" "You will have to scroll in the slider section to see all 11 sliders.\n\n" "You may reset any slider to neutral at any point by pressing \"Reset to 0\".\n\n" "When you have tried **all 11 sliders**, click the **Main Task** tab above to begin." ) with gr.Row(equal_height=False): # LEFT COLUMN: Image with gr.Column(scale=3, min_width=200, elem_classes="sticky-column"): prac_subject = gr.Dropdown( choices=SUBJECTS, label="Practice Face", value=get_random_subject(), interactive=False, visible=False ) prac_image = gr.Image(label="Live Render", type="pil", interactive=False) # RIGHT COLUMN: All Sliders with gr.Column(scale=2, min_width=200, elem_classes="scrollable-column"): prac_sliders = [] prac_reset_btns = [] prac_initial = randomize_sliders() # [jaw, expr0..expr9] # Jaw slider at top with gr.Row(elem_classes="compact-row"): prac_jaw = gr.Slider(minimum=0.0, maximum=0.5, value=prac_initial[0], step=0.01, label="1: Jaw Open/Close", scale=4, min_width=100, elem_classes="compact-slider") prac_jaw_btn = gr.Button("Reset to 0", scale=1, min_width=20, elem_classes="compact-btn") prac_sliders.append(prac_jaw) prac_reset_btns.append(prac_jaw_btn) for i, name in enumerate(expr_slider_names): with gr.Row(elem_classes="compact-row"): s = gr.Slider(minimum=-3.0, maximum=3.0, value=prac_initial[i + 1], step=0.1, label=name, scale=4, min_width=100, elem_classes="compact-slider") b = gr.Button("Reset to 0", scale=1, min_width=20, elem_classes="compact-btn") prac_sliders.append(s) prac_reset_btns.append(b) # Practice interactivity: render_image(subject, jaw, expr0..expr9) prac_render_inputs = [prac_subject] + prac_sliders for s in prac_sliders: s.release(fn=render_image, inputs=prac_render_inputs, outputs=prac_image) for s, b in zip(prac_sliders, prac_reset_btns): b.click(lambda: 0.0, outputs=s).then(fn=render_image, inputs=prac_render_inputs, outputs=prac_image) # Dynamically randomize practice tab on page load for each user interface.load(fn=init_prac_task, inputs=None, outputs=[prac_subject] + prac_sliders).then( fn=render_image, inputs=prac_render_inputs, outputs=prac_image ) # ================================================================ # TAB 2: MAIN TASK # ================================================================ with gr.TabItem("Main Task"): gr.Markdown( "Please recreate the facial expression described below using the sliders.\n\n" "Please enter your prolific ID in the box below.\n\n" "After you have completed all 11 images, you will receive a passcode to enter below. You can then press the \"next page\" button at the bottom of the page.\n\n" "Note: You will need to scroll down in the slider and text sections in order to see all sliders and longer texts." ) trial_state = gr.State(value=0) attention_idx_state = gr.State(value=-1) with gr.Row(): prolific_id = gr.Textbox(label="Enter your Prolific ID (Required)") with gr.Row(equal_height=False): # LEFT COLUMN: Image & Context with gr.Column(scale=3, min_width=200, elem_classes="sticky-column"): _initial_subject = get_random_subject() _initial_prompt_text, _initial_prompt_source = get_prompt_for_subject(_initial_subject) prompt_text = gr.Textbox(label="Your Instruction", value=clean_prompt(_initial_prompt_text), interactive=False) prompt_source_state = gr.State(value=_initial_prompt_source) subject_dropdown = gr.Dropdown(choices=SUBJECTS, label="Current Subject", value=_initial_subject, interactive=False, visible=False) output_image = gr.Image(label="Live Render", type="pil", interactive=False) save_button = gr.Button("Submit & Save Image", variant="primary") status_text = gr.Textbox(label="Status", interactive=False) # RIGHT COLUMN: All Sliders with gr.Column(scale=2, min_width=200, elem_classes="scrollable-column"): sliders = [] reset_btns = [] initial_vals = randomize_sliders() # [jaw, expr0..expr9] # Jaw slider at top with gr.Row(elem_classes="compact-row"): jaw_slider = gr.Slider(minimum=0.0, maximum=0.5, value=initial_vals[0], step=0.01, label="1: Jaw Open/Close", scale=4, min_width=100, elem_classes="compact-slider") jaw_btn = gr.Button("Reset to 0", scale=1, min_width=20, elem_classes="compact-btn") sliders.append(jaw_slider) reset_btns.append(jaw_btn) for i, name in enumerate(expr_slider_names): with gr.Row(elem_classes="compact-row"): slider = gr.Slider(minimum=-3.0, maximum=3.0, value=initial_vals[i + 1], step=0.1, label=name, scale=4, min_width=100, elem_classes="compact-slider") btn = gr.Button("Reset to 0", scale=1, min_width=20, elem_classes="compact-btn") sliders.append(slider) reset_btns.append(btn) # Main task interactivity: render_image(subject, jaw, expr0..expr9) render_inputs = [subject_dropdown] + sliders for slider in sliders: slider.release(fn=render_image, inputs=render_inputs, outputs=output_image) for slider, btn in zip(sliders, reset_btns): btn.click(lambda: 0.0, outputs=slider).then(fn=render_image, inputs=render_inputs, outputs=output_image) # Dynamically randomize main task on page load for each user interface.load(fn=init_main_task, inputs=None, outputs=[subject_dropdown, prompt_text, prompt_source_state, attention_idx_state] + sliders).then( fn=render_image, inputs=render_inputs, outputs=output_image ) # submit_and_save(prolific_id, subject, prompt, source, trial_count, attention_idx, jaw, expr0..expr9) save_button.click( fn=submit_and_save, inputs=[prolific_id, subject_dropdown, prompt_text, prompt_source_state, trial_state, attention_idx_state] + sliders, outputs=[status_text, prompt_text, prompt_source_state, subject_dropdown, trial_state, attention_idx_state, save_button] + sliders ).then( fn=render_image, inputs=render_inputs, outputs=output_image ) gr.HTML( '''