Comments (7)
@Eurus-Holmes
@pervinh
Hi, I save the predicted mask as nii format and then visualize it with ITK-SNAP software. The code is as follows:
import nibabel
vis_data = nibabel.Nifti1Image(np.array(mask).astype(np.float32), np.eye(4))
nibabel.save(vis_data, "mask_vis.nii.gz")
from medicalnet.
We visualized the segmentation results by ITK-SNAP software.
from medicalnet.
oh, I see, but in your code test.py
, it seems you don't save the predicted mask images?
from medicalnet.
Hi, I have the same problem too. How can i save segmentation results as nifti files?
from medicalnet.
@cshwhale
Thank you, this worked
from medicalnet.
@cshwhale Thanks!
from medicalnet.
@Eurus-Holmes
@pervinh
Hi, I save the predicted mask as nii format and then visualize it with ITK-SNAP software. The code is as follows:
import nibabel
vis_data = nibabel.Nifti1Image(np.array(mask).astype(np.float32), np.eye(4))
nibabel.save(vis_data, "mask_vis.nii.gz")
Hi,
in order to register the predicted mask with the data & label, does it make sense to obtain a "target_affine" from the data, and replace the "np.eye(4)" in SH's code with this "target_affine"?
I obtained the "target_affine" by inserting the following 2 lines next to https://github.com/Tencent/MedicalNet/blob/25ba32573f281646f8a3d15f096d017de615ee3a/test.py#L62
data = nib.load(os.path.join(sets.data_root, img_names[batch_id]))
target_affine = data.affine
Thanks,
Wei
from medicalnet.
Related Issues (20)
- The dataset list of 23 datasets for the pre-trained model HOT 1
- Landmark detection in 3D point clouds
- Starting experiments with MedicalNet; question one: what are parameters --input_D, --input_H, --input_W? HOT 2
- Sharing models through Hugging Face Hub
- Cannot load checkpoints
- on which datasets the models are pretrained ? HOT 1
- Is there any classification code ?
- Contribution to the Open Source Hugging Face community.
- resent 50pth HOT 2
- SRS
- If I want to transfer to my own dataset, do I have to preprocess my data in the same way as you mentioned in your paper?
- Pre-trained models' results
- Project dependencies may have API risk issues
- Classification code with modification of train.py and datasets/brains18.py HOT 17
- Query: Can this be used to identify Chronic Kidney Diseases with Ultrasound scans?
- How to get the pretrained model
- Utilizing resnet_50.pth for 3D Feature Map Extraction HOT 3
- Integrating Labeled Image Features with Excel Input Variables Through Dense Layer Concatenation
- pretrian code
- Shortcut A
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from medicalnet.