22 lines
2.8 KiB
Python
22 lines
2.8 KiB
Python
"""Requalified labels: kept as they are (id dropped), 61 and 169 rewritten (review dropped), 6 removed."""
|
|||
|
|
import json, sys
|
||
|
|
D = sys.argv[1]
|
||
|
|
REMOVED = {"NIEDERHORN-59", "NIEDERHORN-64", "NIEDERHORN-65", "NIEDERHORN-80", "NIEDERHORN-83", "NIEDERHORN-86"}
|
||
|
|
NEW = {
|
||
|
|
"NIEDERHORN-61": "At night and in the morning, for several hours: the recognition error of many targets rises and many are rejected at times (especially PWD_IMP_B07_017_C09, PWD_RMP_B12_017_C09, PWD_RMP_B12_018_C09, PWD_RMP_B15_018_C09, PWD_RMP_B15_019_C09, e06, e09 and the targets on the left), and the corrected curves of the targets still measured move far beyond their noise: from 09:00 to 12:00 the corr_x of PWD_RMP_B15_020_C09, PWD_IMP_B08_025_C09, PWD_RMP_B16_026_C09, e15 and e14 drops strongly, deepest between 10:00 and 12:00, then comes back; at 12:00 PWD_RMP_B12_017_C09 jumps up on corr_x, PWD_RMP_B12_018_C09 and PWD_RMP_B15_018_C09 on corr_y; at 14:00 the corr_x of e06 and e09 drops for one measurement and the corr_y of e14 jumps up, before the return to normal in late morning. The references hold, higher up on the road. The train of 13:00 and the plant in front of PWD_IMP_B07_016_C09 are labelled apart. Probable cause: rain or mist (smaller and weaker spots on the 11:00 thumbnails, without any obstacle). The structure does not move: do not trust the curves over the range.",
|
||
|
|
"NIEDERHORN-169": "When measurements resume after the night gap, in the early morning: many targets are rejected at the first measurements (PWD_IMP_B07_017_C09, PWD_IMP_B07_018_C09, the PWD_RMP_B12 row, PWD_RMP_B15_018_C09, PWD_RMP_B15_019_C09, e02, e06, e09), and the corrected curves of the targets still measured move far beyond their noise: at the first two measurements the corr_x of PWD_IMP_B08_025_C09 drops strongly, that of PWD_RMP_B15_020_C09, PWD_RMP_B17_026_C09, PWD_IMP_B08_024_C09 and e14 clearly, and they only come back at 14:00; at 13:00 PWD_RMP_B15_019_C09 jumps up on corr_y and PWD_RMP_B17_026_C09 drops again on corr_x; until the afternoon, PWD_RMP_B16_026_C09 and e10, on the left edge, stay unsettled and jump on corr_x from one measurement to the next, on top of the level change of the left-edge targets labelled apart. The references hold. The trains of 17:00 and 19:00 are labelled apart. Weaker spots on the 12:00 image, without any obstacle: probable cause, a night of rain or mist like the others, not established. The structure does not move: do not trust the curves over the range.",
|
||
|
|
}
|
||
|
|
out = []
|
||
|
|
for l in open(f"{D}/work/requalify_input.jsonl"):
|
||
|
|
lab = json.loads(l)
|
||
|
|
i = lab.pop("id")
|
||
|
|
if i in REMOVED:
|
||
|
|
continue
|
||
|
|
if i in NEW:
|
||
|
|
lab["description"] = NEW[i]
|
||
|
|
lab.pop("review", None)
|
||
|
|
out.append(lab)
|
||
|
|
with open(f"{D}/labels.jsonl", "w") as f:
|
||
|
|
for lab in out:
|
||
|
|
f.write(json.dumps(lab, ensure_ascii=False) + "\n")
|
||
|
|
print(len(out), "labels")
|