long-div / scripts /generate_tier1_batch05.py
ymyy307's picture
Upload folder using huggingface_hub
5b12ab1 verified
Raw History Blame Contribute Delete
21.5 kB
#!/usr/bin/env python3
"""Generate diverse Tier-1 cases 021-025."""
from __future__ import annotations
import json
from pathlib import Path
ROOT=Path(__file__).resolve().parents[1]; OUT=ROOT/"generated"/"tier1_batch05.json"
def p1(a,b="",c="Natural ambience; no music."):
x=f"integrated_multimodal_description:\n[Shot 1] {a}"; x+=f"\n\n{b}" if b else ""; return x+f"\n\noverall_soundscape:\n{c}"
def pn(ds,rs,a,b="",c="Natural ambience; no music."):
d="\n".join(f"<Subject {i}> is {v}." for i,v in enumerate(ds,1)); r="\n".join(f"<Subject {i}>: fully_preserved - Maintain identity." for i in rs)
x=f"subject_definitions:\n{d}\n{{{{REFERENCE_DEFINITIONS}}}}\n\nsummary:\n{{{{REFERENCE_SUMMARY}}}}\n\nretention_analysis:\n{r}\n{{{{REFERENCE_RETENTION}}}}\n\ndetailed_description:\n[Shot 1] {a}"; x+=f"\n\n{b}" if b else ""; return x+f"\n\noverall_soundscape:\n{c}"
def sh(n,v,s,f,d,p): return {"shot_no":n,"visible_characters":v,"speakers":s,"first_time_speakers":f,"dialogue":d,"prompt":p}
def dl(c,t): return {"character":c,"language":"English","text":t}
cases=[]
# 021 interfaith hall: n5 first1 gap1 reapp3.
c={"case_id":"diverse_t1_021","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":3,"absence_gap":1,"characters":{"<char1>":"a middle-aged Arab woman community volunteer with a charcoal headscarf, a plum tunic, and cream trousers","<char2>":"an older Black man with a silver beard, a rust cardigan, and dark brown trousers","<char3>":"a young white woman with short brown curls, a sage-green blouse, and navy trousers"}}
c["shots"]=[
sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","I will soften the lamp in the alcove; leave this curtain open for now.")],p1("A calm hall wide frames <Subject 1>, a middle-aged Arab woman with a charcoal headscarf, a plum tunic, and cream trousers, with <Subject 2>, an older Black man with a silver beard, a rust cardigan, and dark brown trousers, and <Subject 3>, a young white woman with short brown curls, a sage-green blouse, and navy trousers. Floor cushions sit loosely across an interfaith community hall. <Subject 1> draws one curtain halfway, studies the warm lamps, and walks into a side alcove.",'<Subject 1> (S1) says: <d>[English] I will soften the lamp in the alcove; leave this curtain open for now.</d>',"Curtain fabric, quiet steps, low lamp hum, and one reflective voice.")),
sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","The open gap makes the room feel connected without making it bright.")],pn(["an older Black man with a silver beard, a rust cardigan, and dark brown trousers","a young white woman with short brown curls, a sage-green blouse, and navy trousers"],[1,2],"A seated medium two-shot shows <Subject 1> settle onto one cushion while <Subject 2> remains standing near the curtain gap. <Subject 2> slowly draws the fabric a few inches wider, then sits across from him. The brighter lamp in the side alcove remains visible through layered cloth.",'<Subject 1> (S1) says: <d>[English] The open gap makes the room feel connected without making it bright.</d>',"Cushion fabric, a curtain rail, subdued building air, and one low voice.")),
sh(3,["<char1>","<char2>","<char3>"],[],[],[],pn(["the middle-aged Arab community volunteer with the same charcoal headscarf, plum tunic, and cream trousers","the older Black man with a silver beard, rust cardigan, and dark brown trousers","the young white woman with short brown curls, sage-green blouse, and navy trousers"],[1,2,3],"A silhouette framed through fabric reveals <Subject 1> returning through the newly opened curtain gap, clearly matching her earlier appearance. The lamp behind her is now softer. <Subject 2> rises from his cushion while <Subject 3> turns toward the warmer center of the hall.","","Soft steps, curtain fabric, a faint lamp switch, and quiet room tone; no speech or music.")),
sh(4,["<char3>","<char1>","<char2>"],["<char3>"],["<char3>"],[dl("<char3>","This light feels welcoming without drawing attention away from the gathering.")],pn(["the young white woman with short brown curls, sage-green blouse, and navy trousers","the middle-aged Arab woman with a charcoal headscarf, plum tunic, and cream trousers","the older Black man with a silver beard, rust cardigan, and dark brown trousers"],[1,2,3],"An eye-level close reaction shot catches <Subject 1> look from the softened alcove to <Subject 2> and <Subject 3>. All three walk across the open floor and choose places in a loose arc, leaving the central route clear. No ceremonial objects or tabletop materials dominate the scene.",'<Subject 1> (S1) says: <d>[English] This light feels welcoming without drawing attention away from the gathering.</d>',"Measured footfalls, cushions, low ventilation, and one conversational voice.")),
sh(5,["<char1>","<char2>","<char3>"],["<char1>"],[],[dl("<char1>","We can keep this arrangement and let people choose their own place.")],pn(["the middle-aged Arab woman with a charcoal headscarf, plum tunic, and cream trousers","the older Black man with a silver beard, rust cardigan, and dark brown trousers","the young white woman with short brown curls, sage-green blouse, and navy trousers"],[1,2,3],"A gentle lateral pan follows <Subject 1> as she walks once across the open center, then sits beside <Subject 2> and <Subject 3>. The curtain gap, warm lamp, and clear floor path remain visible together, and the group relaxes into quiet conversation.",'<Subject 1> (S1) says: <d>[English] We can keep this arrangement and let people choose their own place.</d>',"Soft fabric, warm room ambience, and one calm voice; no music."))]
cases.append(c)
# 022 mountain lodge: n4 first2 gap1 reapp4 final.
c={"case_id":"diverse_t1_022","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":4,"absence_gap":1,"characters":{"<char1>":"a young East Asian woman with long black hair, a cream cable-knit sweater, and dark jeans","<char2>":"an older white man lodge host with sparse white hair, a green wool vest, and a red plaid shirt","<char3>":"a middle-aged Black woman with shoulder-length twists, a navy fleece, and tan hiking trousers"}}
c["shots"]=[
sh(1,["<char1>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","The clouds are lifting, but the porch rail still looks windblown.")],p1("A warm-cool doorway wide frames <Subject 1>, a young East Asian woman with long black hair, a cream cable-knit sweater, and dark jeans, and <Subject 2>, a middle-aged Black woman with shoulder-length twists, a navy fleece, and tan hiking trousers, in a mountain lodge mudroom. Beyond the open inner door, a snowy porch sits under shifting cloud. The guests put on coats and pause before crossing the threshold.",'<Subject 1> (S1) says: <d>[English] The clouds are lifting, but the porch rail still looks windblown.</d>',"Fireplace crackle, faint porch wind, coat fabric, and one conversational voice.")),
sh(2,["<char2>","<char1>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","I will feel the wind outside; wait in the mudroom until I come around.")],pn(["an older white man lodge host with sparse white hair, a green wool vest, and a red plaid shirt","the young East Asian woman with long black hair, cream cable-knit sweater, and dark jeans","the middle-aged Black woman with shoulder-length twists, navy fleece, and tan hiking trousers"],[2,3],"A medium doorway composition reveals <Subject 1> entering from the common room and joining <Subject 2> and <Subject 3>. He pulls on a dark coat over his green vest, opens the porch door, and steps into the snow-bright air. The guests remain inside as the door closes behind him.",'<Subject 1> (S1) says: <d>[English] I will feel the wind outside; wait in the mudroom until I come around.</d>',"A porch door, winter air, boots on the threshold, and one steady voice.")),
sh(3,["<char3>","<char1>"],["<char3>"],["<char3>"],[dl("<char3>","The clearing is brighter now, even from this side of the glass.")],pn(["the middle-aged Black woman with shoulder-length twists, navy fleece, and tan hiking trousers","the young East Asian woman with long black hair, cream cable-knit sweater, and dark jeans"],[1,2],"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> wipe a small patch of fog from the porch window. Both watch a brighter opening spread through the clouds above the snowy clearing. They remain inside, and a hanging scarf barely moves near the closed door.",'<Subject 1> (S1) says: <d>[English] The clearing is brighter now, even from this side of the glass.</d>',"Muted wind through glass, fireplace crackle, fabric, and one quiet voice.")),
sh(4,["<char2>","<char3>","<char1>"],[],[],[],pn(["the older white lodge host with the same sparse white hair, green wool vest, and red plaid shirt beneath a dark coat","the middle-aged Black woman with shoulder-length twists, navy fleece, and tan hiking trousers","the young East Asian woman with long black hair, cream cable-knit sweater, and dark jeans"],[1,2,3],"A slow interior pan reaches the common-room side door as <Subject 1> returns through it, clearly matching his earlier appearance. He brushes a little snow from one sleeve and opens the way toward the porch. <Subject 2> and <Subject 3> stand and follow as the brighter cloud gap reaches the clearing.","","A side door closing, snow brushed from fabric, soft steps, fire, and reduced wind; no speech or music."))]
cases.append(c)
# 023 orchard: n5 first1 gap2 reapp4.
c={"case_id":"diverse_t1_023","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":4,"absence_gap":2,"characters":{"<char1>":"a middle-aged Latino man orchard grower with wavy salt-and-pepper hair, a faded blue work shirt, and brown boots","<char2>":"a young Black woman with a braided ponytail, a rust windbreaker, and gray trousers","<char3>":"an older white man with a close gray beard, a moss-green jacket, and tan trousers"}}
c["shots"]=[
sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","I will take the upper path and see whether the shaded row feels cooler.")],p1("A slope-emphasizing wide shows <Subject 1>, a middle-aged Latino man with wavy salt-and-pepper hair, a faded blue work shirt, and brown boots, walking between low orchard trees with <Subject 2>, a young Black woman with a braided ponytail, a rust windbreaker, and gray trousers, and <Subject 3>, an older white man with a close gray beard, a moss-green jacket, and tan trousers. <Subject 1> touches one leaf, points toward an upper path, and walks uphill beyond a stone rest wall.",'<Subject 1> (S1) says: <d>[English] I will take the upper path and see whether the shaded row feels cooler.</d>',"Leaves, birds, boots on dry soil, and one calm explanatory voice.")),
sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","The fruit on this side is warm, but the leaves still hold some morning moisture.")],pn(["a young Black woman with a braided ponytail, a rust windbreaker, and gray trousers","an older white man with a close gray beard, a moss-green jacket, and tan trousers"],[1,2],"A backlit leaf close-up widens to include <Subject 1> touching the edge of a leaf while <Subject 2> leans lightly against the stone wall. Neither picks fruit. <Subject 1> turns the leaf toward the light, then releases it as branches move above them.",'<Subject 1> (S1) says: <d>[English] The fruit on this side is warm, but the leaves still hold some morning moisture.</d>',"Leaves, insects, distant birds, and one observational voice.")),
sh(3,["<char3>","<char2>"],["<char3>"],["<char3>"],[dl("<char3>","The shadow reaches the wall first, so the upper row should change sooner.")],pn(["the older white man with a close gray beard, moss-green jacket, and tan trousers","the young Black woman with a braided ponytail, rust windbreaker, and gray trousers"],[1,2],"An over-the-shoulder medium shot from behind <Subject 2> shows <Subject 1> looking uphill as cloud shadow crosses the orchard slope. They step away from the wall and turn toward the shaded row, leaving all fruit on the branches.",'<Subject 1> (S1) says: <d>[English] The shadow reaches the wall first, so the upper row should change sooner.</d>',"Moving leaves, soft hillside wind, boots on soil, and one measured voice.")),
sh(4,["<char1>","<char2>","<char3>"],[],[],[],pn(["the middle-aged Latino orchard grower with the same wavy salt-and-pepper hair, faded blue work shirt, and brown boots","the young Black woman with a braided ponytail, rust windbreaker, and gray trousers","the older white man with a close gray beard, moss-green jacket, and tan trousers"],[1,2,3],"A descending follow reveals <Subject 1> returning along the stone wall, clearly matching his earlier appearance. He gestures toward the upper shaded path as <Subject 2> and <Subject 3> join him. Together they begin walking uphill beneath branches that now move in cooler air.","","Three sets of footsteps, leaves, birds, and hillside wind; no speech or music.")),
sh(5,["<char2>","<char1>","<char3>"],["<char1>"],[],[dl("<char1>","The shade is already cooler; notice the air rather than picking the fruit.")],pn(["the young Black woman with a braided ponytail, rust windbreaker, and gray trousers","the middle-aged Latino man with wavy salt-and-pepper hair, faded blue work shirt, and brown boots","the older white man with a close gray beard, moss-green jacket, and tan trousers"],[1,2,3],"A medium walking three-shot keeps <Subject 2>, <Subject 1>, and <Subject 3> beneath the darker upper canopy. <Subject 1> opens one hand toward the moving leaves, and the visitors pause to feel the cooler air before continuing along the row.",'<Subject 2> (S1) says: <d>[English] The shade is already cooler; notice the air rather than picking the fruit.</d>',"Cooler wind through leaves, subdued birds, walking steps, and one guiding voice."))]
cases.append(c)
# 024 aquarium: n5 first2 gap2 reapp5 final.
c={"case_id":"diverse_t1_024","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":5,"absence_gap":2,"characters":{"<char1>":"a middle-aged East Asian mother with a shoulder-length black bob, a camel coat, and dark blue trousers","<char2>":"a young Black man aquarium educator with short twists, a teal polo shirt, and charcoal trousers","<char3>":"a child with short dark curls, a yellow sweater, and green sneakers"}}
c["shots"]=[
sh(1,["<char1>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","Look above us; the ray is turning back toward the blue light.")],p1("A blue environmental wide in a public aquarium tunnel shows <Subject 1>, a middle-aged East Asian mother with a shoulder-length black bob, a camel coat, and dark blue trousers, walking beside <Subject 2>, a child with short dark curls, a yellow sweater, and green sneakers. Moving water light crosses their faces as a ray glides overhead. <Subject 1> slows and crouches to the child's height while both look upward.",'<Subject 1> (S1) says: <d>[English] Look above us; the ray is turning back toward the blue light.</d>',"Filtered water, quiet visitor steps, tank systems, and one gentle voice.")),
sh(2,["<char2>","<char1>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","I will check the side bay; stay in the tunnel until I signal.")],pn(["a young Black man aquarium educator with short twists, a teal polo shirt, and charcoal trousers","the middle-aged East Asian mother with a shoulder-length black bob, camel coat, and dark blue trousers","the child with short dark curls, yellow sweater, and green sneakers"],[2,3],"A medium three-shot reveals <Subject 1> joining <Subject 2> and <Subject 3> beneath the curved glass. He follows the ray with one open hand, then walks into a quiet side viewing bay while the family remains in the tunnel. Blue shadows continue moving across the floor.",'<Subject 1> (S1) says: <d>[English] I will check the side bay; stay in the tunnel until I signal.</d>',"Aquarium pumps, soft steps, water movement, and one clear voice.")),
sh(3,["<char3>","<char1>"],["<char3>"],["<char3>"],[dl("<char3>","Its shadow is wider when it passes over the curved glass.")],pn(["the child with short dark curls, yellow sweater, and green sneakers","the middle-aged East Asian woman with a shoulder-length black bob, camel coat, and dark blue trousers"],[1,2],"A child-height close reaction shot shows <Subject 1> lean back slightly as the ray's shadow crosses the tunnel. <Subject 2> remains crouched beside the child and follows the same movement overhead. Neither moves toward the side bay.",'<Subject 1> (S1) says: <d>[English] Its shadow is wider when it passes over the curved glass.</d>',"Water-filtered room tone, a soft child voice, distant steps, and tank systems.")),
sh(4,["<char1>","<char3>"],[],[],[],pn(["the middle-aged East Asian mother with a shoulder-length black bob, camel coat, and dark blue trousers","the child with short dark curls, yellow sweater, and green sneakers"],[1,2],"An upward over-the-shoulder view from behind <Subject 2> follows the ray as it turns beyond the tunnel's central seam. <Subject 1> stands and takes the child's hand loosely. They walk only a few paces toward the curved-glass junction and pause when blue light brightens the side bay.","","Soft family footsteps, aquarium pumps, water ambience, and subdued visitor noise; no speech or music.")),
sh(5,["<char2>","<char1>","<char3>"],[],[],[],pn(["the young Black aquarium educator with the same short twists, teal polo shirt, and charcoal trousers","the middle-aged East Asian woman with a shoulder-length black bob, camel coat, and dark blue trousers","the child with short dark curls, yellow sweater, and green sneakers"],[1,2,3],"A curved-glass reveal shows <Subject 1> becoming visible in the side bay, clearly matching his earlier appearance. He gives a small hand signal as the ray circles behind him. <Subject 2> and <Subject 3> walk closer, and all three stop at different heights within the broad blue composition.","","Quiet steps, water and pump ambience, a faint ray of bubbles, and no speech or music."))]
cases.append(c)
# 025 bicycle courtyard: n4 first1 gap1 reapp3.
c={"case_id":"diverse_t1_025","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":3,"absence_gap":1,"characters":{"<char1>":"a middle-aged Black woman with a close natural cut, a cobalt cycling jacket, and dark gray trousers","<char2>":"a young South Asian man with wavy black hair, a tan overshirt, and olive chinos"}}
c["shots"]=[
sh(1,["<char1>","<char2>"],["<char1>"],["<char1>"],[dl("<char1>","I will approach from the street side while you hold the gate halfway.")],p1("A courtyard wide shows <Subject 1>, a middle-aged Black woman with a close natural cut, a cobalt cycling jacket, and dark gray trousers, walking a bicycle beside <Subject 2>, a young South Asian man with wavy black hair, a tan overshirt, and olive chinos. Flowering vines move above a newly installed gate. <Subject 1> rolls the bicycle through the gate to the street side while <Subject 2> remains inside with one hand on the gate edge.",'<Subject 1> (S1) says: <d>[English] I will approach from the street side while you hold the gate halfway.</d>',"Bicycle tires, a gate hinge, leaves, and one practical voice.")),
sh(2,["<char2>"],["<char2>"],["<char2>"],[dl("<char2>","The hinge holds here without pulling the gate into the path.")],pn(["a young South Asian man with wavy black hair, a tan overshirt, and olive chinos"],[1],"A close view of posture rather than hardware shows <Subject 1> hold the gate halfway with a relaxed arm. He steps aside to preserve a broad bicycle route, then looks through the opening toward the covered passage. Vines cast moving shadows across the paving.",'<Subject 1> (S1) says: <d>[English] The hinge holds here without pulling the gate into the path.</d>',"A quiet hinge, leaves, distant street sound, and one conversational voice.")),
sh(3,["<char1>","<char2>"],[],[],[],pn(["the middle-aged Black woman with the same close natural cut, cobalt cycling jacket, and dark gray trousers","the young South Asian man with wavy black hair, tan overshirt, and olive chinos"],[1,2],"A wheel-level tracking shot follows <Subject 1> returning through the covered bicycle passage, clearly matching her earlier appearance. She walks the bicycle through the half-open gate while <Subject 2> holds his position and watches the rear wheel clear the edge. The gate remains steady and the movement stays slow.","","Rolling tires, a restrained hinge sound, footsteps, and courtyard birds; no speech or music.")),
sh(4,["<char2>","<char1>"],["<char1>"],[],[dl("<char1>","That gives enough room, and the gate closes gently once the bicycle is through.")],pn(["the young South Asian man with wavy black hair, tan overshirt, and olive chinos","the middle-aged Black woman with a close natural cut, cobalt cycling jacket, and dark gray trousers"],[1,2],"A framed view through the gate shows <Subject 1> release it while <Subject 2> stops the bicycle beneath the flowering vines. The gate swings inward and settles without striking the path. Both neighbors step back and look along the now-clear courtyard route.",'<Subject 2> (S1) says: <d>[English] That gives enough room, and the gate closes gently once the bicycle is through.</d>',"A gate settling, bicycle chain movement, leaves, and one satisfied voice."))]
cases.append(c)
OUT.write_text(json.dumps(cases,ensure_ascii=False,indent=2)+"\n",encoding="utf-8")