a b/README.md
1
#  Panoptic Image Segmentation for Lung Disease Detection
2
This project was developed by students of VIT Bhopal as part of Project Exhibition 2 at VIT Bhopal University, under the Department of Computer Science and Engineering.
3
4
This project uses deep learning (U-Net) to segment lungs and detect lung diseases from X-ray images. It includes a web-based interface where users can upload an X-ray, view segmentation results, and get a downloadable PDF report with predictions.
5
6
7
## Project Objective
8
To develop an intelligent web-based platform that leverages deep learning (U-Net architecture) for panoptic segmentation and classification of lung diseases (COVID-19, Pneumonia, Lung Opacity) from chest X-ray images. The system provides:
9
10
Real-time segmentation output
11
Disease prediction with severity estimation
12
AI-generated doctor-style comments
13
A downloadable PDF report 
14
15
## Purpose
16
The objective of this project is to leverage deep learning for early and accurate detection of lung diseases like COVID-19, Pneumonia, and Lung Opacity through X-ray images using panoptic segmentation techniques. The project combines medical AI, web application development, and report automation to provide a complete diagnostic support system.
17
18
## Formats
19
    - All the images are in Portable Network Graphics (PNG) file format and resolution are 299*299 pixels.
20
21
## Features
22
23
- Upload Chest X-ray images (via UI)
24
- Automatic lung & disease-affected region segmentation using U-Net
25
- Disease classification and severity estimation
26
- PDF Report generation (with image, result, and patient info)
27
- Email report to the patient (optional)
28
- Manual segmentation feature (optional)
29
- Full Flask + HTML + JS (AJAX) stack
30
31
32
## Model Info
33
Architecture: U-Net
34
35
Input: Chest X-ray images (typically 256x256 or 512x512)
36
Output: Segmentation mask (disease regions)
37
Dataset Used: COVID-19 Radiography Dataset from Kaggle
38
39
## Future Improvements
40
Panoptic segmentation with instance + semantic labeling
41
More advanced disease classification (multi-label)
42
Responsive frontend dashboard
43
Live segmentation feedback
44
45
## Credits
46
U-Net architecture: Olaf Ronneberger et al.
47
COVID dataset: Kaggle contributors
48
PDF & Email: ReportLab, pdfkit, smtplib
49
50
## TEAM MEMBER 
51
1. PREETAM VERMA 22MIM10115 (LEAD THE PROJECT)
52
2. VIPIN VERMA 22MIM10118
53
3. VISHAL VERMA 22MIM10126
54
4. AYUSH VERMA 22MIM10123
55
5. DEVENDRA VERMA 22MIM10108
56
57
## Team Members & Contribution
58
59
## Name         Roll          Number              Contribution
60
Preetam Verma   22MIM10115    Team Lead,          Model Integration, Backend & Deployment, Testing & Debugging
61
Vipin Verma     22MIM10118    Data Preprocessing, Model Training
62
Vishal Verma    22MIM10126    UI/UX Design,       Frontend Development
63
Ayush Verma     22MIM10123    Data Preprocessing, Model Training
64
Devendra Verma  22MIM10108    Report Generation,  Testing & Debugging
65
66
## Faculty Guidance
67
The project was carried out under the guidance of 
68
Supervisor: Mrs. Garima Jain
69
Reviewers: Dr. Harshlata Vishwakarma, Dr. Priscilla Dinkar Moyya
70
71
72
73
##  ABOUT dataset 
74
75
COVID-19 CHEST X-RAY DATABASE
76
77
A team of researchers from Qatar University, Doha, Qatar, and the University of Dhaka, Bangladesh along with their collaborators from Pakistan and Malaysia in collaboration with medical doctors have created a database of chest X-ray images for COVID-19 positive cases along with Normal and Viral Pneumonia images. This COVID-19, normal and other lung infection dataset is released in stages. In the first release we have released 219 COVID-19, 1341 normal and 1345 viral pneumonia chest X-ray (CXR) images. In the first update, we have increased the COVID-19 class to 1200 CXR images. In the 2nd update, we have increased the database to 3616 COVID-19 positive cases along with 10,192 Normal, 6012 Lung Opacity (Non-COVID lung infection) and 1345 Viral Pneumonia images and corresponding lung masks. We will continue to update this database as soon as we have new x-ray images for COVID-19 pneumonia patients.  
78
79
80
COVID-19 data:
81
-----------------------
82
COVID data are collected from different publicly accessible dataset, online sources and published papers.
83
-2473 CXR images are collected from padchest dataset[1].
84
-183 CXR images from a Germany medical school[2].
85
-559 CXR image from SIRM, Github, Kaggle & Tweeter[3,4,5,6]
86
-400 CXR images from another Github source[7].
87
88
89
Normal images:
90
---------------------------------------- 
91
10192 Normal data are collected from from three different dataset.
92
-8851 RSNA [8]
93
-1341 Kaggle [9]
94
95
96
Lung opacity images:
97
---------------------------------------- 
98
6012 Lung opacity CXR images are collected from Radiological Society of North America (RSNA) CXR dataset  [8]
99
100
Viral Pneumonia images:
101
---------------------------------------- 
102
1345 Viral Pneumonia data are collected from  the Chest X-Ray Images (pneumonia) database [9]
103
104
Please cite the follwoing two articles if you are using this dataset:
105
-M.E.H. Chowdhury, T. Rahman, A. Khandakar, R. Mazhar, M.A. Kadir, Z.B. Mahbub, K.R. Islam, M.S. Khan, A. Iqbal, N. Al-Emadi, M.B.I. Reaz, M. T. Islam, “Can AI help in screening Viral and COVID-19 pneumonia?” IEEE Access, Vol. 8, 2020, pp. 132665 - 132676.
106
-Rahman, T., Khandakar, A., Qiblawey, Y., Tahir, A., Kiranyaz, S., Kashem, S.B.A., Islam, M.T., Maadeed, S.A., Zughaier, S.M., Khan, M.S. and Chowdhury, M.E., 2020. Exploring the Effect of Image Enhancement Techniques on COVID-19 Detection using Chest X-ray Images. arXiv preprint arXiv:2012.02238.
107
108
Reference:
109
[1]https://bimcv.cipf.es/bimcv-projects/bimcv-covid19/#1590858128006-9e640421-6711
110
[2]https://github.com/ml-workgroup/covid-19-image-repository/tree/master/png
111
[3]https://sirm.org/category/senza-categoria/covid-19/
112
[4]https://eurorad.org
113
[5]https://github.com/ieee8023/covid-chestxray-dataset
114
[6]https://figshare.com/articles/COVID-19_Chest_X-Ray_Image_Repository/12580328
115
[7]https://github.com/armiro/COVID-CXNet  
116
[8]https://www.kaggle.com/c/rsna-pneumonia-detection-challenge/data
117
[9] https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia
118