Preetham22 commited on
Commit
c27b2d2
·
1 Parent(s): f294e5b

modify files to accomodate inference script

Browse files
Files changed (4) hide show
  1. inference.py +134 -0
  2. src/generate_test_csv.py +7 -3
  3. src/triage_dataset.py +12 -3
  4. test_samples.csv +31 -31
inference.py ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import pandas as pd
3
+ import torch
4
+ import yaml
5
+ from torch.utils.data import DataLoader
6
+ from sklearn.metrics import accuracy_score, f1_score, classification_report
7
+ from pathlib import Path
8
+ from tqdm import tqdm
9
+
10
+ from src.triage_dataset import TriageDataset
11
+ from src.multimodal_model import MediLLMModel
12
+
13
+
14
+ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
15
+
16
+
17
+ def load_config(config_path="config/config.yaml", mode="multimodal"):
18
+ with open(config_path) as f:
19
+ config = yaml.safe_load(f)
20
+ return config[mode]
21
+
22
+
23
+ def predict(model, dataloader, device):
24
+ model.eval()
25
+ all_preds, all_truths = [], []
26
+ all_texts, all_paths, all_ids = [], [], []
27
+
28
+ with torch.no_grad():
29
+ for batch in tqdm(dataloader, desc="Running inference"):
30
+ input_ids = batch.get("input_ids", None)
31
+ attention_mask = batch.get("attention_mask", None)
32
+ images = batch.get("image", None)
33
+
34
+ if input_ids is not None:
35
+ input_ids = input_ids.to(device)
36
+ attention_mask = attention_mask.to(device)
37
+ if images is not None:
38
+ images = images.to(device)
39
+
40
+ outputs = model(input_ids=input_ids, attention_mask=attention_mask, image=images)
41
+ preds = torch.argmax(outputs, dim=1).cpu().tolist()
42
+ all_preds.extend(preds)
43
+
44
+ all_truths.extend(batch.get("triage_level", [-1] * len(preds)))
45
+ all_texts.extend(batch.get("emr_text", [""] * len(preds)))
46
+ all_paths.extend([str(p) for p in batch.get("image_path", [""] * len(preds))])
47
+ all_ids.extend(batch.get("patient_id", [f"patient_{i}" for i in range(len(preds))]))
48
+
49
+ return all_preds, all_truths, all_texts, all_paths, all_ids
50
+
51
+
52
+ def inverse_label_map():
53
+ return {0: "low", 1: "medium", 2: "high"}
54
+
55
+
56
+ def main():
57
+ parser = argparse.ArgumentParser()
58
+ parser.add_argument("--csv_path", type=str, default="test_samples.csv", help="Path to test file")
59
+ parser.add_argument("--mode", type=str, choices=["text", "image", "multimodal"], default="multimodal", help="mode of data")
60
+ parser.add_argument("--model_path", type=str, required=True, help="path to the model")
61
+ parser.add_argument("--config", type=str, default="config/config.yaml", help="Path to config file")
62
+ parser.add_argument("--image_dir", type=str, default="data/images", help="path to images folder")
63
+ parser.add_argument("--output_csv", type=str, default="predictions.csv", help="path to output file")
64
+ parser.add_argument("--batch_size", type=int, help="Optional override for batch size")
65
+ args = parser.parse_args()
66
+
67
+ # Checks
68
+ if not Path(args.csv_path).exists():
69
+ raise FileNotFoundError(f"❌ CSV file not found at {args.csv_path}")
70
+
71
+ if not Path(args.model_path).exists():
72
+ raise FileNotFoundError(f"❌ Model checkpoint not found at: {args.model_path}")
73
+
74
+ if not Path(args.config).exists():
75
+ raise FileNotFoundError(f"❌ Config file not found at: {args.config}")
76
+
77
+ if args.mode in ["image", "multimodal"] and not Path(args.image_dir).exists():
78
+ raise FileNotFoundError(f"❌ Image directory not found at: {args.image_dir}")
79
+
80
+ config = load_config(config_path=args.config, mode=args.mode)
81
+ batch_size = args.batch_size or config["batch_size"]
82
+
83
+ dataset = TriageDataset(
84
+ csv_file=args.csv_path,
85
+ mode=args.mode,
86
+ image_base_dir=args.image_dir
87
+ )
88
+ dataloader = DataLoader(dataset, batch_size=batch_size, shuffle=False)
89
+
90
+ model = MediLLMModel(
91
+ mode=args.mode,
92
+ dropout=config["dropout"],
93
+ hidden_dim=config["hidden_dim"]
94
+ )
95
+ model.load_state_dict(torch.load(args.model_path, map_location=DEVICE))
96
+ model.to(DEVICE)
97
+
98
+ preds, truths, texts, paths, ids = predict(model, dataloader, DEVICE)
99
+
100
+ label_inv_map = inverse_label_map()
101
+ pred_labels = [label_inv_map(p) for p in preds]
102
+ true_labels = [label_inv_map(t) if t in label_inv_map else "" for t in truths]
103
+
104
+ df = pd.DataFrame({
105
+ "patient_id": ids,
106
+ "predicted": pred_labels,
107
+ "true": true_labels,
108
+ "emr_text": texts,
109
+ "image_path": paths,
110
+ })
111
+
112
+ print(df[["patient_id", "predicted", "true"]])
113
+ # Ensure output directory exists
114
+ output_path = Path(args.output_csv)
115
+ output_path.parent.mkdir(parents=True, exist_ok=True)
116
+
117
+ # Save predictions
118
+ df.to_csv(args.output_csv, index=False)
119
+ print(f"✅ Saved predictions to {args.output_csv}")
120
+ print(f"\n🔎 Processed {len(preds)} samples.")
121
+
122
+ # print classification report + metrics if labels exist
123
+ if all(label in ["low", "medium", "high"] for label in true_labels):
124
+ print("\n📊 Classification Report:")
125
+ print(classification_report(true_labels, pred_labels))
126
+
127
+ acc = accuracy_score(true_labels, pred_labels)
128
+ f1 = f1_score(true_labels, pred_labels, average="weighted")
129
+ print(f"\n🎯 Accuracy: {acc:.4f}")
130
+ print(f"🎯 Weighted F1 Score: {f1:.4f}")
131
+
132
+
133
+ if __name__ == "__main__":
134
+ main()
src/generate_test_csv.py CHANGED
@@ -12,6 +12,9 @@ TRAIN_CSV_PATH = PROJECT_ROOT / "data" / "emr_records.csv"
12
  OUTPUT_CSV = PROJECT_ROOT / "test_samples.csv"
13
  LABELS = ["COVID", "NORMAL", "VIRAL PNEUMONIA"]
14
 
 
 
 
15
  alt_symptoms = [
16
  "The patient has noted intermittent chest pressure and occasional shortness of breath.",
17
  "A gradual onset of dry cough with mild respiratory discomfort has been documented.",
@@ -130,15 +133,16 @@ def generate_test_csv():
130
  f"Needed {SAMPLES_PER_CLASS}, found {len(unseen_images)}")
131
  sampled_images = random.sample(unseen_images, SAMPLES_PER_CLASS)
132
 
133
- for img_path in sampled_images:
134
  relative_path = str(img_path.relative_to(PROJECT_ROOT))
135
  text = build_alt_emr(label)
136
- records.append([text, relative_path, label])
 
137
 
138
  random.shuffle(records)
139
  with open(OUTPUT_CSV, "w", newline="") as f:
140
  writer = csv.writer(f)
141
- writer.writerow(["text", "image_path", "label"])
142
  writer.writerows(records)
143
 
144
  print(f"✅ test CSV file generated: {OUTPUT_CSV}")
 
12
  OUTPUT_CSV = PROJECT_ROOT / "test_samples.csv"
13
  LABELS = ["COVID", "NORMAL", "VIRAL PNEUMONIA"]
14
 
15
+ # Labels to triage map
16
+ triage_map = {"COVID": "high", "NORMAL": "low", "VIRAL PNEUMONIA": "medium"}
17
+
18
  alt_symptoms = [
19
  "The patient has noted intermittent chest pressure and occasional shortness of breath.",
20
  "A gradual onset of dry cough with mild respiratory discomfort has been documented.",
 
133
  f"Needed {SAMPLES_PER_CLASS}, found {len(unseen_images)}")
134
  sampled_images = random.sample(unseen_images, SAMPLES_PER_CLASS)
135
 
136
+ for i, img_path in enumerate(sampled_images):
137
  relative_path = str(img_path.relative_to(PROJECT_ROOT))
138
  text = build_alt_emr(label)
139
+ triage = triage_map[label]
140
+ records.append([f"{label}-{i + 1}", text, relative_path, triage])
141
 
142
  random.shuffle(records)
143
  with open(OUTPUT_CSV, "w", newline="") as f:
144
  writer = csv.writer(f)
145
+ writer.writerow(["patient_id", "emr_text", "image_path", "triage_level"])
146
  writer.writerows(records)
147
 
148
  print(f"✅ test CSV file generated: {OUTPUT_CSV}")
src/triage_dataset.py CHANGED
@@ -85,6 +85,10 @@ class TriageDataset(Dataset):
85
  output["input_ids"] = tokens["input_ids"].squeeze(0)
86
  output["attention_mask"] = tokens["attention_mask"].squeeze(0)
87
 
 
 
 
 
88
  if self.mode in ["image", "multimodal"]:
89
  # Process image
90
  image_path = Path(row["image_path"])
@@ -103,9 +107,14 @@ class TriageDataset(Dataset):
103
  image = Image.open(image_path).convert("RGB")
104
  output["image"] = self.transform(image)
105
 
 
 
 
 
106
  # Label
107
- output["label"] = torch.tensor(
108
- self.label_map[row["triage_level"]], dtype=torch.long
109
- )
 
110
 
111
  return output
 
85
  output["input_ids"] = tokens["input_ids"].squeeze(0)
86
  output["attention_mask"] = tokens["attention_mask"].squeeze(0)
87
 
88
+ # for inference
89
+ if "text" in self.df.columns:
90
+ output["raw_text"] = text
91
+
92
  if self.mode in ["image", "multimodal"]:
93
  # Process image
94
  image_path = Path(row["image_path"])
 
107
  image = Image.open(image_path).convert("RGB")
108
  output["image"] = self.transform(image)
109
 
110
+ # addition for inference
111
+ if "image_path" in self.df.columns:
112
+ output["image_path"] = image_path
113
+
114
  # Label
115
+ if "label" in row and row["label"] in self.label_map:
116
+ output["label"] = torch.tensor(
117
+ self.label_map[row["triage_level"]], dtype=torch.long
118
+ )
119
 
120
  return output
test_samples.csv CHANGED
@@ -1,31 +1,31 @@
1
- text,image_path,label
2
- "Patient TEST-DE26, a 31 years old individual presented after experiencing symptoms for approximately 8 days. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 99.8°F and an oxygen saturation level of 90%. No prior admissions or surgical history disclosed. Clinical features are suggestive of a nonspecific viral etiology. Radiographic evidence reveals dispersed infiltrative patterns.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-111.png,VIRAL PNEUMONIA
3
- "Patient TEST-OM67, a 22 years old individual presented after experiencing symptoms for approximately 7 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 97.8°F and an oxygen saturation level of 99%. Presentation overlaps multiple pulmonary conditions. Standard precautions have been advised post-evaluation.",data/images/NORMAL/Normal-395.png,NORMAL
4
- "Patient TEST-HQ92, a 46 years old individual presented after experiencing symptoms for approximately 6 days. Patient remains oriented with stable hemodynamics. Reported complaints include mild fatigue and sporadic episodes of wheezing. Vital measurements include a body temperature of 102.3°F and an oxygen saturation level of 96%. No definitive pattern observed; further evaluation is warranted. Radiographic evidence reveals dispersed infiltrative patterns.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-421.png,VIRAL PNEUMONIA
5
- "Patient TEST-CT89, a 51 years old individual presented after experiencing symptoms for approximately 4 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 97.7°F and an oxygen saturation level of 96%. Patient remains oriented with stable hemodynamics. Preliminary indicators fall into a diagnostic grey area.",data/images/NORMAL/Normal-4532.png,NORMAL
6
- "Patient TEST-MR04, a 63 years old individual presented after experiencing symptoms for approximately 1 days. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 101.9°F and an oxygen saturation level of 90%. Patient remains oriented with stable hemodynamics. No definitive pattern observed; further evaluation is warranted. Nutritional intake and sleep patterns appear adequate.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-959.png,VIRAL PNEUMONIA
7
- "Patient TEST-AN53, a 68 years old individual presented after experiencing symptoms for approximately 5 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 99.2°F and an oxygen saturation level of 92%. Presentation overlaps multiple pulmonary conditions. No remarkable family history or chronic illness reported. No remarkable family history or chronic illness reported.",data/images/COVID/COVID-1257.png,COVID
8
- "Patient TEST-EV06, a 23 years old individual presented after experiencing symptoms for approximately 10 days. The patient has noted intermittent chest pressure and occasional shortness of breath. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 98.7°F and an oxygen saturation level of 96%. Patient remains oriented with stable hemodynamics. Presentation overlaps multiple pulmonary conditions.",data/images/NORMAL/Normal-6137.png,NORMAL
9
- "Patient TEST-ZQ46, a 26 years old individual presented after experiencing symptoms for approximately 1 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 99.3°F and an oxygen saturation level of 89%. Diagnosis remains unclear pending further laboratory confirmation. Anosmia has been intermittently observed over recent days. No prior admissions or surgical history disclosed.",data/images/COVID/COVID-2216.png,COVID
10
- "Patient TEST-TC42, a 82 years old individual presented after experiencing symptoms for approximately 2 days. Reported complaints include mild fatigue and sporadic episodes of wheezing. Vital measurements include a body temperature of 100.4°F and an oxygen saturation level of 92%. Clinical features are suggestive of a nonspecific viral etiology. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-2605.png,COVID
11
- "Patient TEST-ZK21, a 36 years old individual presented after experiencing symptoms for approximately 5 days. Nutritional intake and sleep patterns appear adequate. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 102.5°F and an oxygen saturation level of 92%. Clinical features are suggestive of a nonspecific viral etiology. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-559.png,COVID
12
- "Patient TEST-LE01, a 83 years old individual presented after experiencing symptoms for approximately 5 days. The patient has noted intermittent chest pressure and occasional shortness of breath. No remarkable family history or chronic illness reported. Patient remains oriented with stable hemodynamics. Vital measurements include a body temperature of 101.5°F and an oxygen saturation level of 88%. No definitive pattern observed; further evaluation is warranted.",data/images/COVID/COVID-1846.png,COVID
13
- "Patient TEST-YK07, a 72 years old individual presented after experiencing symptoms for approximately 5 days. Patient remains oriented with stable hemodynamics. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 98.3°F and an oxygen saturation level of 94%. Diagnosis remains unclear pending further laboratory confirmation. There are currently no active complaints from the patient.",data/images/NORMAL/Normal-2557.png,NORMAL
14
- "Patient TEST-SO55, a 65 years old individual presented after experiencing symptoms for approximately 1 days. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 98.4°F and an oxygen saturation level of 98%. Clinical features are suggestive of a nonspecific viral etiology. There are currently no active complaints from the patient. Standard precautions have been advised post-evaluation. Patient remains oriented with stable hemodynamics.",data/images/NORMAL/Normal-2361.png,NORMAL
15
- "Patient TEST-LN03, a 66 years old individual presented after experiencing symptoms for approximately 4 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 99.0°F and an oxygen saturation level of 99%. Nutritional intake and sleep patterns appear adequate. Clinical features are suggestive of a nonspecific viral etiology.",data/images/NORMAL/Normal-5580.png,NORMAL
16
- "Patient TEST-PC07, a 25 years old individual presented after experiencing symptoms for approximately 6 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 100.0°F and an oxygen saturation level of 93%. Nutritional intake and sleep patterns appear adequate. Preliminary indicators fall into a diagnostic grey area.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-611.png,VIRAL PNEUMONIA
17
- "Patient TEST-WY60, a 36 years old individual presented after experiencing symptoms for approximately 10 days. A gradual onset of dry cough with mild respiratory discomfort has been documented. No prior admissions or surgical history disclosed. Vital measurements include a body temperature of 101.5°F and an oxygen saturation level of 91%. Presentation overlaps multiple pulmonary conditions. No prior admissions or surgical history disclosed.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-1238.png,VIRAL PNEUMONIA
18
- "Patient TEST-JC20, a 57 years old individual presented after experiencing symptoms for approximately 10 days. Episodes of throat irritation and general malaise observed. No prior admissions or surgical history disclosed. Standard precautions have been advised post-evaluation. Vital measurements include a body temperature of 101.1°F and an oxygen saturation level of 95%. Presentation overlaps multiple pulmonary conditions.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-624.png,VIRAL PNEUMONIA
19
- "Patient TEST-CM52, a 78 years old individual presented after experiencing symptoms for approximately 5 days. The patient has noted intermittent chest pressure and occasional shortness of breath. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 102.0°F and an oxygen saturation level of 87%. No definitive pattern observed; further evaluation is warranted. No remarkable family history or chronic illness reported.",data/images/COVID/COVID-2929.png,COVID
20
- "Patient TEST-GQ70, a 85 years old individual presented after experiencing symptoms for approximately 9 days. No remarkable family history or chronic illness reported. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 101.0°F and an oxygen saturation level of 94%. No prior admissions or surgical history disclosed. Presentation overlaps multiple pulmonary conditions.",data/images/COVID/COVID-1493.png,COVID
21
- "Patient TEST-BK73, a 63 years old individual presented after experiencing symptoms for approximately 9 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 99.2°F and an oxygen saturation level of 93%. Preliminary indicators fall into a diagnostic grey area.",data/images/COVID/COVID-1795.png,COVID
22
- "Patient TEST-KL51, a 25 years old individual presented after experiencing symptoms for approximately 8 days. Episodes of throat irritation and general malaise observed. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 99.6°F and an oxygen saturation level of 93%. Standard precautions have been advised post-evaluation. Diagnosis remains unclear pending further laboratory confirmation. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-3525.png,COVID
23
- "Patient TEST-QL56, a 83 years old individual presented after experiencing symptoms for approximately 9 days. Mild respiratory symptoms have progressed over several days. Patient remains oriented with stable hemodynamics. Vital measurements include a body temperature of 101.1°F and an oxygen saturation level of 90%. Standard precautions have been advised post-evaluation. Presentation overlaps multiple pulmonary conditions.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-160.png,VIRAL PNEUMONIA
24
- "Patient TEST-MY44, a 18 years old individual presented after experiencing symptoms for approximately 5 days. Reported complaints include mild fatigue and sporadic episodes of wheezing. Vital measurements include a body temperature of 101.9°F and an oxygen saturation level of 92%. Patient remains oriented with stable hemodynamics. Presentation overlaps multiple pulmonary conditions.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-749.png,VIRAL PNEUMONIA
25
- "Patient TEST-QZ08, a 80 years old individual presented after experiencing symptoms for approximately 3 days. Episodes of throat irritation and general malaise observed. Standard precautions have been advised post-evaluation. Patient remains oriented with stable hemodynamics. Vital measurements include a body temperature of 97.8°F and an oxygen saturation level of 98%. Diagnosis remains unclear pending further laboratory confirmation.",data/images/NORMAL/Normal-2821.png,NORMAL
26
- "Patient TEST-WL21, a 43 years old individual presented after experiencing symptoms for approximately 6 days. Mild respiratory symptoms have progressed over several days. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 99.8°F and an oxygen saturation level of 92%. Nutritional intake and sleep patterns appear adequate. Clinical features are suggestive of a nonspecific viral etiology.",data/images/COVID/COVID-2610.png,COVID
27
- "Patient TEST-NT43, a 61 years old individual presented after experiencing symptoms for approximately 8 days. Patient remains oriented with stable hemodynamics. The patient has noted intermittent chest pressure and occasional shortness of breath. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 97.6°F and an oxygen saturation level of 95%. No definitive pattern observed; further evaluation is warranted.",data/images/NORMAL/Normal-1834.png,NORMAL
28
- "Patient TEST-BD08, a 35 years old individual presented after experiencing symptoms for approximately 10 days. Mild respiratory symptoms have progressed over several days. No prior admissions or surgical history disclosed. Vital measurements include a body temperature of 98.2°F and an oxygen saturation level of 100%. Clinical features are suggestive of a nonspecific viral etiology.",data/images/NORMAL/Normal-824.png,NORMAL
29
- "Patient TEST-AF95, a 26 years old individual presented after experiencing symptoms for approximately 4 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 101.4°F and an oxygen saturation level of 90%. Preliminary indicators fall into a diagnostic grey area. Patient remains oriented with stable hemodynamics.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-1313.png,VIRAL PNEUMONIA
30
- "Patient TEST-WQ06, a 83 years old individual presented after experiencing symptoms for approximately 8 days. Standard precautions have been advised post-evaluation. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 98.4°F and an oxygen saturation level of 99%. Preliminary indicators fall into a diagnostic grey area.",data/images/NORMAL/Normal-2274.png,NORMAL
31
- "Patient TEST-SD61, a 20 years old individual presented after experiencing symptoms for approximately 4 days. Nutritional intake and sleep patterns appear adequate. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 100.7°F and an oxygen saturation level of 93%. No prior admissions or surgical history disclosed. Preliminary indicators fall into a diagnostic grey area.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-1021.png,VIRAL PNEUMONIA
 
1
+ patient_id,emr_text,image_path,triage_level
2
+ COVID-8,"Patient TEST-DC29, a 55 years old individual presented after experiencing symptoms for approximately 10 days. Patient remains oriented with stable hemodynamics. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 100.8°F and an oxygen saturation level of 87%. No definitive pattern observed; further evaluation is warranted. No remarkable family history or chronic illness reported. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-1640.png,high
3
+ NORMAL-6,"Patient TEST-RF26, a 42 years old individual presented after experiencing symptoms for approximately 6 days. A gradual onset of dry cough with mild respiratory discomfort has been documented. Standard precautions have been advised post-evaluation. Vital measurements include a body temperature of 98.6°F and an oxygen saturation level of 98%. No prior admissions or surgical history disclosed. Diagnosis remains unclear pending further laboratory confirmation.",data/images/NORMAL/Normal-2223.png,low
4
+ VIRAL PNEUMONIA-5,"Patient TEST-NP02, a 75 years old individual presented after experiencing symptoms for approximately 9 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 99.1°F and an oxygen saturation level of 92%. No definitive pattern observed; further evaluation is warranted. Patient remains oriented with stable hemodynamics. Radiographic evidence reveals dispersed infiltrative patterns.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-1101.png,medium
5
+ NORMAL-2,"Patient TEST-AJ06, a 50 years old individual presented after experiencing symptoms for approximately 4 days. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 97.9°F and an oxygen saturation level of 95%. Diagnosis remains unclear pending further laboratory confirmation. No prior admissions or surgical history disclosed.",data/images/NORMAL/Normal-7819.png,low
6
+ COVID-10,"Patient TEST-DF19, a 68 years old individual presented after experiencing symptoms for approximately 7 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 102.4°F and an oxygen saturation level of 92%. No prior admissions or surgical history disclosed. No definitive pattern observed; further evaluation is warranted.",data/images/COVID/COVID-418.png,high
7
+ COVID-5,"Patient TEST-RI51, a 46 years old individual presented after experiencing symptoms for approximately 6 days. Nutritional intake and sleep patterns appear adequate. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 99.4°F and an oxygen saturation level of 89%. No remarkable family history or chronic illness reported. Diagnosis remains unclear pending further laboratory confirmation.",data/images/COVID/COVID-653.png,high
8
+ VIRAL PNEUMONIA-8,"Patient TEST-CD95, a 64 years old individual presented after experiencing symptoms for approximately 8 days. Episodes of throat irritation and general malaise observed. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 100.9°F and an oxygen saturation level of 96%. Preliminary indicators fall into a diagnostic grey area.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-1286.png,medium
9
+ COVID-3,"Patient TEST-KO00, a 56 years old individual presented after experiencing symptoms for approximately 3 days. No prior admissions or surgical history disclosed. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 100.2°F and an oxygen saturation level of 89%. No prior admissions or surgical history disclosed. No definitive pattern observed; further evaluation is warranted.",data/images/COVID/COVID-2258.png,high
10
+ NORMAL-5,"Patient TEST-EK85, a 79 years old individual presented after experiencing symptoms for approximately 5 days. Episodes of throat irritation and general malaise observed. No remarkable family history or chronic illness reported. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 98.0°F and an oxygen saturation level of 97%. No definitive pattern observed; further evaluation is warranted.",data/images/NORMAL/Normal-1365.png,low
11
+ VIRAL PNEUMONIA-6,"Patient TEST-DY43, a 75 years old individual presented after experiencing symptoms for approximately 5 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 100.7°F and an oxygen saturation level of 95%. Nutritional intake and sleep patterns appear adequate. No remarkable family history or chronic illness reported. Diagnosis remains unclear pending further laboratory confirmation.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-927.png,medium
12
+ COVID-7,"Patient TEST-DN15, a 37 years old individual presented after experiencing symptoms for approximately 10 days. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 99.1°F and an oxygen saturation level of 91%. Preliminary indicators fall into a diagnostic grey area. No remarkable family history or chronic illness reported. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-1085.png,high
13
+ NORMAL-7,"Patient TEST-QU92, a 85 years old individual presented after experiencing symptoms for approximately 3 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 98.2°F and an oxygen saturation level of 97%. Nutritional intake and sleep patterns appear adequate. Preliminary indicators fall into a diagnostic grey area.",data/images/NORMAL/Normal-7874.png,low
14
+ COVID-6,"Patient TEST-YM73, a 65 years old individual presented after experiencing symptoms for approximately 2 days. Episodes of throat irritation and general malaise observed. Nutritional intake and sleep patterns appear adequate. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 100.0°F and an oxygen saturation level of 93%. Diagnosis remains unclear pending further laboratory confirmation. Anosmia has been intermittently observed over recent days.",data/images/COVID/COVID-1399.png,high
15
+ NORMAL-1,"Patient TEST-HN49, a 34 years old individual presented after experiencing symptoms for approximately 9 days. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 98.4°F and an oxygen saturation level of 99%. No prior admissions or surgical history disclosed. No prior admissions or surgical history disclosed. Preliminary indicators fall into a diagnostic grey area.",data/images/NORMAL/Normal-1925.png,low
16
+ NORMAL-4,"Patient TEST-QE09, a 52 years old individual presented after experiencing symptoms for approximately 7 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 98.2°F and an oxygen saturation level of 95%. Preliminary indicators fall into a diagnostic grey area. There are currently no active complaints from the patient.",data/images/NORMAL/Normal-3320.png,low
17
+ VIRAL PNEUMONIA-1,"Patient TEST-HR49, a 61 years old individual presented after experiencing symptoms for approximately 5 days. No remarkable family history or chronic illness reported. Patient remains oriented with stable hemodynamics. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 99.5°F and an oxygen saturation level of 90%. Preliminary indicators fall into a diagnostic grey area. Radiographic evidence reveals dispersed infiltrative patterns.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-144.png,medium
18
+ NORMAL-8,"Patient TEST-RW12, a 54 years old individual presented after experiencing symptoms for approximately 5 days. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 98.4°F and an oxygen saturation level of 96%. Presentation overlaps multiple pulmonary conditions. Nutritional intake and sleep patterns appear adequate.",data/images/NORMAL/Normal-4447.png,low
19
+ VIRAL PNEUMONIA-9,"Patient TEST-ZO32, a 20 years old individual presented after experiencing symptoms for approximately 10 days. Standard precautions have been advised post-evaluation. No remarkable family history or chronic illness reported. A gradual onset of dry cough with mild respiratory discomfort has been documented. Vital measurements include a body temperature of 101.2°F and an oxygen saturation level of 92%. Preliminary indicators fall into a diagnostic grey area.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-261.png,medium
20
+ VIRAL PNEUMONIA-10,"Patient TEST-CU46, a 40 years old individual presented after experiencing symptoms for approximately 8 days. No prior admissions or surgical history disclosed. A gradual onset of dry cough with mild respiratory discomfort has been documented. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 99.1°F and an oxygen saturation level of 95%. Diagnosis remains unclear pending further laboratory confirmation.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-166.png,medium
21
+ COVID-1,"Patient TEST-FB14, a 40 years old individual presented after experiencing symptoms for approximately 7 days. Nutritional intake and sleep patterns appear adequate. The patient has noted intermittent chest pressure and occasional shortness of breath. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 98.9°F and an oxygen saturation level of 91%. Presentation overlaps multiple pulmonary conditions.",data/images/COVID/COVID-3380.png,high
22
+ COVID-2,"Patient TEST-HB66, a 73 years old individual presented after experiencing symptoms for approximately 10 days. Mild respiratory symptoms have progressed over several days. Nutritional intake and sleep patterns appear adequate. Vital measurements include a body temperature of 99.3°F and an oxygen saturation level of 89%. Diagnosis remains unclear pending further laboratory confirmation.",data/images/COVID/COVID-1410.png,high
23
+ NORMAL-3,"Patient TEST-KX40, a 39 years old individual presented after experiencing symptoms for approximately 2 days. Reported complaints include mild fatigue and sporadic episodes of wheezing. No prior admissions or surgical history disclosed. No prior admissions or surgical history disclosed. Vital measurements include a body temperature of 97.6°F and an oxygen saturation level of 95%. Preliminary indicators fall into a diagnostic grey area.",data/images/NORMAL/Normal-5988.png,low
24
+ COVID-9,"Patient TEST-JK08, a 64 years old individual presented after experiencing symptoms for approximately 7 days. Nutritional intake and sleep patterns appear adequate. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 100.0°F and an oxygen saturation level of 93%. Preliminary indicators fall into a diagnostic grey area.",data/images/COVID/COVID-2796.png,high
25
+ VIRAL PNEUMONIA-3,"Patient TEST-RZ58, a 84 years old individual presented after experiencing symptoms for approximately 4 days. Reported complaints include mild fatigue and sporadic episodes of wheezing. Vital measurements include a body temperature of 100.3°F and an oxygen saturation level of 91%. No remarkable family history or chronic illness reported. Preliminary indicators fall into a diagnostic grey area.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-843.png,medium
26
+ NORMAL-9,"Patient TEST-SG97, a 24 years old individual presented after experiencing symptoms for approximately 10 days. Standard precautions have been advised post-evaluation. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 98.7°F and an oxygen saturation level of 100%. Presentation overlaps multiple pulmonary conditions.",data/images/NORMAL/Normal-4888.png,low
27
+ VIRAL PNEUMONIA-2,"Patient TEST-OG12, a 74 years old individual presented after experiencing symptoms for approximately 3 days. Mild respiratory symptoms have progressed over several days. Vital measurements include a body temperature of 101.3°F and an oxygen saturation level of 91%. Presentation overlaps multiple pulmonary conditions. No prior admissions or surgical history disclosed.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-396.png,medium
28
+ COVID-4,"Patient TEST-KY96, a 83 years old individual presented after experiencing symptoms for approximately 6 days. Patient remains oriented with stable hemodynamics. Reported complaints include mild fatigue and sporadic episodes of wheezing. Vital measurements include a body temperature of 99.9°F and an oxygen saturation level of 94%. Presentation overlaps multiple pulmonary conditions. Nutritional intake and sleep patterns appear adequate.",data/images/COVID/COVID-1639.png,high
29
+ VIRAL PNEUMONIA-7,"Patient TEST-ZK84, a 52 years old individual presented after experiencing symptoms for approximately 1 days. Patient remains oriented with stable hemodynamics. Episodes of throat irritation and general malaise observed. No remarkable family history or chronic illness reported. Vital measurements include a body temperature of 99.7°F and an oxygen saturation level of 91%. Clinical features are suggestive of a nonspecific viral etiology.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-397.png,medium
30
+ NORMAL-10,"Patient TEST-PW53, a 51 years old individual presented after experiencing symptoms for approximately 9 days. Standard precautions have been advised post-evaluation. The patient has noted intermittent chest pressure and occasional shortness of breath. Vital measurements include a body temperature of 97.6°F and an oxygen saturation level of 97%. Diagnosis remains unclear pending further laboratory confirmation. No prior admissions or surgical history disclosed.",data/images/NORMAL/Normal-1943.png,low
31
+ VIRAL PNEUMONIA-4,"Patient TEST-PP31, a 38 years old individual presented after experiencing symptoms for approximately 3 days. Episodes of throat irritation and general malaise observed. Vital measurements include a body temperature of 102.1°F and an oxygen saturation level of 91%. Presentation overlaps multiple pulmonary conditions. Patient remains oriented with stable hemodynamics. Radiographic evidence reveals dispersed infiltrative patterns.",data/images/VIRAL PNEUMONIA/Viral Pneumonia-411.png,medium