Files
aimsight-labeling/auto/analyses/BREITHORN_2026-10-03T0000_2026-11-01T0000/scripts/write_labels.py
T
2026-11-18 10:51:31 +01:00

18 lines
3.6 KiB
Python

import json
D="labeling/auto/analyses/BREITHORN_2026-10-03T0000_2026-11-01T0000"
inp=[json.loads(l) for l in open(D+"/work/existing.jsonl")]
common=("According to the expert, BREITHORN, MICHIGAN and NEBRASKA are in the same building: the cameras of the three stations tilt together, in the same direction and on the same dates (advance until 12 October, stop and slight backward movement from 13 to 16, resumption from the 17th to the end of the month), which points to a cause common to the building rather than a fault of this camera alone; at equal housing temperature, the cameras are more tilted at the end of the month than in the middle: temperature does not explain it alone, link not established. "
"For the customer: this is not a movement of the structure, the targets keep their places relative to each other and only their view from a camera that shifts changes; the camera tilt is to be monitored.")
parallax=("Cause given by the expert: the camera is nodding forward and the compensation of its movement is not complete. "
"Deduced from the distances of the targets to the camera: the drift of each target grows as it is closer, a parallax. COLJ19 and POUI19, the nearest according to the expert and to their distances, drift the most; the targets at middle distance (COLH20, COLI20, POUI20) less; POUH21, at the distance of the references, does not drift; the farthest (COLI24, POUI22) go the other way in corr_y. "
"As it nods, the camera does not only turn, it also shifts a little; a shift moves near targets much more in the image than far ones, and the compensation, fitted on references at middle distance, corrects only the targets at their distance: those nearer keep a remainder in one direction, those farther in the other. "
"The parallax explains most of the drift, not all of it: COLI21, which drifts as much as targets much nearer, COLH20''' in corr_x, and the corr_y of COLI24 and POUI22, stronger than the parallax gives, remain not established. ")
a={k:v for k,v in inp[0].items() if k not in ("id","review")}
a["description"]=("From the start of the data to 13 October, the targets drift slowly and steadily with the camera pose, step by step, as the camera gradually tilts (tilt increasing, pan and rotation decreasing): COLJ19 and POUI19 the most, mostly in corr_x (POUI19 hardly in corr_y), COLH20, COLI20, COLI21 and POUI20 in the same direction, in corr_x and corr_y; COLI24 and POUI22 drift in the opposite direction in corr_y. Their position in the image hardly moves apart from the camera movement and their error_value stays stable. "
+ parallax + "The temperature of the camera housing drops slightly over the range, link not established. " + common)
b={k:v for k,v in inp[1].items() if k not in ("id","review")}
b["description"]=("From 17 October to the end of the batch, the drift resumes, faster than at the beginning of the month until the 25th, then clearly slower without stopping: the camera tilts again (tilt increasing, pan and rotation decreasing) and the targets drift with it: POUI19 and COLJ19 the most, mostly in corr_x (POUI19 hardly in corr_y), COLI20, COLI21, COLH20 and POUI20 in the same direction, in corr_x and corr_y; COLI24 and POUI22 drift in the opposite direction in corr_y; COLI22, COLH20''' and POUI24 drift too, more noisily, between their own rejections. Their position in the image hardly moves apart from the camera movement and their error_value stays stable. "
+ parallax + "The resumption coincides with the drop in the camera housing temperature, but the drift does not come back when it rises: link not established. " + common)
with open(D+"/labels.jsonl","w") as f:
for x in (a,b): f.write(json.dumps(x,ensure_ascii=False)+"\n")