Closed Duplums closed 1 year ago
Hello @Duplums, thanks for raising this issue. I think it was due to the current code relying on in-place modifications of metadata
rather than out-of-place. I've opened PR #310. Could you review it and see if it solves your issue?
Somewhat related to the previous issue, I also noticed that some "y" annotations have negative values (-1) because the way they are computed is wrong (line 579 in mri_data.py
):
...
"y": 320 - int(row.y) - int(row.height) - 1,
...
When row.y == 320 - row.height, this is equal to -1 (e.g. file1000307.h5 in knee dataset, slice 37). Here the correct computation is:
"y": 320 - int(row.y) - int(row.height),
Bests
Hello @Duplums, could you let me know which sample this is? When I run the following:
print(annotations_csv["y"].max())
the output is 280.0
.
Edit: sorry, I don't think I read carefully, looking into this.
Hello @Duplums, could you look at PR #311? I modified the calculation to your format. I also simplified the overall annotation code and removed the hardcoded 320, changing it to use the image size from the metadata.
Closing as #311 is merged.
AnnotatedSliceDataset
handlesmetadata
attribute fromSliceDataset
to add specific annotations for each slice. However, currentlymetadata
is a Pythondict
shared across all slices from the same subject. Hence, currently all slices share the same annotations inAnnotatedSliceDataset
. This is not expected and it should not be the case since different slices have distinct annotations.A simple example to reproduce: