SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

Similar a Covid-19 Segmentation of Lung CT images.pptx

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 MammogramsIOSRjournaljce
 
maXbox starter65 machinelearning3
maXbox starter65 machinelearning3maXbox starter65 machinelearning3
maXbox starter65 machinelearning3Max Kleiner
 
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...Dataconomy Media
 
29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptx29-kashyap-mask-detaction.pptx
29-kashyap-mask-detaction.pptxKASHYAPPATHAK7
 
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.pdfanilagarwal8880432
 
Liver segmentationwith2du net
Liver segmentationwith2du netLiver segmentationwith2du net
Liver segmentationwith2du netAmrCady
 
Machine Learning - Introduction
Machine Learning - IntroductionMachine Learning - Introduction
Machine Learning - IntroductionEmpatika
 
maXbox starter68 machine learning VI
maXbox starter68 machine learning VImaXbox starter68 machine learning VI
maXbox starter68 machine learning VIMax Kleiner
 
Machine Learning Algorithms
Machine Learning AlgorithmsMachine Learning Algorithms
Machine Learning AlgorithmsHichem Felouat
 
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[T]echdencias
 
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"Fwdays
 
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 PythonKevin Keraudren
 
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).pdfssuserb4d806
 
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 ImagesIRJET Journal
 
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
 
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 CORRELATIONijcsit
 
Week2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxWeek2- Deep Learning Intuition.pptx
Week2- Deep Learning Intuition.pptxfahmi324663
 

Similar a 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
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[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.pdfhans926745
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

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