-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naming convention for adding new contrasts to the training set #102
Comments
If it is under labels_softseg_bin, the name softseg is not the right one, you can check in spine generic data multi subject in my branch the name convention we decided I would go with C-A version since the 2.0 is not in sct, is that right? |
Right, I checked and updated folder structure in my comment! The filenames are like this now:
Correct, it's not in SCT. The |
Maybe we should create a release (like v.1?) |
For
|
Thanks @Nilser3 for your JSON example! I think I will go with @sandrinebedard Sure, we can create a new release |
The field "Name" is missing in this example. From where the second step was generated ? @Nilser3 |
Thanks for the feedback @NathanMolinier {
"SpatialReference": "orig",
"GeneratedBy": [
{
"Name": "contrast-agnostic-softseg-spinalcord",
"Version": "2.0"
},
{
"Name": "Manual",
"Author": "Nilser Laines Medina",
"Date": "2023-12-14",
"Note": "Binarised spinal cord soft segmentation"
}
]
} |
Just a nitpick, we concluded here that we should use |
Just out of curiosity, did you really binarize manually ? Or did you use a custom script doing thresholding ? |
was binarized but, I think I will remove this "Note" , because I will generate again these SC masks with the last version of |
You should then specify the method {
"SpatialReference": "orig",
"GeneratedBy": [
{
"Name": "contrast-agnostic-softseg-spinalcord",
"Version": "2.0"
},
{
"Name": "sct_maths",
"Param": "-thr 0.8",
"Version": "SCT v6.2",
"Note": "Binarised spinal cord soft segmentation"
}
]
} |
It's pretty cool that you can directly define the json dict and code snippetdate_time=$(date +"%Y-%m-%d %H:%M:%S")
json_dict='{
"GeneratedBy": [
{
"Name": "contrast-agnostic-softseg-spinalcord",
"Version": "2.1",
"Date": "'$date_time'"
}
]
}'
PATH_DATA_PROCESSED_CLEAN="${PATH_DATA_PROCESSED}_clean"
# create new folder and copy only the predictions
mkdir -p ${PATH_DATA_PROCESSED_CLEAN}/derivatives/labels_softseg_bin/${SUBJECT}/anat
rsync -avzh ${file}_seg_monai.nii.gz ${PATH_DATA_PROCESSED_CLEAN}/derivatives/labels_softseg_bin/${SUBJECT}/anat/${file}_desc-softseg_label-SC_seg.nii.gz
rsync -avzh ${file}_seg-manual.json ${PATH_DATA_PROCESSED_CLEAN}/derivatives/labels_softseg_bin/${SUBJECT}/anat/${file}_desc-softseg_label-SC_seg.json
# create json file
echo $json_dict > ${PATH_DATA_PROCESSED_CLEAN}/derivatives/labels_softseg_bin/${SUBJECT}/anat/${file}_desc-softseg_label-SC_seg.json
# re-save json files with indentation
python -c "import json;
json_file = '${PATH_DATA_PROCESSED_CLEAN}/derivatives/labels_softseg_bin/${SUBJECT}/anat/${file}_desc-softseg_label-SC_seg.json'
with open(json_file, 'r') as f:
data = json.load(f)
json.dump(data, open(json_file, 'w'), indent=4)
" contents of json file
|
I am working on adding new datasets/contrasts to augment the existing spine-generic dataset. I wanted to clarify/confirm a few things about the naming conventions to be used for the outputs derived from the contrast agnostic model (which will be used for training)
Example folder structure for `basel-mp2rage`
Contents of the json file
Issue is that the model currently in
SCT v6.2
is the originalsoft
model trained on soft GTs. But, the model I will be use for inference and training with new contrasts is thesoft_bin
model.EDIT: updated the filename for
labels_softseg_bin
The text was updated successfully, but these errors were encountered: