Closed valosekj closed 9 months ago
Hey @valosekj ! Thanks for opening this PR ! I was actually thinking about updating some fields of our json sidecars.
Regarding your proposition, I think could just stick to our standards as described here. In other terms, I think we should start using the key "Name" instead of "Note" which is proposed by the BIDS convention as well.
Then regarding the associated values:
lumbar-vanderbilt
dataset, but for that I am opened to any suggestions.See one example for the dataset lumbar-vanderbilt
{
"SpatialReference": "orig",
"GeneratedBy": [
{
"Name": "Manual",
"Description": "Manually created by our collaborators"
},
{
"Name": "Quality Control",
"Author": "Nathan Molinier",
"Date": "2024-01-12 13:37:17"
}
]
}
Also, as shown in the previous example, we should also start adding the key "SpatialReference" .
Note: we should also make sure that other fields like "SpatialReference" are not removed when using manual_correction.py
Points based on an in-person discussion with @NathanMolinier:
Note
in this comment to Name
- done in https://github.com/spinalcordtoolbox/manual-correction/pull/76/commits/ea18915eefaf7ce5563648a57934a1bd9ef00a6bmanual-correction
script should add "SpatialReference": "orig",
key-value entry to the JSON sidecar - done in https://github.com/spinalcordtoolbox/manual-correction/pull/76/commits/bbfb6506d2a11cccc9d81402ca5b193a0007a26bValues to use in the JSON sidecars for the key Name
.
Proposed by @NathanMolinier:
"Name": "Manual"
"Name": "Quality Control"
Proposed by Jan:
"Name": "Manually corrected"
"Name": "Visually verified"
Regarding "Name": "Manually corrected"
I still think that using "Name": "Manual"
is a bit better to deal with both corrections and creations. Indeed, when we create labels from scratch having "Manually corrected" is for me a bit strange since the label was not corrected but "created". And having another Name such as "Manually created"
will lead to more confusion.
Also, I tested the PR to correct some labels and I think that we should add the field "SpatialReference" when not already present in the JSON sidecar.
Regarding
"Name": "Manually corrected"
I still think that using"Name": "Manual"
is a bit better to deal with both corrections and creations. Indeed, when we create labels from scratch having "Manually corrected" is for me a bit strange since the label was not corrected but "created". And having another Name such as"Manually created"
will lead to more confusion.
Great point! Agree! Changed to "Name": "Manual"
in https://github.com/spinalcordtoolbox/manual-correction/pull/76/commits/be73315cf6b30e4a0903c34811bc463b823dd20e
Also, I tested the PR to correct some labels and I think that we should add the field "SpatialReference" when not already present in the JSON sidecar.
Agree. Could you please implement this change and push to this branch?
I would go with the simplest approach: One value: "Manual". Unless there is a VERY good reason for distinguishing QC from manually corrected.
I would go with the simplest approach: One value: "Manual". Unless there is a VERY good reason for distinguishing QC from manually corrected.
By "Name": "Manual"
we meant that the label was manually corrected. While by "Name": "Quality Control"
we meant that the label was just visually controlled in HTML QC and considered correct (i.e. label was produced completely automatically, and no manual correction was required). This would help us to distinguish whether the label was generated fully automatically or whether manual intervention was required. Or do you think this type of information is not necessary?
This would help us to distinguish whether the label was generated fully automatically or whether manual intervention was required. Or do you think this type of information is not necessary?
that's exactly my point: how useful is that information?
my perspective is from someone managing 100+ projects over many years. In 5y from now, i imagine the scenario where a student would come in, and ignore the difference between "manual" and "visually qced", and put a wrong label. I prefer less label than wrong labels-- hence my go-for-simple-solution philosophy
Based on @jcohenadad's comment, I just removed the difference between visually checked and modified.
Also, I added a line to check if the field "SpatialReference"
is present or I just add it.
@NathanMolinier why did you remove the check_if_modified
function in https://github.com/spinalcordtoolbox/manual-correction/pull/76/commits/c8fad4ec964b2b6f3458b6371b3c94cadcda4612?
@NathanMolinier why did you remove the
check_if_modified
function in https://github.com/spinalcordtoolbox/manual-correction/pull/76/commits/c8fad4ec964b2b6f3458b6371b3c94cadcda4612?
Hey @valosekj ! From what Julien said I removed the code that was making a difference between a modified image and a checked image. Since this function was not used anymore I thought that I could remove it to avoid having dead code since it is still tracked by GitHub.
I could add it back if you want ?
From what Julien said I removed the code that was making a difference between a modified image and a checked image. Since this function was not used anymore I thought that I could remove it to avoid having dead code since it is still tracked by GitHub.
Yeah, this is a valid point, indeed. But now, without the check_if_modified
function, the script will update the JSON sidecar every time the label is opened.
Yes, but that's what we want I guess. The user intentionally added the filename to the YML config
Yes, but that's what we want I guess. The user intentionally added the filename to the YML config
Right. Okay, let's keep check_if_modified
removed. Can you please update unit tests to pass with your latest changes? I will then merge.
Yes, but that's what we want I guess. The user intentionally added the filename to the YML config
Right. Okay, let's keep
check_if_modified
removed. Can you please update unit tests to pass with your latest changes? I will then merge.
Yes sure !
Great, thanks @NathanMolinier! 👍🏻 Merging!
Updated description based on https://github.com/spinalcordtoolbox/manual-correction/pull/76#issuecomment-1939082475:
This PR adds new key-value pairs
SpatialReference': 'orig'
and'Name': 'Manual'
into JSON sidecars:The PR also removes the
check_if_modified
function; for context see https://github.com/spinalcordtoolbox/manual-correction/pull/76#issuecomment-1939147742.Original description
This PR proposes a new key-value pair `"Note"` to track if a label was only visually inspected or manually modified. To determine between these two scenarios, the already existing [`check_if_modified` function](https://github.com/spinalcordtoolbox/manual-correction/blob/7f20117654e6f1a602f144241171c46362ba89dc/manual_correction.py#L486) is levared. ## Scenario 1 If the label was only visually inspected but not modified, add `"Note": "Visually verified"` to the JSON file. Example: ```json { "GeneratedBy": [ { "Author": "Jan Valosek", "Note": "Visually verified", "Date": "2024-01-18 10:42:24" } ] } ``` ## Scenario 2 If the label was corrected, add `"Note": "Manually corrected"`: ```json { "GeneratedBy": [ { "Author": "Jan Valosek", "Note": "Manually corrected", "Date": "2024-01-18 10:42:24" } ] } ``` Relevant discussion: https://github.com/ivadomed/canproco/issues/73#issuecomment-1911206492