-
Notifications
You must be signed in to change notification settings - Fork 15
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
Image normalization #11
Comments
The image normalization settings are here: medical_mae/main_pretrain_multi_datasets_xray.py Lines 147 to 154 in 5744fa5
Could you please try it? |
In that notebook I used
|
For plotting, I think you need to denormalize the output with the used mean and std. |
matplotlib does its own linear normalization. The images should look the same with any mean and stdev adjustment. Do you think you can modify that notebook to get the normalization correct? |
Please refer to this function (I used for visualization before):
|
Also, with the VIT model using unpatchify I'm getting a patchy artifact and blurry reconstructions. |
Just uploaded a notebook for visualization. Please check https://github.com/lambert-x/medical_mae/blob/main/visualization.ipynb |
I'm working on running the models and I'm not sure about the image normalization. I have a notebook here that loads the MaskedAutoencoderCNN with the densenet121_CXR_0.3M_mae.pth weights and reconstructs an image. But the image does not appear reconstructed correctly. I've tried many normalizations but the area outside of the lungs appears blurry and the lungs appear reconstructed ok. Any idea what is wrong?
https://github.com/mlmed/torchxrayvision/blob/c44435011d97288e4af7d458dab95dc7ed6e6790/scripts/medical_mae_example.ipynb
Here is the PR to integrate it into torchxrayvision:
mlmed/torchxrayvision#150
The text was updated successfully, but these errors were encountered: