long-div / scripts /generate_tier1_batch06.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 026-030."""
from __future__ import annotations
import json
from pathlib import Path
R=Path(__file__).resolve().parents[1]; O=R/"generated"/"tier1_batch06.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}
cs=[]
# 026 mural underpass — n5 first2 gap1 reapp4.
c={"case_id":"diverse_t1_026","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":4,"absence_gap":1,"characters":{"<char1>":"an older Black woman with a short gray natural cut, a red raincoat, and dark trousers","<char2>":"a young South Asian woman mural artist with a thick side braid, a moss-green jacket, and loose black trousers","<char3>":"a middle-aged white man with brown hair, a navy overshirt, and tan chinos"}}
c["shots"]=[
sh(1,["<char1>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","The darker end makes the river shape feel deeper than it does near the exit.")],p1("A long-perspective wide inside a pedestrian underpass follows <Subject 1>, an older Black woman with a short gray natural cut, a red raincoat, and dark trousers, and <Subject 2>, a middle-aged white man with brown hair, a navy overshirt, and tan chinos, walking beside a large community mural. They slow near its shadowed river image, step backward to view the full wall, and turn toward the brighter ramp.",'<Subject 1> (S1) says: <d>[English] The darker end makes the river shape feel deeper than it does near the exit.</d>',"Distant street sound, measured footsteps, underpass resonance, and one reflective voice.")),
sh(2,["<char2>","<char1>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","I will look from the bright entrance; keep walking toward the center image.")],pn(["a young South Asian woman mural artist with a thick side braid, a moss-green jacket, and loose black trousers","the older Black woman with a short gray natural cut, red raincoat, and dark trousers","the middle-aged white man with brown hair, navy overshirt, and tan chinos"],[2,3],"A medium three-shot reveals <Subject 1> joining <Subject 2> and <Subject 3> beside the mural's center image. She walks backward for two careful steps to compare the painted forms, then continues up the exterior ramp while the residents remain inside the underpass.",'<Subject 1> (S1) says: <d>[English] I will look from the bright entrance; keep walking toward the center image.</d>',"Footsteps with soft echo, traffic beyond the ramp, clothing movement, and one clear voice.")),
sh(3,["<char3>","<char1>"],["<char3>"],["<char3>"],[dl("<char3>","The figures become clearer when we stand farther from the wall.")],pn(["the middle-aged white man with brown hair, navy overshirt, and tan chinos","the older Black woman with a short gray natural cut, red raincoat, and dark trousers"],[1,2],"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> cross to the opposite side of the passage. Both residents stop at a broader viewing distance while calm pedestrians pass between them and the mural. Reflected daylight begins reaching the central painted figures.",'<Subject 1> (S1) says: <d>[English] The figures become clearer when we stand farther from the wall.</d>',"Passing shoes, underpass air, remote traffic, and one conversational voice.")),
sh(4,["<char2>","<char1>","<char3>"],[],[],[],pn(["the young South Asian mural artist with the same thick side braid, moss-green jacket, and loose black trousers","the older Black woman with a short gray natural cut, red raincoat, and dark trousers","the middle-aged white man with brown hair, navy overshirt, and tan chinos"],[1,2,3],"A bright stairway reveal shows <Subject 1> descending from the opposite entrance, clearly matching her earlier appearance. She crosses through the daylight band and rejoins <Subject 2> and <Subject 3> near the center image. All three turn together to compare the shadowed and bright ends of the wall.","","Stair steps, subdued city sound, underpass resonance, and fabric movement; no speech or music.")),
sh(5,["<char1>","<char2>","<char3>"],["<char2>"],[],[dl("<char2>","The changing light is part of how this wall is meant to be seen.")],pn(["the older Black woman with a short gray natural cut, red raincoat, and dark trousers","the young South Asian woman with a thick side braid, moss-green jacket, and loose black trousers","the middle-aged white man with brown hair, navy overshirt, and tan chinos"],[1,2,3],"A gentle lateral track follows <Subject 1>, <Subject 2>, and <Subject 3> walking toward the brighter exit. <Subject 2> glances back once as reflected daylight stretches across the mural. The group remains in motion rather than stopping to handle any materials.",'<Subject 2> (S1) says: <d>[English] The changing light is part of how this wall is meant to be seen.</d>',"Even footsteps, city air growing clearer, and one thoughtful voice."))]
cs.append(c)
# 027 tai chi — n4 first1 gap1 reapp3.
c={"case_id":"diverse_t1_027","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":3,"absence_gap":1,"characters":{"<char1>":"an older East Asian woman tai chi instructor with a silver bob, a soft blue jacket, and loose cream trousers","<char2>":"a middle-aged Black man with short curls, a charcoal sweatshirt, and navy track pants","<char3>":"a young Latina woman with a dark braid, a rust hoodie, and gray leggings"}}
c["shots"]=[
sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","Keep the weight shift small; I will find a flatter patch near the path.")],p1("A full-body group wide on a riverside lawn shows <Subject 1>, an older East Asian woman with a silver bob, a soft blue jacket, and loose cream trousers, guiding <Subject 2>, a middle-aged Black man with short curls, a charcoal sweatshirt, and navy track pants, and <Subject 3>, a young Latina woman with a dark braid, a rust hoodie, and gray leggings, through one slow arm arc. <Subject 1> then walks toward the river-path edge and passes behind a short tree line.",'<Subject 1> (S1) says: <d>[English] Keep the weight shift small; I will find a flatter patch near the path.</d>',"River water, leaves, distant bicycles, and one quiet cue.")),
sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","My balance is steadier when I let the back heel stay light.")],pn(["a middle-aged Black man with short curls, a charcoal sweatshirt, and navy track pants","a young Latina woman with a dark braid, a rust hoodie, and gray leggings"],[1,2],"A low side-profile medium shot holds <Subject 1> and <Subject 2> as they repeat the weight shift once. <Subject 1> keeps his back heel light, while <Subject 2> follows half a beat later. Both release their arms and look toward the tree line without speaking again.",'<Subject 1> (S1) says: <d>[English] My balance is steadier when I let the back heel stay light.</d>',"Soft shoes on grass, leaves, river ambience, and one measured voice.")),
sh(3,["<char1>","<char2>","<char3>"],[],[],[],pn(["the older East Asian tai chi instructor with the same silver bob, soft blue jacket, and loose cream trousers","the middle-aged Black man with short curls, charcoal sweatshirt, and navy track pants","the young Latina woman with a dark braid, rust hoodie, and gray leggings"],[1,2,3],"A tranquil long-lens view shows <Subject 1> returning from behind the tree line, clearly matching her earlier appearance. She gestures toward a flatter strip of lawn and walks sideways with <Subject 2> and <Subject 3> until the three form a loose line beneath moving branches.","","Light steps through grass, leaves, river water, and quiet breathing; no speech or music.")),
sh(4,["<char3>","<char1>","<char2>"],["<char3>"],["<char3>"],[dl("<char3>","The ground feels even here, so I can look forward instead of down.")],pn(["the young Latina woman with a dark braid, rust hoodie, and gray leggings","the older East Asian woman with a silver bob, soft blue jacket, and loose cream trousers","the middle-aged Black man with short curls, charcoal sweatshirt, and navy track pants"],[1,2,3],"A close reaction shot on <Subject 1> widens as <Subject 2> and <Subject 3> join her in one slow weight shift. The group completes a restrained arm arc, pauses, and relaxes while the river remains visible beyond the lawn.",'<Subject 1> (S1) says: <d>[English] The ground feels even here, so I can look forward instead of down.</d>',"Grass under soft shoes, leaves, water, and one relaxed voice."))]
cs.append(c)
# 028 conservatory mist — n5 first1 gap2 reapp4.
c={"case_id":"diverse_t1_028","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":4,"absence_gap":2,"characters":{"<char1>":"a middle-aged Black woman conservatory guide with a short natural cut, a cream field shirt, and forest-green trousers","<char2>":"an older South Asian man with a white beard, a navy cardigan, and tan trousers","<char3>":"a young white woman with short red hair, a gray rain jacket, and black jeans"}}
c["shots"]=[
sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","The mist is starting here; I will see whether the central path stays dry.")],p1("A humid depth wide in a conservatory fern aisle frames <Subject 1>, a middle-aged Black woman with a short natural cut, a cream field shirt, and forest-green trousers, walking with <Subject 2>, an older South Asian man with a white beard, a navy cardigan, and tan trousers, and <Subject 3>, a young white woman with short red hair, a gray rain jacket, and black jeans. Fine mist begins among the ferns. <Subject 1> turns into a side aisle toward the central path while the visitors pause beneath broad leaves.",'<Subject 1> (S1) says: <d>[English] The mist is starting here; I will see whether the central path stays dry.</d>',"Misting nozzles, water on leaves, ventilation, and one clear voice.")),
sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","The droplets are light, but the stones ahead are beginning to shine.")],pn(["an older South Asian man with a white beard, a navy cardigan, and tan trousers","a young white woman with short red hair, a gray rain jacket, and black jeans"],[1,2],"A leaf-obscured medium two-shot shows <Subject 1> pause near the aisle edge while <Subject 2> wipes one droplet from her glasses. <Subject 1> looks down at stones darkening beneath the mist, then both turn toward the dry palm arch behind them.",'<Subject 1> (S1) says: <d>[English] The droplets are light, but the stones ahead are beginning to shine.</d>',"Fine mist, water ticking on leaves, ventilation, and one low voice.")),
sh(3,["<char3>","<char2>"],["<char3>"],["<char3>"],[dl("<char3>","The broad path behind us is still dry, so we can turn without rushing.")],pn(["the young white woman with short red hair, gray rain jacket, and black jeans","the older South Asian man with a white beard, navy cardigan, and tan trousers"],[1,2],"An over-the-shoulder view from behind <Subject 2> shows <Subject 1> take two careful steps back toward the palm arch. <Subject 2> follows, leaving the narrow fern aisle as the mist thickens. Their pace remains unhurried and the dry central paving stays visible.",'<Subject 1> (S1) says: <d>[English] The broad path behind us is still dry, so we can turn without rushing.</d>',"Soft steps, mist, moving fronds, and one practical voice.")),
sh(4,["<char1>","<char3>","<char2>"],[],[],[],pn(["the middle-aged Black conservatory guide with the same short natural cut, cream field shirt, and forest-green trousers","the young white woman with short red hair, gray rain jacket, and black jeans","the older South Asian man with a white beard, navy cardigan, and tan trousers"],[1,2,3],"A reveal through the broad palm arch shows <Subject 1> returning from the central path, clearly matching her earlier appearance. She gestures along the dry paving as <Subject 2> and <Subject 3> meet her beneath the arch. The three turn away from the narrow misted passage.","","Palm leaves, subdued mist, dry footsteps, and conservatory ventilation; no speech or music.")),
sh(5,["<char2>","<char1>","<char3>"],["<char1>"],[],[dl("<char1>","This route stays dry and still gives us a clear view of the ferns.")],pn(["the older South Asian man with a white beard, navy cardigan, and tan trousers","the middle-aged Black woman with a short natural cut, cream field shirt, and forest-green trousers","the young white woman with short red hair, gray rain jacket, and black jeans"],[1,2,3],"A gentle walking follow keeps <Subject 1>, <Subject 2>, and <Subject 3> on the broad central path. <Subject 2> points through an opening toward the misted ferns without leaving the dry route. Water glints beyond them while their clothing remains mostly dry.",'<Subject 2> (S1) says: <d>[English] This route stays dry and still gives us a clear view of the ferns.</d>',"Dry steps, distant mist, ventilation, and one guiding voice."))]
cs.append(c)
# 029 train reunion — n5 first2 gap2 reapp5 final.
c={"case_id":"diverse_t1_029","tier":1,"target_identity":"<char2>","first_appearance_shot":2,"reappearance_shot":5,"absence_gap":2,"characters":{"<char1>":"a young Black man with short twists, a camel coat, and a navy scarf","<char2>":"a middle-aged East Asian woman with shoulder-length black hair, a burgundy wool coat, and black boots","<char3>":"an older East Asian man with silver hair, a charcoal overcoat, and a dark green suitcase"}}
c["shots"]=[
sh(1,["<char1>"],["<char1>"],["<char1>"],[dl("<char1>","The train is slowing near the far end, past the footbridge stairs.")],p1("A long platform wide at sunrise shows <Subject 1>, a young Black man with short twists, a camel coat, and a navy scarf, rising from a bench as a regional train approaches. He looks through the brightening air toward the far end of the platform and begins walking beside the safety line at an unhurried pace.",'<Subject 1> (S1) says: <d>[English] The train is slowing near the far end, past the footbridge stairs.</d>',"Approaching rails, morning birds, bench movement, and one anticipatory voice.")),
sh(2,["<char2>","<char1>"],["<char2>"],["<char2>"],[dl("<char2>","I will check the carriage numbers by the bridge and come back along the train.")],pn(["a middle-aged East Asian woman with shoulder-length black hair, a burgundy wool coat, and black boots","the young Black man with short twists, camel coat, and navy scarf"],[2],"A compressed medium shot reveals <Subject 1> joining <Subject 2> beside the footbridge stair, her burgundy coat distinct in the sunrise. She looks along the carriage windows, then walks toward the far doors while <Subject 2> remains near the stairs as the train stops.",'<Subject 1> (S1) says: <d>[English] I will check the carriage numbers by the bridge and come back along the train.</d>',"Brakes, platform footsteps, carriage doors, and one clear voice.")),
sh(3,["<char1>"],["<char1>"],[],[dl("<char1>","I can see the green suitcase through the third window.")],pn(["the young Black man with short twists, camel coat, and navy scarf"],[1],"An over-the-shoulder view follows <Subject 1> as he looks through successive train windows. He lifts one hand in recognition, then moves several paces along the platform without approaching the open doors too closely. Sunrise reflects across the glass.",'<Subject 1> (S1) says: <d>[English] I can see the green suitcase through the third window.</d>',"Idling train, low passenger steps, platform birds, and one excited voice.")),
sh(4,["<char3>","<char1>"],["<char3>"],["<char3>"],[dl("<char3>","I thought the train would stop closer, but the walk feels good after sitting.")],pn(["an older East Asian man with silver hair, a charcoal overcoat, and a dark green suitcase","the young Black man with short twists, camel coat, and navy scarf"],[2],"A doorway close reaction shot shows <Subject 1> step down from the train with his green suitcase as <Subject 2> waits several paces away. They smile, approach, and share a brief embrace. <Subject 1> then turns the suitcase toward the broad platform route.",'<Subject 1> (S1) says: <d>[English] I thought the train would stop closer, but the walk feels good after sitting.</d>',"A carriage step, suitcase wheels, a brief embrace, and one warm older voice.")),
sh(5,["<char2>","<char3>","<char1>"],[],[],[],pn(["the middle-aged East Asian woman with the same shoulder-length black hair, burgundy wool coat, and black boots","the older East Asian man with silver hair, charcoal overcoat, and dark green suitcase","the young Black man with short twists, camel coat, and navy scarf"],[1,2,3],"A gentle platform follow reveals <Subject 1> returning alongside <Subject 2>, clearly matching her earlier appearance. <Subject 3> joins them from behind, and the three pause for a brief reunion before walking toward the footbridge together. The stopped train fills the background without crowding the frame.","","Suitcase wheels, idling train, soft footsteps, and morning platform ambience; no speech or music."))]
cs.append(c)
# 030 family breakfast — n4 first1 gap2 reapp4 final.
c={"case_id":"diverse_t1_030","tier":1,"target_identity":"<char1>","first_appearance_shot":1,"reappearance_shot":4,"absence_gap":2,"characters":{"<char1>":"an older Latina woman with a silver braid, a sunflower-yellow cardigan, and a blue cotton apron","<char2>":"a middle-aged white man with short brown hair, a soft green sweater, and dark trousers","<char3>":"a young Black woman with a high natural puff, a cream sweatshirt, and rust-colored trousers"}}
c["shots"]=[
sh(1,["<char1>","<char2>","<char3>"],["<char1>"],["<char1>"],[dl("<char1>","The last pancake is ready; I will put the flour away and join you by the window.")],p1("A warm kitchen medium shot shows <Subject 1>, an older Latina woman with a silver braid, a sunflower-yellow cardigan, and a blue cotton apron, turn one pancake at the stove while <Subject 2>, a middle-aged white man with short brown hair, a soft green sweater, and dark trousers, and <Subject 3>, a young Black woman with a high natural puff, a cream sweatshirt, and rust-colored trousers, carry two plates toward a bright breakfast nook. <Subject 1> slides the pancake onto a third plate and walks through the pantry doorway.",'<Subject 1> (S1) says: <d>[English] The last pancake is ready; I will put the flour away and join you by the window.</d>',"A pan, quiet stove flame, plates, morning birds, and one familiar voice.")),
sh(2,["<char2>","<char3>"],["<char2>"],["<char2>"],[dl("<char2>","The sunlight is strong here; I will raise the blind only halfway.")],pn(["a middle-aged white man with short brown hair, a soft green sweater, and dark trousers","a young Black woman with a high natural puff, a cream sweatshirt, and rust-colored trousers"],[1,2],"A window-backlit nook wide shows <Subject 1> stand and lift the blind halfway while <Subject 2> settles into a chair with a plate. Sunlight shifts from the seat to the floor, leaving both faces softly lit. Steam rises from breakfast as they look toward the pantry doorway.",'<Subject 1> (S1) says: <d>[English] The sunlight is strong here; I will raise the blind only halfway.</d>',"A blind cord, chair movement, quiet plates, and one casual voice.")),
sh(3,["<char3>","<char2>"],["<char3>"],["<char3>"],[dl("<char3>","This is better; the room is bright without the glare.")],pn(["the young Black woman with a high natural puff, cream sweatshirt, and rust-colored trousers","the middle-aged white man with short brown hair, soft green sweater, and dark trousers"],[1,2],"A close reaction shot across the meal catches <Subject 1> look toward the softened window light, then toward <Subject 2>. They each take one bite and pause as a small draft stirs the curtain beside the nook. The stove remains visible in the deeper background.",'<Subject 1> (S1) says: <d>[English] This is better; the room is bright without the glare.</d>',"Cutlery, a light curtain, morning birds, and one relaxed voice.")),
sh(4,["<char1>","<char3>","<char2>"],[],[],[],pn(["the older Latina woman with the same silver braid, sunflower-yellow cardigan, and blue cotton apron","the young Black woman with a high natural puff, cream sweatshirt, and rust-colored trousers","the middle-aged white man with short brown hair, soft green sweater, and dark trousers"],[1,2,3],"A gentle doorway pan reveals <Subject 1> returning from the pantry with empty hands, clearly matching her earlier appearance. She takes the open seat beside <Subject 2> while <Subject 3> shifts a plate within easy reach. The three share a quiet look and begin breakfast together in the softened window light.","","A chair settling, soft cutlery, curtain movement, and calm household ambience; no speech or music."))]
cs.append(c)
O.write_text(json.dumps(cs,ensure_ascii=False,indent=2)+"\n",encoding="utf-8")