Pneumonia หรือ โรคปอดอักเสบเรื้อรัง ปอดบวม เป็นโรคที่พบได้ประมาณร้อยละ 8-10 ของผู้ป่วยที่มีการติดเชื้อเฉียบพลันระบบหายใจ นับเป็นสาเหตุการตายอันดับหนึ่งของโรคติดเชื้อในเด็กอายุต่ำกว่า 5 ปี เกิดจากสาเหตุหลัก 2 กลุ่ม คือ ปอดอักเสบที่เกิดจากการติดเชื้อและปอดอักเสบที่ไม่ได้เกิดจากการติดเชื้อ ถ้าเราสามารถพัฒนาระบบ AI ช่วยวินิจฉัยโรคเบื้องต้น จำแนกชนิดของโรค Pneumonia จะมีประโยชน์ในการวินิจฉัย และดูแลรักษาตั้งแต่แรก

Pneumonia คืออะไร

Figure A shows the location of the lungs and airways in the body. This figure also shows pneumonia affecting the lower lobe of the left lung. Figure B shows normal alveoli. Figure C shows infected alveoli. Credit https://commons.wikimedia.org/wiki/File:Lobar_pneumonia_illustrated.jpg
Figure A shows the location of the lungs and airways in the body. This figure also shows pneumonia affecting the lower lobe of the left lung. Figure B shows normal alveoli. Figure C shows infected alveoli. Credit https://commons.wikimedia.org/wiki/File:Lobar_pneumonia_illustrated.jpg

ปอดอักเสบจากการติดเชื้อ หรือ pneumonia (ปอดบวม) เป็นโรคที่เกิดจากการอักเสบของเนื้อปอดบริเวณหลอดลมฝอยส่วนปลาย (terminal และ respiratory bronchiole) ถุงลม (alveoli) และเนื้อเยื่อรอบถุงลม (interstitium เป็นชนิดของปอดอักเสบที่พบได้บ่อยที่สุด โดยเชื้อโรคที่เข้าสู่ปอดและทำให้เกิดการอักเสบของถุงลมปอดและเนื้อเยื่อโดยรอบ ได้แก่ เชื้อไวรัส เชื้อแบคทีเรีย และเชื้อรา

Streptococcus pneumoniae bacteria causes meningitis. Credit https://commons.wikimedia.org/wiki/File:Streptococcus_pneumoniae_-_A_causative_bacteria_of_meningitis.jpg
Streptococcus pneumoniae bacteria causes meningitis. Credit https://commons.wikimedia.org/wiki/File:Streptococcus_pneumoniae_-_A_causative_bacteria_of_meningitis.jpg

ซึ่งเชื้อที่พบจะแตกต่างกันในแต่ละกลุ่มอายุ และสภาพแวดล้อมที่เกิดโรค เป็นโรคที่พบได้ประมาณร้อยละ 8-10 ของผู้ป่วยที่มีการติดเชื้อเฉียบพลันระบบหายใจ นับเป็นสาเหตุการตายอันดับหนึ่งของโรคติดเชื้อในเด็กอายุต่ำกว่า 5 ปี เช่น ได้รับเชื้อจากที่ชุมชนทั่วไป หรือจากภายในโรงพยาบาล

Scanning Electron Micrograph of Streptococcus pneumoniae. Pneumococcus, Streptococci. Credit https://en.wikipedia.org/wiki/File:Streptococcus_pneumoniae.jpg
Scanning Electron Micrograph of Streptococcus pneumoniae. Pneumococcus, Streptococci. Credit https://en.wikipedia.org/wiki/File:Streptococcus_pneumoniae.jpg

ทั้งนี้ เชื้อแบคทีเรียที่พบมักได้แก่ เชื้อ Streptococcus pneumoniae, เชื้อ Haemophilus influenzae type b, เชื้อ Chlamydia pneumoniae, เชื้อ Legionella spp. และเชื้อ Mycoplasma pneumoniae ส่วนเชื้อไวรัส ได้แก่ เชื้อ Respiratory Syncytial Virus (RSV), เชื้อ Influenza หรือเชื้อไข้หวัดใหญ่ และเชื้อราจากมูลนกหรือซากพืชซากสัตว์

Right middle lobe pneumonia in a child Credit https://en.wikipedia.org/wiki/File:RtPneuKidMark.png
Right middle lobe pneumonia in a child Credit https://en.wikipedia.org/wiki/File:RtPneuKidMark.png

วิธีการติดต่อ จากการสำลักเชื้อที่สะสมรวมกลุ่มอยู่บริเวณทางเดินหายใจส่วนบน (upper airway colonization) เชื้อแบคทีเรียส่วนใหญ่ทำให้เกิดปอดอักเสบในชุมชนและปอดอักเสบในโรงพยาบาลจากการสำลักเชื้อที่สะสมรวมกันอยู่บริเวณหลอดคอ (oropharyngeal aspiration) ลงไปสู่เนื้อปอด เช่นสำลักน้ำลาย อาหาร หรือสารคัดหลั่งในทางเดินอาหาร หากในระยะนั้นผู้ป่วยมีร่างกายอ่อนแอ มีการติดเชื้อของทางเดินหายใจส่วนบน เป็นผู้สูงอายุ หรือมีโรคเรื้อรังทางอายุรกรรมร่วมด้วยก็จะทำให้เกิดปอดอักเสบได้

Pneumonia Oxygen unable to reach blood stream. Credit https://commons.wikimedia.org/wiki/File:New_Pneumonia_cartoon.png
Pneumonia Oxygen unable to reach blood stream. Credit https://commons.wikimedia.org/wiki/File:New_Pneumonia_cartoon.png

หรือการหายใจนำเชื้อเข้าสู่ปอดโดยตรง การสูดหายใจเอาเชื้อที่อยู่ในอากาศในรูปละอองฝอยขนาดเล็ก (droplet nuclei) เป็นวิธีสำคัญที่ทำให้เกิดปอดอักเสบจากเชื้อกลุ่ม atypical organisms เชื้อไวรัส เชื้อวัณโรค และเชื้อรา จึงทำให้เกิดการแพร่ระบาดของเชื้อเหล่านี้ได้ง่ายในกลุ่มคนที่อยู่รวมกัน โดยเฉพาะครอบครัว ชั้นเรียน ห้องทำงาน สถานรับเลี้ยงเด็กก่อนวัยเรียน โรงแรม หอพัก กองทหาร ค่ายผู้อพยพ คุก หรือในบริเวณที่มีคนอยู่แออัด

Main symptoms of infectious pneumonia. Credit https://commons.wikimedia.org/wiki/File:Symptoms_of_pneumonia.svg
Main symptoms of infectious pneumonia. Credit https://commons.wikimedia.org/wiki/File:Symptoms_of_pneumonia.svg

อาการของ Pneumonia หรือ โรคปอดอักเสบเรื้อรัง ปอดบวม ได้แก่ ไข้ ไอ หายใจเร็วอาจมีอาการหอบ หายใจลำบาก มี chest retraction, nasal flaring หรือ อาการอื่นๆของภาวะหัวใจล้มเหลว ฟังเสียงปอดอาจได้ยินเสียงกรอบแกรบ (tine or medium crepitations) อาจได้ยินเสียง rhonchi ร่วมด้วย ในกรณีที่พยาธิสภาพเป็นแบบ consolidation อาจได้ยินเสียง bronchial breath sound มีอาการแสดงอื่นๆที่ไม่จำเพาะ เช่น ท้องอืด อาเจียน ซึมโดยเฉพาะเด็กเล็ก

Illustrative Examples of Chest X-Rays in Patients with Pneumonia. Credit https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia
Illustrative Examples of Chest X-Rays in Patients with Pneumonia. Credit https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia

การวินิจฉัย Pneumonia หรือ โรคปอดอักเสบเรื้อรัง ปอดบวม จากอาการแสดงคือ ไข้ ไอ หายใจเร็ว ร่วมกับฟังปอดได้ยินเสียง crepitations หรือ bronchial breath sounds และ ภาพเอ็กซ์เรย์รังสีทรวงอก Chest X-Ray ช่วยยืนยันการวินิจฉัยในผู้ป่วยที่ประวัติและการตรวจร่างกายไม่ชัดเจน ในรายที่มั่นใจในการวินิจฉัยแล้วไม่จำเป็นต้องถ่ายภาพรังสีทรวงอก นอกจากต้องการประเมินว่าผู้ป่วยมีภาวะแทรกซ้อนจากปอดอักเสบหรือไม่

Weighted Cross Entropy Loss

ในเคสนี้จำนวนข้อมูลตัวอย่าง ในแต่ละ Class แตกต่างกันมาก เรียกว่า Class Imbalance เราจะใช้ Loss Function แบบใหม่ ชื่อว่า Weighted Cross Entropy Loss

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

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.