22 lines
2.5 KiB
Python
22 lines
2.5 KiB
Python
"""Requalification 2026-11-17: write labels.jsonl from work/requalify_input.jsonl, removing the labels below the
|
|||
|
|
threshold or of missing points only, rewriting two thermal descriptions that said the compensation absorbs the
|
||
|
|
cycle while the corrected curves keep it beyond the noise."""
|
||
|
|
import json, sys
|
||
|
|
D = sys.argv[1]
|
||
|
|
REMOVED = {'NORDEND-281', 'NORDEND-286', 'NORDEND-289', 'NORDEND-232', 'NORDEND-235', 'NORDEND-238',
|
||
|
|
'NORDEND-241', 'NORDEND-242'}
|
||
|
|
REWRITE = {
|
||
|
|
'NORDEND-218': "Weak camera thermal cycle: overcast day, the housing temperature rises only a little (highest around 14:00); the pan drops a little, the tilt rises by the same amount; but the camera does not come back overnight: on the morning of the 27th, the pan is even lower than the day before, by almost the whole of its daytime drop, after the rain of the 24th-25th and the marks it left on the window (separate label). The compensation does not quite absorb it: the corr_x of PR18 drops just beyond its noise from mid-morning to mid-afternoon and stays a little lower at night, with the camera; the corr_y of PR17 rises just beyond its noise in the afternoon; the other targets stay within or at the edge of their noise (PR04, hindered separately until the evening, apart). Deduced cause: the pose follows the housing temperature, and the quarry's rock face does not move with temperature. The structure is not moving, nothing to do.",
|
||
|
|
'NORDEND-220': "Camera thermal cycle: in the morning, when the housing warms up (markedly, highest around 13:00), the camera turns: the pan drops a little, the tilt rises less; then it comes back in the afternoon, until the night of degrading visibility, then fog, when the pose is distorted (separate label). The compensation absorbs it poorly: the corr_x of PR18 dips markedly from mid-morning to mid-afternoon (deepest in early afternoon); the corr_y of PR13 and PR06 drops a little around midday, that of PR10 from late morning to the end of the label; the other targets stay near their noise. Deduced cause: the pose follows the housing temperature, and the quarry's rock face does not move with temperature. The structure is not moving, nothing to do.",
|
||
|
|
}
|
||
|
|
out = []
|
||
|
|
for line in open(f'{D}/work/requalify_input.jsonl'):
|
||
|
|
L = json.loads(line)
|
||
|
|
i = L.pop('id')
|
||
|
|
if i in REMOVED: continue
|
||
|
|
if i in REWRITE:
|
||
|
|
L['description'] = REWRITE[i]; L.pop('review', None)
|
||
|
|
out.append(L)
|
||
|
|
with open(f'{D}/labels.jsonl', 'w') as f:
|
||
|
|
for L in out: f.write(json.dumps(L, ensure_ascii=False) + '\n')
|
||
|
|
print(len(out), 'labels written')
|