70 lines
18 KiB
Python
70 lines
18 KiB
Python
"""Builds labels.jsonl from work/existing.jsonl: kept labels unchanged (review kept, id dropped), corrected and added ones."""
|
|
import json, os
|
|
HERE = os.path.dirname(os.path.abspath(__file__)); OUT = os.path.dirname(HERE)
|
|
old = {l["id"]: l for l in map(json.loads, open(os.path.join(OUT, "work/existing.jsonl")))}
|
|
KEEP = ["NORDEND-%d" % n for n in (149, 154, 156, 158, 160, 162, 164, 166, 167, 168, 171, 173, 174)]
|
|
REMOVED = ["NORDEND-150"]
|
|
|
|
SUN = ("The structure does not move: nothing to do; CTR01's curve is missing and the other curves are less reliable on sunny afternoons.")
|
|
C = {} # corrected: old id -> new label
|
|
def L(s, e, f, d): return {"start": s, "end": e, "family": f, "description": d}
|
|
|
|
C["NORDEND-151"] = L("2026-09-30T18:45Z", "2026-09-30T23:45Z", "Visibility",
|
|
"At night, the spots of a few faint targets shrink on the images, without any obstacle in front and without a veil over the rest of the scene. First PR07, in the middle of the group: its spot is smaller on the 19:15, 20:15 and 21:15 thumbnails than at 18:30, whole again at 22:30; its error_value rises, its corr_x leaves its level at 19:00, makes a clear jump at 19:15, then keeps dipping and coming back until it is rejected for one measurement at 21:00, and is back at its level in the second half of the evening. At the jump of 19:15, PR16 departs with it on corr_x and only comes back three measurements later, PR15 a little for one measurement. Then CTR01 and PR09, neighbours on the left edge of the group, whose error_value rises through the evening: their spots shrink then reopen (21:15 and 22:30 thumbnails); CTR01 is rejected without interruption from the evening to just before midnight, PR09 part of the time; their curves are missing. Cause not established (a poorer view at night of these faint spots, as on other October nights). This is not a movement: do not trust the points of PR07 and PR16 over the range; the curves of CTR01 and PR09 are missing.")
|
|
|
|
C["NORDEND-153"] = L("2026-10-01T03:00Z", "2026-10-01T08:00Z", "Visibility",
|
|
"Before dawn and in the morning, PR09, CTR01 and PR07 are rejected at times and their curves are missing: PR07 jumps on corr_x then is rejected for one measurement before dawn, and again at daybreak; PR09 almost without interruption from before dawn until the morning; CTR01 at times, then continuously at daybreak. Their error_value stays high all the while. On the images, the spots of these faint targets fade (PR07 almost gone at 03:30, PR09 and CTR01 very faint at 07:30), without a visible obstacle or a veil over the rest of the scene; CTR01 and PR09 are on the left edge of the group, PR07 in the middle. The other targets and the references remain measured; the common jump of the targets of the right part of the group at daybreak is labelled apart. Cause not established (a poorer view at night of these faint spots, moisture or mist possible). This is not a movement; the curves are missing.")
|
|
|
|
C["NORDEND-155"] = L("2026-10-01T10:00Z", "2026-10-02T06:00Z", "Thermal displacement",
|
|
"Thermal cycle of the camera, carried by the night: overcast day, the housing temperature barely rises and the camera barely moves by day (pan dropping a little, tilt rising a little). The movement comes in the evening and at night, when the housing cools down markedly: the pan rises back markedly, much more than it dropped by day, the tilt drops, the scale decreases, until the start of the next morning. The compensation follows it poorly: the corr_x of PR18 stays low all day and rises strongly in the evening and at night, that of PR16, PR15 and PR17 a little; the corr_y of almost all the other targets rises too in the evening and at night, a little to markedly (PR13, PR06, PR07, PR03 above all), while that of PR18 drops a little; the references CTR02 and CTR03 depart a little. Deduced cause: the pose follows the housing temperature, and the rock face of the quarry does not move with the temperature. The structure does not move, nothing to do.")
|
|
|
|
def sun(s, e, d): return L(s, e, "Visibility", d)
|
|
C["NORDEND-157"] = sun("2026-10-02T15:30Z", "2026-10-02T16:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03 (15:45 thumbnail): CTR01's spot drowns in it and it is rejected for a few measurements, its curve is missing. CTR02 and CTR03 stay measured, their spots still visible, and the targets move only a little together on corr_y (PR02's dips a little). Same hour and same signature as the other sunny afternoons of the batch. " + SUN)
|
|
C["NORDEND-159"] = sun("2026-10-03T14:45Z", "2026-10-03T16:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03, as bright as their spots, which drown in it (15:30 thumbnail): CTR01 is rejected for an hour, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises clearly): the compensation shifts a little and the targets jump together a little on corr_y at some measurements; the corr_y of PR02, next to CTR01, dips and that of PR01 rises during the hour. " + SUN)
|
|
C["NORDEND-161"] = sun("2026-10-04T14:45Z", "2026-10-04T16:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03, as bright as their spots, which drown in it (15:15 thumbnail): CTR01 is rejected for an hour, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises clearly): the compensation shifts a little and the targets jump together a little on corr_y at some measurements; the corr_y of PR02, next to CTR01, dips and that of PR01 rises for a measurement or two. " + SUN)
|
|
C["NORDEND-163"] = sun("2026-10-05T14:45Z", "2026-10-05T16:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03, as bright as their spots, which drown in it (15:15 and 15:30 thumbnails; at 13:30 and at 17:00, the rock is in shadow and the spots sharp): CTR01 is rejected for an hour, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises clearly): the compensation shifts a little and the targets jump together a little on corr_y at some measurements; the corr_y of PR02, next to CTR01, dips and that of PR01 rises. " + SUN)
|
|
C["NORDEND-165"] = sun("2026-10-06T14:00Z", "2026-10-06T16:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind the references CTR02 and CTR03 and behind CTR01 (local reference, treated as a target), as bright as their spots, which drown in it (14:15 and 15:15 thumbnails): CTR01 is rejected for a few measurements, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises clearly from the start of the afternoon): the camera pose jumps in tilt and the targets jump together on corr_y, clearly at a few measurements (PR01, PR02, PR10, PR13 above all), back at the next one; the corr_y of PR02 dips in the second half of the episode. " + SUN)
|
|
C["NORDEND-172"] = sun("2026-10-08T14:45Z", "2026-10-08T15:15Z",
|
|
"In mid-afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03 (15:00 thumbnail): CTR01 is rejected for one measurement, its curve is missing; the error_value of CTR03 rises a little and the targets move a little together on corr_y at that measurement. Same hour and same signature as the other sunny afternoons of the batch. " + SUN)
|
|
C["NORDEND-176"] = sun("2026-10-10T14:30Z", "2026-10-10T16:00Z",
|
|
"In mid-afternoon, between clouds, the sun lights the rock behind the references CTR02 and CTR03 and behind CTR01 (local reference, treated as a target), their spots drowning in it (14:45 and 15:30 thumbnails; at 15:00, in shadow): CTR01 is rejected for a few measurements and PR07 for one, their curves are missing. CTR02 and CTR03 stay under their threshold but are seen less well: the camera pose jumps in tilt and the targets jump together a little on corr_y at those measurements. At the same time, all the spots of the group are smaller than before and after (15:15 to 15:45 thumbnails): PR16 jumps clearly on corr_x and comes back gradually, PR15 and PR08 a little. " + SUN)
|
|
C["NORDEND-178"] = sun("2026-10-11T14:45Z", "2026-10-11T15:45Z",
|
|
"In mid-afternoon, between clouds, the sun lights the rock behind the references CTR02 and CTR03 and behind CTR01 (local reference, treated as a target), their spots drowning in it (15:00 and 15:30 thumbnails; at 15:15, in shadow): CTR01 is rejected for one measurement, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises): at each of these two measurements, the camera pose jumps in tilt and almost all the targets jump together on corr_y, clearly (PR01, PR02, PR03, PR10 above all), then come back at the next one. " + SUN)
|
|
C["NORDEND-180"] = sun("2026-10-12T14:00Z", "2026-10-12T16:15Z",
|
|
"In the afternoon, the sun lights the rock behind CTR01 (local reference, treated as a target) and behind the references CTR02 and CTR03, as bright as their spots, which drown in it (15:30 and 16:00 thumbnails): CTR01 is rejected for a few measurements, its curve is missing. CTR02 and CTR03 stay under their threshold but are seen less well (the error_value of CTR03 rises): the targets jump together a little on corr_y at some measurements, and clearly at the last one, when the camera pose jumps in tilt (PR01, PR02, PR10, PR11 drop), back at the next measurement. " + SUN)
|
|
|
|
C["NORDEND-170"] = L("2026-10-08T05:45Z", "2026-10-08T08:30Z", "Visibility",
|
|
"At daybreak, the reference CTR04 is seen less and less well: its error_value rises from the end of the night, it goes above its threshold for two measurements and the compensation runs without it, then it stays high for three measurements before coming back. While it rises, the camera pose jumps and the targets of the right part of the group, near CTR04 (PR15, PR14, PR08, PR06, PR05), jump together on corr_x; at the two measurements without CTR04, all the targets jump together strongly on corr_x and corr_y, without a step in the raw positions; after its return, PR16, PR14 and PR08 stay off for a while. Nothing hides CTR04 on the 07:15 image (overcast sky, sharp scene): drop in visibility of the reference at the change of light, cause not established, under the cobweb night (separate label). The jumps are not a movement; do not trust these points.")
|
|
|
|
C["NORDEND-175"] = L("2026-10-10T08:15Z", "2026-10-11T06:45Z", "Thermal displacement",
|
|
"Weak thermal cycle of the camera: overcast day, the housing temperature only rises a little (highest around 11:00); the pan drops a little, the tilt rises a little and the rotation rises; the camera comes back in the evening and at night, the pan beyond its level of the previous night, until the next morning. The compensation almost absorbs it: the corr_x of PR18 drops a little to markedly from late morning to early afternoon and comes back in late afternoon, then rises a little at night, that of PR16 a little less; the other targets and the references move little apart from the afternoon sun on the references (separate label). Deduced cause: the pose follows the housing temperature, and the rock face of the quarry does not move with the temperature. The structure does not move, nothing to do.")
|
|
|
|
C["NORDEND-177"] = L("2026-10-11T06:45Z", "2026-10-12T06:45Z", "Thermal displacement",
|
|
"Weak thermal cycle of the camera: overcast day, the housing temperature only rises a little (highest around 15:00); the pan drops a little, the tilt rises as much, the scale increases; the camera comes back in the evening and at night, until the next morning. The compensation almost absorbs it: the corr_x of PR18 drops a little, those of PR17, PR16 and PR14 a little too; on corr_y, PR08 and PR16 drop a little to markedly by day (PR08 dips the same way on the neighbouring days), PR17, PR01 and PR12 rise a little in the afternoon, then everything comes back in the evening; the references move little. The common jumps of the targets in mid-afternoon come from the sun on the references (separate label). Deduced cause: the pose follows the housing temperature, and the rock face of the quarry does not move with the temperature. The structure does not move, nothing to do.")
|
|
|
|
C["NORDEND-179"] = L("2026-10-12T06:45Z", "2026-10-12T19:30Z", "Thermal displacement",
|
|
"Thermal cycle of the camera: in the morning, when the housing heats up in the sun (markedly, highest around 12:00), the camera turns: the pan drops markedly, the tilt rises a little less, the scale increases; then it comes back in the afternoon and the evening, still partly when, at nightfall, the camera makes a step that stops the cycle (separate label, Displacement); afterwards the housing temperature no longer drops and the pose stays at its new level until the end of the batch, apart from a back-and-forth later in the night (separate label). The compensation absorbs it better than on the other sunny days: the corr_x of PR18 drops markedly around 11:00 and comes back from 13:00, that of PR16 a little; the corr_y of PR08 drops a little to markedly in the afternoon, those of PR09 and PR01 rise a little. The departures of PR17 come from the mark on the window (separate label), the common jumps of mid-afternoon from the sun on the references (separate label). Deduced cause: the pose follows the housing temperature, and the rock face of the quarry does not move with the temperature. The structure does not move, nothing to do.")
|
|
|
|
ADD = [
|
|
L("2026-10-01T06:30Z", "2026-10-01T07:45Z", "Visibility",
|
|
"At daybreak, the targets of the right part of the group jump together on corr_x for four measurements, PR16 and PR15 clearly, PR06, PR08, PR14 and PR18 a little to clearly, PR16, PR06 and PR08 also on corr_y, then come back. In the image, the raw positions of the targets and of the references CTR02 and CTR03 shift slightly together while that of the reference CTR04, at the bottom right, does not move; no reference is rejected and their error_value stays at its level; the camera pose jumps in pan, then comes back. The images show the change of light at daybreak (06:45 image darker with brighter spots, 07:00 image in daylight under an overcast sky, nothing in front of CTR04). Cause not established: CTR04 probably sees the change of light differently from the rest of the scene, as on the morning of 08/10 when it is discarded. This is not a movement: do not trust these points."),
|
|
L("2026-10-09T06:30Z", "2026-10-10T08:15Z", "Thermal displacement",
|
|
"Weak thermal cycle of the camera on a day of bad weather (low sky, separate Visibility labels): the housing temperature rises slowly from the morning to the evening, stays up until about midnight, then drops until the morning. The camera follows it: the pan drops clearly, the tilt rises as much and the scale increases until the evening, then the camera comes back in part during the second half of the night, until the start of the next cycle. Read at the measurements where the reference CTR04 is kept, the compensation absorbs most of it: the corr_x of PR18 drops a little to clearly and that of PR16 a little, and they come back in part at night; the larger jumps of the day and of the evening come from the reduced visibility and the losses of CTR04 (separate labels). Deduced cause: the pose follows the housing temperature, and the rock face of the quarry does not move with the temperature. The structure does not move, nothing to do."),
|
|
L("2026-10-12T19:30Z", "2026-10-12T20:00Z", "Displacement",
|
|
"At nightfall, the camera moves at once: the tilt jumps (the camera nods down), the pan drops a little, and the raw positions of all the sensors, references included, shift together in the image. The compensation does not erase it all, the references CTR03 and CTR04 not moving exactly like the targets: in one step, the corr_y of almost all the targets drops a little to clearly (PR01, PR02, PR14, PR16 above all), the corr_x of PR18 a little, and the corr_y of the references CTR02 and CTR03 move apart. At the same measurement, the registration residual drops and the error_value of several sensors changes level; afterwards the housing temperature rises a little in the evening instead of dropping. No obstacle on the 19:30 and 19:45 images. The pose and the curves stay at the new level, without return until the end of the batch. Cause not established (a jolt of the camera, or a change in the camera or its lighting). It is not a movement of the structure; the camera is to be monitored."),
|
|
L("2026-10-12T22:30Z", "2026-10-13T00:15Z", "Displacement",
|
|
"At night, the camera moves for about an hour then comes back: the tilt drops (the camera nods up), the pan jumps for one measurement, and the raw positions of all the sensors shift together in the image. The references CTR03 and CTR04 do not follow the targets exactly, so the compensation leaves a remainder: the corr_y of almost all the targets rise together clearly (PR01, PR02, PR03, PR10, PR14 above all), those of the references CTR02 and CTR03 move apart, then everything comes back gradually just after midnight. No reference is rejected and their error_value stays at its level; the housing temperature dips a little at the same hour, much too little to explain the movement; no obstacle on the 23:15 image. At the same time PR17 changes level (mark on the window, separate label). Cause not established. It is not a movement of the structure; the camera is to be monitored."),
|
|
]
|
|
labels = [{k: v for k, v in old[i].items() if k != "id"} for i in KEEP] + list(C.values()) + ADD
|
|
assert len(KEEP) + len(C) + len(REMOVED) == len(old), (len(KEEP), len(C), len(old))
|
|
assert set(KEEP) | set(C) | set(REMOVED) == set(old)
|
|
labels.sort(key=lambda l: (l["start"], l["end"]))
|
|
with open(os.path.join(OUT, "labels.jsonl"), "w") as f:
|
|
for l in labels: f.write(json.dumps(l, ensure_ascii=False) + "\n")
|
|
print(len(KEEP), "kept,", len(C), "corrected,", len(REMOVED), "removed,", len(ADD), "added;", len(labels), "labels")
|