SlideShare ist ein Scribd-Unternehmen logo
1 von 13
COVID-19 lung CT image segmentation
B y :
S w a p n a Ta l l a
1
Agenda
Segmentation Process
Dataset Description
Methods
Visualization of CT Image
Normalization & Splitting Data
Model Creation
Model Compilation and Evaluation
Conclusion
2
Segmentation
Process
Loading the Dataset
Preprocessing the data
Data Splitting
Model Creation(U-Net)
Model Compilation
Model Evaluation
Model Inference
3
Dataset
It consists of two parts:
Medseg part:
images_medseg.npy - training images – 100 slices 512x512 size
masks_medseg.npy - training masks – 100 masks with 4 channels: (0
- "ground glass", 1 - "consolidations", 2 - "lungs other", 3 -
"background" )
test_images_medseg.npy - test images – 10 slices 512x512 size
Radiopedia part:
images_radiopsedia.npy - training images – 829 slices 512x512 size
masks_radiopedia.npy - training masks – 829 masks with 4
channels: (0 - "ground glass", 1 - "consolidations", 2 - "lungs other", 3
- "background" )
4
Methods
U-Net Architecture:
Images were segmented by a radiologist using 3 labels: ground-glass
(mask value =1), consolidation (=2) and pleural effusion (=3).
Hyperparameter Tuning:
 Size of the Conv2D layers' filters (3x3)
 Filter count in Conv2D layers (32, 64, 128, 256, 512)
 Conv2DTranspose layers' stride size, for instance in (2, 2)
 Activation Function, "relu"
 padding ( "same")
5
Random CT Image
Visualization(medseg)
# Choose a random image and its mask to
visualize
idx = 0 # index of the image you want to v
isualize
image = images_medseg[idx, :, :, 0]
mask = masks_medseg[idx, :, :, 0]
fig, axs = plt.subplots(1, 3, figsize=(20, 10
))
axs[0].imshow(image, cmap='gray')
axs[0].set_title('CT Image')
axs[1].imshow(mask, cmap='gray')
axs[1].set_title('GGO')
axs[2].imshow(masks_medseg[idx, :, :, 1],
cmap='gray')
axs[2].set_title('Consolidations')
plt.show()
6
Random CT Image
Visualization(Radiopedia)
# Visualizing the data
# Plot an example image and its corre
sponding mask
idx = 30 # index of the image you w
ant to visualize
image = images_radiopedia[idx, :, :,
0]
mask = masks_radiopedia[idx, :, :, 1]
fig, axs = plt.subplots(1, 3, figsize=(2
0, 10))
axs[0].imshow(image, cmap='gray')
axs[0].set_title('Image')
axs[1].imshow(masks_radiopedia[idx
, :, :, 0], cmap='gray')
axs[1].set_title('GGO')
axs[2].imshow(mask, cmap='gray')
axs[2].set_title('Consolidations')
plt.show()
7
Normalization & Splitting Data
# Normalize images to [0, 1] range
images_medseg = (images_medseg -
np.min(images_medseg)) / (np.max(images_medseg) -
np.min(images_medseg))
images_radiopedia = (images_radiopedia -
np.min(images_radiopedia)) / (np.max(images_radiopedia) -
np.min(images_radiopedia))
test_images_medseg = (test_images_medseg -
np.min(test_images_medseg)) / (np.max(test_images_medseg) -
np.min(test_images_medseg))
# Split the data into training, validation, and testing sets
x_train = images_radiopedia
y_train = masks_radiopedia
x_val = images_medseg
y_val = masks_medseg
8
Model
Creation(U-Net)
9
Model Compile and
Evaluation
# Model Compile
model.compile(optimizer='adam', loss='binary_cr
ossentropy', metrics=['accuracy'])
10
# Model Evaluation
history = unet_model.fit(x_train, y_trai
n, batch_size=32, epochs=10, validatio
n_data=(x_val, y_val))
11
Conclusion
• In computer vision, image
segmentation is a very beneficial
process that may be used in a range
of use-cases, including medical
imaging and driverless cars, to
collect various segments or classes
in real-time. One can now
experiment with utilizing U-Net to
implement image segmentation on
various challenges or by
investigating other models that are
helpful in image segmentation.
12
Thank you
13

Weitere ähnliche Inhalte

Ähnlich wie Covid-19 Segmentation of Lung CT images.pptx

What is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdfWhat is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdf
anilagarwal8880432
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
ssuserb4d806
 
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
iosrjce
 

Ähnlich wie Covid-19 Segmentation of Lung CT images.pptx (20)

An Efficient System for Cancer Detection using Digital Mammograms
An Efficient System for Cancer Detection using Digital MammogramsAn Efficient System for Cancer Detection using Digital Mammograms
An Efficient System for Cancer Detection using Digital Mammograms
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3
 
DN 2017 | Multi-Paradigm Data Science - On the many dimensions of Knowledge D...
DN 2017 | Multi-Paradigm Data Science - On the many dimensions of Knowledge D...DN 2017 | Multi-Paradigm Data Science - On the many dimensions of Knowledge D...
DN 2017 | Multi-Paradigm Data Science - On the many dimensions of Knowledge D...
 
29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptx29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptx
 
Eigenfaces
EigenfacesEigenfaces
Eigenfaces
 
What is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdfWhat is the UML Class diagram for accident detection using CNN- i have.pdf
What is the UML Class diagram for accident detection using CNN- i have.pdf
 
Liver segmentationwith2du net
Liver segmentationwith2du netLiver segmentationwith2du net
Liver segmentationwith2du net
 
Machine Learning - Introduction
Machine Learning - IntroductionMachine Learning - Introduction
Machine Learning - Introduction
 
maXbox starter68 machine learning VI
maXbox starter68 machine learning VImaXbox starter68 machine learning VI
maXbox starter68 machine learning VI
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning Algorithms
 
Primer vistazo al computer vision | 4Sessions Feb17
Primer vistazo al computer vision | 4Sessions Feb17Primer vistazo al computer vision | 4Sessions Feb17
Primer vistazo al computer vision | 4Sessions Feb17
 
Denis Sergienko "Pip install driven deep learning"
Denis Sergienko "Pip install driven deep learning"Denis Sergienko "Pip install driven deep learning"
Denis Sergienko "Pip install driven deep learning"
 
PyData London 2015 - Localising Organs of the Fetus in MRI Data Using Python
PyData London 2015 - Localising Organs of the Fetus in MRI Data Using PythonPyData London 2015 - Localising Organs of the Fetus in MRI Data Using Python
PyData London 2015 - Localising Organs of the Fetus in MRI Data Using Python
 
AIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdfAIML4 CNN lab256 1hr (111-1).pdf
AIML4 CNN lab256 1hr (111-1).pdf
 
Brain Tumor Detection and Classification Using MRI Brain Images
Brain Tumor Detection and Classification Using MRI Brain ImagesBrain Tumor Detection and Classification Using MRI Brain Images
Brain Tumor Detection and Classification Using MRI Brain Images
 
F017614146
F017614146F017614146
F017614146
 
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
An Efficient Approach of Segmentation and Blind Deconvolution in Image Restor...
 
FUZZY IMAGE SEGMENTATION USING VALIDITY INDEXES CORRELATION
FUZZY IMAGE SEGMENTATION USING VALIDITY INDEXES CORRELATIONFUZZY IMAGE SEGMENTATION USING VALIDITY INDEXES CORRELATION
FUZZY IMAGE SEGMENTATION USING VALIDITY INDEXES CORRELATION
 
Dip 3
Dip 3Dip 3
Dip 3
 
Week2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxWeek2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptx
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Covid-19 Segmentation of Lung CT images.pptx

  • 1. COVID-19 lung CT image segmentation B y : S w a p n a Ta l l a 1
  • 2. Agenda Segmentation Process Dataset Description Methods Visualization of CT Image Normalization & Splitting Data Model Creation Model Compilation and Evaluation Conclusion 2
  • 3. Segmentation Process Loading the Dataset Preprocessing the data Data Splitting Model Creation(U-Net) Model Compilation Model Evaluation Model Inference 3
  • 4. Dataset It consists of two parts: Medseg part: images_medseg.npy - training images – 100 slices 512x512 size masks_medseg.npy - training masks – 100 masks with 4 channels: (0 - "ground glass", 1 - "consolidations", 2 - "lungs other", 3 - "background" ) test_images_medseg.npy - test images – 10 slices 512x512 size Radiopedia part: images_radiopsedia.npy - training images – 829 slices 512x512 size masks_radiopedia.npy - training masks – 829 masks with 4 channels: (0 - "ground glass", 1 - "consolidations", 2 - "lungs other", 3 - "background" ) 4
  • 5. Methods U-Net Architecture: Images were segmented by a radiologist using 3 labels: ground-glass (mask value =1), consolidation (=2) and pleural effusion (=3). Hyperparameter Tuning:  Size of the Conv2D layers' filters (3x3)  Filter count in Conv2D layers (32, 64, 128, 256, 512)  Conv2DTranspose layers' stride size, for instance in (2, 2)  Activation Function, "relu"  padding ( "same") 5
  • 6. Random CT Image Visualization(medseg) # Choose a random image and its mask to visualize idx = 0 # index of the image you want to v isualize image = images_medseg[idx, :, :, 0] mask = masks_medseg[idx, :, :, 0] fig, axs = plt.subplots(1, 3, figsize=(20, 10 )) axs[0].imshow(image, cmap='gray') axs[0].set_title('CT Image') axs[1].imshow(mask, cmap='gray') axs[1].set_title('GGO') axs[2].imshow(masks_medseg[idx, :, :, 1], cmap='gray') axs[2].set_title('Consolidations') plt.show() 6
  • 7. Random CT Image Visualization(Radiopedia) # Visualizing the data # Plot an example image and its corre sponding mask idx = 30 # index of the image you w ant to visualize image = images_radiopedia[idx, :, :, 0] mask = masks_radiopedia[idx, :, :, 1] fig, axs = plt.subplots(1, 3, figsize=(2 0, 10)) axs[0].imshow(image, cmap='gray') axs[0].set_title('Image') axs[1].imshow(masks_radiopedia[idx , :, :, 0], cmap='gray') axs[1].set_title('GGO') axs[2].imshow(mask, cmap='gray') axs[2].set_title('Consolidations') plt.show() 7
  • 8. Normalization & Splitting Data # Normalize images to [0, 1] range images_medseg = (images_medseg - np.min(images_medseg)) / (np.max(images_medseg) - np.min(images_medseg)) images_radiopedia = (images_radiopedia - np.min(images_radiopedia)) / (np.max(images_radiopedia) - np.min(images_radiopedia)) test_images_medseg = (test_images_medseg - np.min(test_images_medseg)) / (np.max(test_images_medseg) - np.min(test_images_medseg)) # Split the data into training, validation, and testing sets x_train = images_radiopedia y_train = masks_radiopedia x_val = images_medseg y_val = masks_medseg 8
  • 10. Model Compile and Evaluation # Model Compile model.compile(optimizer='adam', loss='binary_cr ossentropy', metrics=['accuracy']) 10
  • 11. # Model Evaluation history = unet_model.fit(x_train, y_trai n, batch_size=32, epochs=10, validatio n_data=(x_val, y_val)) 11
  • 12. Conclusion • In computer vision, image segmentation is a very beneficial process that may be used in a range of use-cases, including medical imaging and driverless cars, to collect various segments or classes in real-time. One can now experiment with utilizing U-Net to implement image segmentation on various challenges or by investigating other models that are helpful in image segmentation. 12