28 lines
6.8 KiB
Python
28 lines
6.8 KiB
Python
"""Builds labels.jsonl: the existing labels kept as they are (without id), the corrected ones, the added ones; sorted by start."""
|
|
import json
|
|
O = 'labeling/auto/analyses/JUNGFRAU_2026-09-30T0000_2026-10-10T1615/'
|
|
old = [json.loads(l) for l in open(O + 'work/existing.jsonl')]
|
|
corrected = {
|
|
'JUNGFRAU-5': "Reduced visibility over the whole scene, on a day without sun: the error_value of almost all the targets and of the reference REF_G rises clearly from late morning, in steps, stays high in the afternoon and evening, then drops all at once in the evening; PM_C is rejected all afternoon and evening, PM_D approaches its threshold. The corrected curves become agitated, with apparent movements that disappear when visibility returns: corr_y of BJ_C, BJ_D and BJ_G sinking, corr_x of BJ_G, PBL_C, BJ_D and PM_D moving away; the corrections of the references REF_CT, REF_D and REF_G also deviate and the camera pose is agitated, but the three references remain retained, none is rejected. Images: nothing in front of the targets; the spots are smaller and weaker than at the same hour on other days, and at night the background is more veiled, with reflections on the roadway. Cause deduced from the weather: the nearby MeteoSwiss station measures rain from early afternoon to early evening, with the air close to saturation, and its humidity drops in the evening at the hour the error_value falls back; the drops themselves are not seen on the images. Data less precise over the range, the structure does not move: nothing to do.",
|
|
'JUNGFRAU-26': "Visibility drops over the whole scene: the error_value of almost all the targets and of the three references (REF_G above all, but under its threshold) rises clearly, PM_C is rejected over long ranges and disappears from the curves, and the corrections of most targets become agitated, with common jumps of several targets (BJ_G, BL_C, BL_G, PBJ_C in the lead) that are not movements. Images: gray and dull scene, wet road on the 16:00 image, nothing in front of the targets. Cause deduced from the weather: the nearby MeteoSwiss station measures rain in the afternoon and the night of 07/10, heavy rain with strong gusts of wind in the second half of the night and the morning of 08/10, showers until the afternoon of 08/10; the end of the range comes with the drop of its humidity; according to the expert, nothing clear on the images, perhaps wind. The thermal cycle of the bridge partly fades out. Do not trust the curves over the range.",
|
|
}
|
|
added = [
|
|
{"start": "2026-10-01T06:15Z", "end": "2026-10-01T07:45Z", "family": "Visibility", "description": "At the change from night to day, on an overcast morning: the error_value of most targets (BL_C, PBL_C, PM_C, and the three targets BJ_G, BJ_C, BJ_D) rises a little for about an hour, then drops all at once at 07:45. Meanwhile the corr_y of BJ_G, BJ_C and BJ_D sinks clearly, the corr_x of BJ_G goes down and that of BJ_D goes up (the two move apart), then all three come back at once with the error_value; the other targets hardly move, the references stay calm and the camera pose does not move. Images of 06:00, 07:00 and 07:30: nothing in front of the targets, no fog seen, spots like at 07:45 and like the day before at the same hour. Cause not established: a brief degradation of the image at daybreak, deduced from the error_value rising on most targets together with sharp edges. This is not a movement: points not to be trusted."},
|
|
{"start": "2026-10-01T07:45Z", "end": "2026-10-01T11:15Z", "family": "Thermal displacement", "description": "Weak warming of an overcast morning: the camera housing temperature rises a little, the camera tilts slowly (the tilt goes down, the pan and the scale rise a little), the raw positions of all the sensors moving together; the compensation absorbs it, the corrected curves of the targets stay almost flat and the bridge targets hardly sink. References stable, error_value at its level. Deduced from the camera pose and the housing temperature. From late morning the drop in visibility, labeled apart, takes over and hides the rest of the cycle. Normal thermal movement of the camera, nothing to do."},
|
|
{"start": "2026-10-04T19:30Z", "end": "2026-10-04T20:00Z", "family": "Displacement", "description": "In the evening, for the duration of one measurement, the corr_x of most targets (PM_C, BL_G, BJ_D, BJ_C, PM_D, PBL_D) shift a little together, then come back at the next one; the corrections of the references REF_CT and REF_D move apart in opposite directions and the camera scale jumps. On the raw positions, only REF_D shifts, the targets do not move in the image: the base of the compensation changes for one measurement, all three references retained, error_value stable. Thumbnail of 19:45: spot of REF_D unchanged, nothing in front. Cause not established. It is not a movement of the structure: point to ignore."},
|
|
{"start": "2026-10-09T00:45Z", "end": "2026-10-09T01:15Z", "family": "Displacement", "description": "At night, for the duration of one measurement, the corr_x of most targets shift a little together (BJ_D clearly, PM_D, BJ_C, BL_D, PBL_D less), then come back at the next one; the corrections of the references REF_CT and REF_D move apart in opposite directions and the camera scale jumps. On the raw positions, only REF_D shifts, the targets do not move in the image; its error_value rises only slightly, all three references retained: the base of the compensation changes for one measurement. Thumbnail of 01:00: spot of REF_D unchanged, nothing in front. Cause not established, same signature as on the evening of 04/10. It is not a movement of the structure: point to ignore."},
|
|
{"start": "2026-10-10T12:15Z", "end": "2026-10-10T13:30Z", "family": "Visibility", "description": "Brief drop in visibility in the early afternoon, on a windy day: the error_value of almost all the targets rises from 12:30 (BL_G, PBL_C, BL_C and PM_C the most), then comes back by 13:30; the corrections become agitated: the corr_y of BJ_C and BJ_G drops sharply at 12:45, the corr_x of BJ_G, PBJ_C, BJ_C and BL_G go down at 13:00 and 13:15, then all come back; the camera pose jumps from one measurement to the next. Thumbnails: the spots are smaller from 12:45 to 13:15 than at 12:15 and 13:45, nothing in front; 13:00 image: trees blurred by the wind, sun on the slopes, road dry. The nearby MeteoSwiss station measures strong gusts and a trace of rain at that hour. Cause not established: a change of light or a passing shower, in the wind. This is not a movement: points not to be trusted."},
|
|
]
|
|
out = []
|
|
for d in old:
|
|
d = dict(d); i = d.pop('id')
|
|
if i in corrected:
|
|
d['description'] = corrected[i]; d.pop('review', None)
|
|
out.append(d)
|
|
out += added
|
|
out.sort(key=lambda d: (d['start'], d['end']))
|
|
with open(O + 'labels.jsonl', 'w') as f:
|
|
for d in out:
|
|
f.write(json.dumps(d, ensure_ascii=False) + '\n')
|
|
print(len(out), 'labels')
|