Skip to content
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

New training with tightly cropped data #67

Closed
jcohenadad opened this issue Feb 10, 2023 · 3 comments
Closed

New training with tightly cropped data #67

jcohenadad opened this issue Feb 10, 2023 · 3 comments

Comments

@jcohenadad
Copy link
Member

jcohenadad commented Feb 10, 2023

spin-off of #65

Stats on processed data
(base) p101317@rosenberg:~/data_nvme_p101317/data_seg_mp2rage_20230210_144231$ python ~/code/model_seg_ms_mp2rage/preprocessing/qc_preprocess.py -s .
Iterating over Subjects: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 283/283 [02:05<00:00,  2.26it/s]
RESOLUTIONS:  Counter({(1.0, 1.0, 1.0): 283})
SIZES:  Counter({(240, 256, 176): 283})
CROP SIZES:  Counter({(20, 88, 21): 3, (19, 89, 24): 2, (30, 94, 22): 2, (24, 98, 23): 2, (21, 77, 19): 2, (23, 86, 21): 2, (26, 98, 20): 2, (19, 91, 20): 2, (24, 101, 20): 2, (21, 93, 22): 2, (19, 94, 20): 2, (24, 83, 24): 2, (21, 97, 21): 2, (20, 96, 21): 2, (20, 104, 23): 2, (26, 95, 21): 2, (21, 102, 20): 2, (18, 99, 21): 2, (20, 78, 21): 1, (24, 108, 24): 1, (26, 102, 19): 1, (18, 98, 20): 1, (27, 105, 21): 1, (26, 94, 19): 1, (24, 92, 20): 1, (25, 107, 21): 1, (18, 108, 19): 1, (27, 105, 20): 1, (28, 78, 20): 1, (25, 105, 22): 1, (20, 81, 22): 1, (22, 93, 22): 1, (25, 88, 21): 1, (24, 77, 22): 1, (19, 81, 25): 1, (22, 93, 19): 1, (18, 96, 19): 1, (29, 94, 22): 1, (23, 104, 21): 1, (23, 106, 22): 1, (22, 85, 20): 1, (21, 88, 21): 1, (25, 92, 21): 1, (31, 100, 19): 1, (28, 91, 24): 1, (30, 98, 19): 1, (25, 97, 26): 1, (22, 102, 22): 1, (23, 100, 20): 1, (17, 83, 21): 1, (21, 92, 19): 1, (18, 90, 21): 1, (28, 103, 20): 1, (21, 86, 21): 1, (23, 89, 21): 1, (29, 94, 20): 1, (19, 93, 21): 1, (23, 97, 20): 1, (26, 108, 23): 1, (21, 90, 22): 1, (23, 78, 20): 1, (31, 107, 22): 1, (37, 100, 22): 1, (34, 88, 20): 1, (19, 86, 20): 1, (27, 88, 20): 1, (32, 102, 23): 1, (23, 75, 20): 1, (37, 86, 23): 1, (24, 91, 18): 1, (19, 91, 22): 1, (18, 92, 25): 1, (24, 95, 22): 1, (17, 93, 21): 1, (31, 89, 23): 1, (20, 93, 22): 1, (19, 88, 25): 1, (22, 90, 20): 1, (33, 102, 21): 1, (23, 91, 20): 1, (18, 94, 20): 1, (20, 96, 22): 1, (18, 79, 20): 1, (21, 85, 23): 1, (19, 106, 23): 1, (17, 101, 18): 1, (30, 97, 19): 1, (19, 104, 24): 1, (35, 125, 21): 1, (23, 76, 19): 1, (20, 86, 28): 1, (21, 101, 19): 1, (19, 83, 22): 1, (23, 93, 19): 1, (16, 83, 20): 1, (18, 90, 19): 1, (21, 83, 20): 1, (18, 98, 22): 1, (23, 93, 20): 1, (26, 86, 20): 1, (31, 94, 23): 1, (30, 115, 20): 1, (20, 91, 21): 1, (27, 96, 22): 1, (25, 91, 22): 1, (18, 93, 19): 1, (22, 96, 21): 1, (26, 83, 23): 1, (38, 101, 24): 1, (30, 94, 23): 1, (29, 108, 18): 1, (29, 113, 21): 1, (24, 84, 25): 1, (25, 92, 23): 1, (26, 98, 19): 1, (29, 89, 24): 1, (24, 101, 18): 1, (19, 98, 18): 1, (24, 73, 22): 1, (34, 94, 24): 1, (24, 84, 19): 1, (26, 97, 22): 1, (19, 105, 27): 1, (24, 99, 21): 1, (28, 99, 24): 1, (21, 100, 20): 1, (28, 83, 23): 1, (34, 88, 21): 1, (21, 88, 19): 1, (21, 78, 22): 1, (19, 95, 20): 1, (17, 96, 19): 1, (19, 93, 19): 1, (20, 101, 21): 1, (19, 69, 18): 1, (20, 84, 22): 1, (32, 95, 20): 1, (25, 101, 24): 1, (26, 86, 21): 1, (34, 83, 24): 1, (29, 75, 19): 1, (22, 84, 20): 1, (41, 85, 21): 1, (30, 91, 18): 1, (19, 89, 20): 1, (26, 89, 19): 1, (19, 89, 25): 1, (21, 99, 26): 1, (24, 99, 18): 1, (27, 65, 20): 1, (19, 93, 22): 1, (22, 88, 19): 1, (21, 89, 20): 1, (27, 91, 21): 1, (26, 96, 22): 1, (25, 116, 19): 1, (31, 97, 24): 1, (27, 97, 21): 1, (24, 94, 21): 1, (26, 88, 20): 1, (22, 95, 23): 1, (22, 99, 18): 1, (22, 102, 24): 1, (39, 98, 21): 1, (25, 103, 20): 1, (37, 104, 24): 1, (24, 74, 20): 1, (30, 96, 26): 1, (27, 99, 23): 1, (23, 102, 20): 1, (30, 80, 22): 1, (18, 102, 20): 1, (32, 106, 21): 1, (20, 97, 22): 1, (21, 107, 20): 1, (24, 97, 22): 1, (23, 92, 18): 1, (31, 99, 24): 1, (29, 102, 21): 1, (18, 87, 31): 1, (29, 109, 22): 1, (21, 99, 18): 1, (29, 83, 25): 1, (19, 84, 19): 1, (25, 109, 22): 1, (26, 69, 27): 1, (22, 70, 20): 1, (27, 106, 19): 1, (20, 96, 23): 1, (36, 93, 18): 1, (22, 95, 20): 1, (53, 91, 26): 1, (26, 92, 20): 1, (24, 92, 24): 1, (25, 102, 20): 1, (24, 99, 23): 1, (16, 76, 25): 1, (19, 90, 21): 1, (25, 99, 22): 1, (23, 101, 20): 1, (30, 74, 20): 1, (18, 89, 21): 1, (22, 85, 21): 1, (25, 89, 25): 1, (22, 103, 22): 1, (20, 88, 20): 1, (30, 92, 23): 1, (27, 106, 20): 1, (20, 95, 22): 1, (26, 91, 21): 1, (31, 86, 21): 1, (22, 101, 19): 1, (17, 87, 22): 1, (17, 100, 21): 1, (19, 90, 23): 1, (25, 88, 19): 1, (23, 97, 21): 1, (21, 100, 22): 1, (21, 95, 20): 1, (39, 75, 18): 1, (21, 99, 22): 1, (22, 81, 20): 1, (18, 87, 19): 1, (19, 89, 22): 1, (19, 107, 20): 1, (21, 98, 24): 1, (22, 85, 19): 1, (22, 85, 24): 1, (18, 99, 22): 1, (23, 96, 24): 1, (28, 99, 21): 1, (28, 95, 22): 1, (25, 96, 20): 1, (22, 96, 25): 1, (33, 93, 21): 1, (22, 94, 21): 1, (25, 93, 21): 1, (20, 91, 19): 1, (17, 101, 19): 1, (27, 91, 24): 1, (24, 96, 21): 1, (25, 95, 21): 1, (24, 106, 20): 1, (30, 91, 24): 1, (23, 84, 21): 1, (18, 88, 22): 1, (28, 106, 19): 1, (20, 97, 23): 1, (18, 96, 20): 1, (18, 75, 23): 1, (21, 87, 17): 1, (27, 105, 25): 1, (31, 97, 21): 1, (25, 91, 19): 1, (26, 86, 23): 1, (27, 81, 20): 1, (22, 96, 26): 1, (30, 104, 20): 1, (18, 94, 21): 1, (19, 87, 20): 1, (23, 84, 25): 1, (24, 85, 25): 1, (22, 92, 24): 1, (19, 96, 20): 1})
List of missing ground truth:  ['sub-C001', 'sub-C002', 'sub-C003', 'sub-C005', 'sub-C006', 'sub-C007', 'sub-C008', 'sub-C009', 'sub-C010', 'sub-C011', 'sub-C012', 'sub-C013', 'sub-C014', 'sub-C015', 'sub-C016', 'sub-C018', 'sub-C019', 'sub-C020', 'sub-C021', 'sub-C022', 'sub-C023', 'sub-C024', 'sub-C025', 'sub-C026', 'sub-C027', 'sub-C028', 'sub-C029', 'sub-C030', 'sub-C031', 'sub-C032', 'sub-C033', 'sub-C034', 'sub-C035', 'sub-C036', 'sub-C037', 'sub-C039', 'sub-C040', 'sub-C041', 'sub-C042', 'sub-C043', 'sub-C044', 'sub-C045', 'sub-C046', 'sub-C047', 'sub-C048', 'sub-C049', 'sub-C050', 'sub-C051', 'sub-C052', 'sub-C053', 'sub-C054', 'sub-C055', 'sub-C056', 'sub-C057', 'sub-C058', 'sub-C059', 'sub-C060', 'sub-C061', 'sub-C062', 'sub-C063', 'sub-C064', 'sub-C065', 'sub-C066', 'sub-C067', 'sub-C068', 'sub-C069', 'sub-C070', 'sub-C071', 'sub-C072', 'sub-C073', 'sub-C074', 'sub-C075', 'sub-C077', 'sub-C078', 'sub-C079', 'sub-C080', 'sub-C081', 'sub-C082', 'sub-C083', 'sub-C084', 'sub-C085', 'sub-C086', 'sub-C087', 'sub-C088', 'sub-C089', 'sub-C090', 'sub-C091', 'sub-C092', 'sub-C093', 'sub-C094', 'sub-C095', 'sub-C096', 'sub-C097', 'sub-C098', 'sub-C099', 'sub-C100', 'sub-C101', 'sub-C102', 'sub-C103', 'sub-C105', 'sub-C106', 'sub-C107', 'sub-C108']
Could not find cropped image for the following subjects:  []
Found shape mismatch in images and GTs for the following subjects:  []
ALERT: Lesion(s) from raters cropped during preprocessing for the following subjects:  ['sub-P027', 'sub-P047', 'sub-P075', 'sub-P130', 'sub-P153', 'sub-P241']

The cropped data size suggest that an appropriate CenterCrop is: 64x128x32, as currently used:

"CenterCrop": {"size": [32, 64, 128]},

Note
The swapped dimensions might be related to the reorientation of the image in ivadomed.

@jcohenadad
Copy link
Member Author

Interestingly, the tightly cropped data (in green) give lower performance:

image

@jcohenadad
Copy link
Member Author

jcohenadad commented Feb 10, 2023

Re-processing, this time with larger dilation (back to 32, in gray):

image

Results make sense with previous mask-dilation based cropping (orange curve).

jcohenadad added a commit that referenced this issue Feb 10, 2023
@jcohenadad
Copy link
Member Author

Closing because this is now fixed-- however there is still an issue about the sensitivity of the cropping window #64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant