สมมติว่าอยู่ดี ๆ เราก็หายใจลำบาก หอบตัวโยน โดยไม่มีสาเหตุ ไม่มีอาการล่วงหน้าใด ๆ หรือว่าเราจะเป็น ภาวะปอดรั่ว ใน ep นี้ เราจะมาใช้ Machine Learning และ Deep Neural Network พัฒนาโปรแกรม AI การแพทย์ ช่วยวินิจฉัยภาวะปอดรั่ว หรือ Pneumothorax นี้กัน

Pneumothorax หรือ ภาวะปอดรั่ว คืออะไร

Illustration depicting a collapsed lung or pneumothorax. Credit https://en.wikipedia.org/wiki/File:Blausen_0742_Pneumothorax.png
Illustration depicting a collapsed lung or pneumothorax. Credit https://en.wikipedia.org/wiki/File:Blausen_0742_Pneumothorax.png

Pneumothorax หรือ ภาวะปอดรั่ว คือการที่มีอากาศรั่วไหลเข้าไปอยู่ในช่องระหว่างปอด และ ผนังอกด้านใน ทำให้เบียดเนื้อปอดให้ขยายตัวได้ไม่เต็มที่ ปอดทำงานได้ไม่ดี ส่งผลต่อการหายใจ ภาวะปอดรั่วนี้ต้องได้รับการดูแลจากแพทย์โดยด่วน หากปล่อยไว้จะเป็นอันตรายถึงแก่ชีวิตได้

Pneumothorax หรือ ภาวะปอดรั่ว เกิดจากอะไร

Right-sided pneumothorax (right side of image) on CT scan of the chest with chest tube in place. Credit https://en.wikipedia.org/wiki/File:Pneumothorax_CT.jpg
Right-sided pneumothorax (right side of image) on CT scan of the chest with chest tube in place. Credit https://en.wikipedia.org/wiki/File:Pneumothorax_CT.jpg

Pneumothorax หรือ ภาวะปอดรั่ว เป็นภาวะที่พบได้ในอุบัติเหตุที่มีการกระแทกบริเวณหน้าอก มีลมซึมเข้ามาจากภายนอกทรวงอก หรือเกิดขึ้นเองจากการติดเชื้อภายใน โรคเกี่ยวกับปอด หอบหืด มะเร็งปอด etc.

การวินิจฉัย Pneumothorax หรือ ภาวะปอดรั่ว

Pneumothorax Overlay. Credit https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation/
Pneumothorax Overlay. Credit https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation/

Pneumothorax หรือ ภาวะปอดรั่ว มักจะถูกวินิจฉัยโดย Radiologist (รังสีแพทย์ / แพทย์รังสีวิทยา) เป็นผู้อ่านฟิล์ม X-Ray เป็นหลัก แต่บางครั้งก็เป็นการยากที่จะยืนยันว่าผู้ป่วยเป็นภาวะปอดรั่วจริง ๆ จากการเอกซเรย์ทรวงอกเพียงอย่างเดียว บางทีอาจต้องใช้วิธีการตรวจอื่น ๆ ร่วมด้วย เช่น CT Scan, ฟังเสียงหายใจ และ ตรวจเลือดเพื่อวัดระดับออกซิเจนในเลือด

AI การแพทย์ ช่วยวิจิฉัยภาวะปอดรั่ว (Pneumothorax)

AI Diagnose Pneumothorax. Credit https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation/
AI Diagnose Pneumothorax. Credit https://www.kaggle.com/c/siim-acr-pneumothorax-segmentation/

AI การแพทย์เฉพาะทาง ช่วยวิจิฉัยภาวะปอดรั่ว (Pneumothorax) อย่างแม่นยำ จะเป็นประโยชน์อย่างมาก ในการช่วยคัดแยกผู้ป่วย ในสถานพยาบาล ช่วย Radiologist (รังสีแพทย์ / แพทย์รังสีวิทยา) จัดลำดับความสำคัญตามอาการมากน้อย

หรือเป็นเครื่องมือช่วยในการวินิจฉัยเบื้องต้น สำหรับบุคลากรทางการแพทย์ที่ไม่ใช่ Radiologist (รังสีแพทย์ / แพทย์รังสีวิทยา) กรณีบุคลากรไม่เพียงพอ เพื่อเพิ่มอัตราการรอดชีวิตของผู้ป่วย

Model Architecture

U-Net architecture. Credit https://arxiv.org/abs/1505.04597
U-Net architecture. Credit https://arxiv.org/abs/1505.04597

Model Architecture เหมือน Image Segmentation ep.1 คือ U-Net โดยใช้ Pretrained ResNet34 เป็น Encoder และเทรนด้วย Progressive Resizing

Dice Coefficient

Metric ที่เราจะใช้ใน ep นี้ คือ Dice Score หรือ Sørensen–Dice coefficient เป็นการคำนวนสถิติที่ใช้วัดค่าความเหมือนกัน ของ 2 ข้อมูลตัวอย่าง ดังสมการด้านล่าง Dice Coefficient มีอีกชื่อหนึ่ง คือ F1 Score

รายละเอียดเพิ่มเติมใน ep Metrics / Confusion Matrix

\( DSC = \frac{2 |X \cap Y|}{|X|+ |Y|} = \frac{2 TP}{2 TP + FP + FN} \)

Dice Metric ค่อนข้าง ใกล้เคียงกับ Intersection-Over-Union (IoU, Jaccard Index) จะอธิบายต่อไป

เรามาเริ่มกันเลยดีกว่า

Open In Colab

แชร์ให้เพื่อน:

Surapong Kanoktipsatharporn on FacebookSurapong Kanoktipsatharporn on LinkedinSurapong Kanoktipsatharporn on Rss
Surapong Kanoktipsatharporn
Solutions Architect at Bua Labs
The ultimate test of your knowledge is your capacity to convey it to another.

Published by Surapong Kanoktipsatharporn

The ultimate test of your knowledge is your capacity to convey it to another.