DICOM Image Segmentation with CNNs in Tensorflow
Last updated Jan 6, 2026
95
Stars
29
Forks
0
Issues
0
Stars/day
Attention Score
15
Topics
Language breakdown
Jupyter Notebook 100.0%
โธ Files
click to expand
README
HealthCare
Project : Image Segmentation of Dicom Images to remove headrest label from head CT scansPlease give a :star: if you like my work.:alien:
Description
- Programming Language - Python2.7, Jupyter, Tensorflow - Task: Remove Headrest from all the scans of patient given in dicom format using Convolutional Neural Networks by Image Segmentation
Data Preprocessing
- Reading Dicom Images from pydicom package and store image in numpy arrays. - Converting raw grayscaled images stored in Hounsfield Units into meaningful numpy arrays for CNNs by rescaling them using slope and threshold taken from dicom image header. Below is the example of Hounsfield units histogram representation before scaling of a dicom image.





Building CNNs
- Input Image of 512 * 512 greyscaled images of head CT scans. - Output - Segmented label for Headrest - Built different models: - 3 Layer - 2 Convolutional/Deconvolutional in each layer - 2 Max pooling - "VALID" padding (size not same of output) - 7 Layer - 2 Convolutional/Deconvolutional (First 3 layers), 4 (Next 3 layers), 8(Last layer) - 6 pooling and upsampling layers - "SAME" padding (Final model used for predicting images.) Here is the architecture of convolutional neural network model:
Results & Visualization
- Achieved accuracy above 99% in Image segmentation of 500 dicom images. Here is one example of one test image.

๐ More in this category