|
a |
|
b/README.md |
|
|
1 |
# RespireCheck-Classification-of-X-Ray-Using-Knowledge-Distillation-and-Semi-Supervised-Segmentation |
|
|
2 |
This web application leverages CLIP-KDViT and Grad-CAM to provide explainable chest X-ray diagnoses for COVID-19, pneumonia, and tuberculosis with high accuracy. |
|
|
3 |
Features |
|
|
4 |
|
|
|
5 |
AI-powered Diagnosis: Automatically classifies chest X-ray images to detect COVID-19, pneumonia, and tuberculosis. |
|
|
6 |
Explainable AI: Uses Grad-CAM for visualizing and understanding model predictions. |
|
|
7 |
High Accuracy: Achieves high diagnostic accuracy through advanced deep learning techniques. |
|
|
8 |
|
|
|
9 |
Requirements |
|
|
10 |
|
|
|
11 |
Before running the project locally, ensure you have the following: |
|
|
12 |
|
|
|
13 |
Python 3.x (preferably Python 3.7 or higher) |
|
|
14 |
Virtual Environment (venv) |
|
|
15 |
|
|
|
16 |
Steps to Deploy the Web Application |
|
|
17 |
1. Create a Virtual Environment: |
|
|
18 |
|
|
|
19 |
Create a new virtual environment in your local environment to isolate the dependencies required for this project. |
|
|
20 |
|
|
|
21 |
python -m venv venv |
|
|
22 |
|
|
|
23 |
2. Activate the Virtual Environment: |
|
|
24 |
|
|
|
25 |
On Windows: |
|
|
26 |
|
|
|
27 |
.\venv\Scripts\activate |
|
|
28 |
|
|
|
29 |
On MacOS/Linux: |
|
|
30 |
|
|
|
31 |
source venv/bin/activate |
|
|
32 |
|
|
|
33 |
3. Install Required Libraries: |
|
|
34 |
|
|
|
35 |
After activating the virtual environment, install all the necessary Python frameworks and dependencies from requirements.txt. |
|
|
36 |
|
|
|
37 |
pip install -r requirements.txt |
|
|
38 |
|
|
|
39 |
The requirements.txt file should include all the necessary dependencies for running the app, such as: |
|
|
40 |
|
|
|
41 |
Flask |
|
|
42 |
torch |
|
|
43 |
torchvision |
|
|
44 |
PIL |
|
|
45 |
numpy |
|
|
46 |
opencv-python |
|
|
47 |
grad-cam |
|
|
48 |
And any other specific libraries used in the project. |
|
|
49 |
|
|
|
50 |
4. Upload Model Files: |
|
|
51 |
|
|
|
52 |
Due to the size of the model.pth files, you need to upload them on your own. The pre-trained model files are required for making predictions but are too large to upload directly to the repository. |
|
|
53 |
|
|
|
54 |
Once you have the model.pth files, place them in the appropriate directory of the project (e.g., ./models/). |
|
|
55 |
|
|
|
56 |
5. Run the Web Application: |
|
|
57 |
|
|
|
58 |
Once the virtual environment is set up and the necessary model files are in place, you can run the web application. |
|
|
59 |
|
|
|
60 |
python app.py |
|
|
61 |
|
|
|
62 |
This will start the web server, and you can access the application via: |
|
|
63 |
|
|
|
64 |
http://127.0.0.1:5000 |
|
|
65 |
|
|
|
66 |
Contributing |
|
|
67 |
|
|
|
68 |
Feel free to fork the repository and submit issues or pull requests. Contributions are welcome! |