sharren commited on
Commit
0e62b18
1 Parent(s): 3b22883

Update info.py

Browse files
Files changed (1) hide show
  1. info.py +139 -81
info.py CHANGED
@@ -1,94 +1,152 @@
1
- pneumonia = '''
2
- Pneumonia is an infection that inflames the air sacs in one or both lungs.
3
- The air sacs may fill with fluid or pus (purulent material),
4
- causing cough with phlegm or pus, fever, chills, and difficulty breathing.
5
- A variety of organisms, including bacteria, viruses and fungi, can cause pneumonia.
6
- Pneumonia can range in seriousness from mild to life-threatening.
7
- It is most serious for infants and young children, people older than age 65,
8
- and people with health problems or weakened immune systems.
 
 
 
 
 
 
 
 
 
 
 
9
  #### Symptoms
10
- The signs and symptoms of pneumonia vary from mild to severe,
11
- depending on factors such as the type of germ causing the infection,
12
- and your age and overall health.
13
- Mild signs and symptoms often are similar to those of a cold or flu, but they last longer.
14
- #### Signs and symptoms of pneumonia may include:
15
- * Chest pain when you breathe or cough
16
- * Confusion or changes in mental awareness (in adults age 65 and older)
17
- * Cough, which may produce phlegm
18
- * Fatigue
19
- * Fever, sweating and shaking chills
20
- * Lower than normal body temperature (in adults older than age 65 and people with weak immune systems)
21
- * Nausea, vomiting or diarrhea
22
- * Shortness of breath
23
- Newborns and infants may not show any sign of the infection.
24
- Or they may vomit, have a fever and cough,
25
- appear restless or tired and without energy, or have difficulty breathing and eating.
26
- #### When to see a doctor
27
- See your doctor if you have difficulty breathing,
28
- chest pain, persistent fever of 102 F (39 C) or higher, or persistent cough,
29
- especially if you're coughing up pus.
30
- #### It's especially important that people in these high-risk groups see a doctor:
31
- * Adults older than age 65
32
- * Children younger than age 2 with signs and symptoms
33
- * People with an underlying health condition or weakened immune system
34
- * People receiving chemotherapy or taking medication that suppresses the immune system
35
- For some older adults and people with heart failure or chronic lung problems, pneumonia can quickly become a life-threatening condition.
 
 
 
 
 
 
 
36
  '''
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- covid19 = '''
40
- Coronavirus disease (COVID-19) is an infectious disease caused by the SARS-CoV-2 virus.
41
- Most people infected with the virus will experience mild to moderate respiratory illness and recover without requiring special treatment. However, some will become seriously ill and require medical attention. Older people and those with underlying medical conditions like cardiovascular disease, diabetes, chronic respiratory disease, or cancer are more likely to develop serious illness. Anyone can get sick with COVID-19 and become seriously ill or die at any age.
42
- The best way to prevent and slow down transmission is to be well informed about the disease and how the virus spreads. Protect yourself and others from infection by staying at least 1 metre apart from others, wearing a properly fitted mask, and washing your hands or using an alcohol-based rub frequently. Get vaccinated when it’s your turn and follow local guidance.
43
- The virus can spread from an infected person’s mouth or nose in small liquid particles when they cough, sneeze, speak, sing or breathe. These particles range from larger respiratory droplets to smaller aerosols. It is important to practice respiratory etiquette, for example by coughing into a flexed elbow, and to stay home and self-isolate until you recover if you feel unwell.
44
- #### Symptoms of COVID-19
45
- * Fever or chills
46
- * Cough
47
- * Shortness of breath or difficulty breathing
48
- * Fatigue
49
- * Muscle or body aches
50
- * Headache
51
- * New loss of taste or smell
52
- * Sore throat
53
- * Congestion or runny nose
54
- * Nausea or vomiting
55
- * Diarrhea
56
- #### When to Seek Emergency Medical Attention
57
- **Look for emergency warning signs* for COVID 19:**
58
- * Trouble breathing
59
- * Persistent pain or pressure in the chest
60
- * New confusion
61
- * Inability to wake or stay awake
62
- * Pale, gray, or blue-colored skin, lips, or nail beds, depending on skin tone
63
  '''
64
 
65
  vit_base_patch_16 = '''
66
- # vit-base-patch16-224-finetuned-pneumonia-detection
67
  This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
68
  It achieves the following results on the evaluation set:
69
- - Loss: 0.0938
70
- - Accuracy: 0.9728
 
 
 
71
  ### Training hyperparameters
72
  The following hyperparameters were used during training:
73
- - learning_rate: 5e-05
74
- - train_batch_size: 64
75
- - eval_batch_size: 64
76
  - seed: 42
77
- - gradient_accumulation_steps: 4
78
- - total_train_batch_size: 256
79
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
80
- - lr_scheduler_type: linear
81
- - lr_scheduler_warmup_ratio: 0.1
82
- - num_epochs: 3
83
- ### Training results
84
- | Training Loss | Epoch | Step | Validation Loss | Accuracy |
85
- |:-------------:|:-----:|:----:|:---------------:|:--------:|
86
- | 0.2082 | 0.99 | 20 | 0.1462 | 0.9402 |
87
- | 0.0832 | 1.98 | 40 | 0.0998 | 0.9658 |
88
- | 0.0517 | 2.96 | 60 | 0.0938 | 0.9728 |
89
- ### Framework versions
90
- - Transformers 4.38.2
91
- - Pytorch 2.1.2
92
- - Datasets 2.18.0
93
- - Tokenizers 0.15.2
94
  '''
 
1
+ akiec = '''
2
+ Actinic keratoses (akiec), also known as solar keratoses, are rough, scaly patches on the skin caused by years of sun exposure. These lesions are considered precancerous, as they have the potential to develop into skin cancer if left untreated.
3
+
4
+ #### Symptoms
5
+ Actinic keratoses typically appear as small, red, rough spots on sun-exposed areas of the skin, such as the face, ears, neck, scalp, chest, backs of hands, and forearms. They may be flat or raised and can range in color from pink to brown.
6
+
7
+ #### Signs and Symptoms
8
+ * Rough, scaly patches on the skin
9
+ * Red or pink spots that feel rough to the touch
10
+ * Itching or burning sensation
11
+ * Sometimes, a hard, wart-like surface
12
+ #### When to See a Dermatologist
13
+ It's important to see a dermatologist if you notice any new, changing, or persistent skin lesions, especially if they resemble actinic keratoses. Early detection and treatment can prevent the progression to skin cancer.
14
+ '''
15
+
16
+
17
+ bcc = '''
18
+ Basal cell carcinoma (BCC) is the most common type of skin cancer. It usually develops on areas of the skin exposed to the sun, such as the head, neck, and hands.
19
+
20
  #### Symptoms
21
+ Basal cell carcinomas often appear as:
22
+
23
+ * A pearly or waxy bump
24
+ * A flat, flesh-colored or brown scar-like lesion
25
+ * A bleeding or scabbing sore that heals and returns
26
+ #### Signs and Symptoms
27
+ * Persistent, non-healing sore
28
+ * Shiny, pearly bump
29
+ * Pink growth with raised edges
30
+ * Red or brown patch that may be itchy or painful
31
+ * Scar-like lesion with irregular borders
32
+ #### When to See a Dermatologist
33
+ If you notice any new, changing, or persistent skin lesions, especially those that bleed, scab, or do not heal, it's essential to see a dermatologist for evaluation and possible biopsy.
34
+ '''
35
+
36
+ bkl = '''
37
+ Benign lesions of the keratosis type are non-cancerous growths on the skin that often result from sun exposure. While they are not cancerous, they may resemble precancerous or cancerous lesions and should be monitored by a dermatologist.
38
+
39
+ Symptoms
40
+ These lesions may present as:
41
+
42
+ Rough, scaly patches
43
+ Warty growths
44
+ Thickened, discolored areas of skin
45
+ Raised bumps
46
+ Signs and Symptoms
47
+ Rough or scaly texture
48
+ Irregular borders
49
+ Variable colors, including pink, brown, or tan
50
+ Slowly growing over time
51
+ When to See a Dermatologist
52
+ If you notice any new, changing, or unusual skin growths, it's important to have them evaluated by a dermatologist. While most benign lesions do not require treatment, they should be monitored for changes in size, shape, or color.
53
+
54
  '''
55
 
56
+ df = '''
57
+ Dermatofibroma is a common benign skin lesion that usually appears as a small, firm bump on the skin. It is typically harmless but can sometimes resemble skin cancer or other serious conditions.
58
+
59
+ Symptoms
60
+ Dermatofibromas often present as:
61
+
62
+ Firm, raised bump
63
+ Pink, brown, or reddish color
64
+ Smooth or dimpled surface
65
+ Often found on the legs but can occur anywhere on the body
66
+ Signs and Symptoms
67
+ Firm, rubbery texture
68
+ Well-defined borders
69
+ Often less than 1 centimeter in size
70
+ Usually painless but may be tender to touch
71
+ When to See a Dermatologist
72
+ While dermatofibromas are usually harmless, any new, changing, or unusual skin lesions should be evaluated by a dermatologist to rule out skin cancer or other conditions.
73
+ '''
74
+
75
+ mel = '''
76
+ Melanoma is a type of skin cancer that develops from melanocytes, the cells that produce pigment in the skin. It can occur anywhere on the body, including areas not exposed to the sun.
77
+
78
+ Symptoms
79
+ Melanomas often appear as:
80
+
81
+ A change in an existing mole
82
+ A new, unusual growth or spot on the skin
83
+ Asymmetrical lesion with irregular borders
84
+ Varied colors, including shades of brown, black, red, blue, or white
85
+ Signs and Symptoms
86
+ Irregular, asymmetric shape
87
+ Irregular borders that may be scalloped or notched
88
+ Variable colors within the lesion
89
+ Diameter larger than a pencil eraser (6 millimeters) or evolving size, shape, or color
90
+ When to See a Dermatologist
91
+ If you notice any new, changing, or suspicious skin lesions, especially those with irregular features or rapid growth, it's essential to see a dermatologist promptly for evaluation and possible biopsy.
92
+ '''
93
+
94
+ nv='''
95
+ Melanocytic nevi, commonly known as moles, are benign growths on the skin composed of melanocytes. While most moles are harmless, some may develop into melanoma, a type of skin cancer.
96
+
97
+ Symptoms
98
+ Melanocytic nevi often appear as:
99
+
100
+ Small, round, or oval-shaped spots on the skin
101
+ Uniform in color, usually tan, brown, or black
102
+ Flat or raised with smooth or rough texture
103
+ Often appear during childhood or adolescence
104
+ Signs and Symptoms
105
+ Regular shape with well-defined borders
106
+ Uniform color throughout the lesion
107
+ Usually less than 6 millimeters in diameter
108
+ Typically remain stable in size, shape, and color over time
109
+ When to See a Dermatologist
110
+ While most moles are harmless, any new, changing, or unusual skin lesions should be evaluated by a dermatologist to rule out skin cancer or other conditions.
111
+ '''
112
+
113
+ vasc = '''
114
+ Vascular lesions are abnormal growths of blood vessels in the skin. While most are benign, some may indicate an underlying medical condition or require treatment for cosmetic reasons.
115
+
116
+ Symptoms
117
+ Vascular lesions may present as:
118
 
119
+ Red, purple, or blue discoloration of the skin
120
+ Flat or raised lesions
121
+ Pain, itching, or burning sensation
122
+ Rapid growth or change in appearance
123
+ Signs and Symptoms
124
+ Discoloration of the skin
125
+ Varied shapes and sizes
126
+ Smooth or irregular texture
127
+ Bleeding or ulceration in severe cases
128
+ When to See a Dermatologist
129
+ If you notice any new, changing, or unusual skin lesions, especially those with rapid growth or bleeding, it's essential to see a dermatologist for evaluation and possible treatment.
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  '''
131
 
132
  vit_base_patch_16 = '''
133
+ # vit-beta2-0.99
134
  This model is a fine-tuned version of [google/vit-base-patch16-224](https://huggingface.co/google/vit-base-patch16-224) on the imagefolder dataset.
135
  It achieves the following results on the evaluation set:
136
+ - Loss: 0.5248
137
+ - Accuracy: 0.8623
138
+ - Precision: 0.8584
139
+ - Recall: 0.8623
140
+ - F1: 0.8596
141
  ### Training hyperparameters
142
  The following hyperparameters were used during training:
143
+ - learning_rate: 0.0001
144
+ - train_batch_size: 16
145
+ - eval_batch_size: 8
146
  - seed: 42
147
+ - optimizer: Adam with betas=(0.9,0.99) and epsilon=1e-08
148
+ - lr_scheduler_type: cosine
149
+ - lr_scheduler_warmup_steps: 1733
150
+ - num_epochs: 100
151
+ - mixed_precision_training: Native AMP
 
 
 
 
 
 
 
 
 
 
 
 
152
  '''