[1180c1]: / llava / instruct / instruct_few_shot_examples.py

Download this file

359 lines (359 with data), 23.8 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
fs = [{'conversations': [{'from': 'human',
'value': 'Which side of the lung has a pleural effusion?'},
{'from': 'gpt',
'value': 'The right side of the lung has a pleural '
'effusion.'},
{'from': 'human',
'value': 'According to the CT image, does the patient has '
'cardiomegaly?'},
{'from': 'gpt',
'value': 'The image appeares to be a chest x-ray. '
'However, it indicates that the patient has '
'cardiomegaly, which means an enlarged heart. '
'Additionally, there are diffuse bilateral '
'interstitial infiltrates and a right-sided '
'pleural effusion present in the image.'},
{'from': 'human',
'value': "Additional Info: The patient's respiratory "
'status continued to worsen and on hospital day '
'number 14, requiring intubation and mechanical '
'ventilation for hypoxemic respiratory failure.'},
{'from': 'gpt',
'value': 'Thank you for providing additional information '
"about the patient's condition. Based on the "
'information you provided, it appears that the '
"patient's respiratory status continued to "
'worsen and on hospital day number 14, they '
'required intubation and mechanical ventilation '
'for hypoxemic respiratory failure. This '
"suggests that the patient's lung function has "
'significantly declined, and they may be '
'experiencing respiratory distress. It is '
'important for the medical team to closely '
"monitor the patient's condition and provide "
'appropriate treatment to manage their symptoms '
'and improve their lung function.'}],
'domain': {'chest_xray': True,
'ct_scan': False,
'gross': False,
'histology': False,
'mri': False},
'fig_caption': 'Chest X-ray. Cardiomegaly with diffuse bilateral '
'interstitial infiltrates and a right-sided pleural effusion.',
'fig_id': 'F2',
'fig_label': 'Figure 2',
'in_text_mention': ['His respiratory status continued to worsen and on '
'hospital day number 14 , he required intubation and '
'mechanical ventilation for hypoxemic respiratory '
'failure ( Figure 2 ) .'],
'pair_id': '18627621_F2',
'pmid': '18627621'},
{'conversations': [{'from': 'human', 'value': 'What are the arrows showing?'},
{'from': 'gpt',
'value': 'The arrows in the X-ray image are pointing to '
'areas of hyperlucency, which are surrounded by '
'a thin linear demarcation. Hyperlucency refers '
'to the increased brightness in those specific '
'areas on the X-ray, which may indicate that '
'there is less tissue or fluid density in those '
'regions. The thin linear demarcation is a '
'boundary that separates the hyperlucent areas '
'from the surrounding lung tissue. These '
'findings suggest that there may be an '
'underlying issue, such as a pneumothorax '
'(collapsed lung), bullae (air-filled sacs), or '
'another lung abnormality. Further evaluation '
'and tests will be needed to determine the exact '
'cause and appropriate treatment.'},
{'from': 'human',
'value': 'Do you see endotracheal tube placed?'},
{'from': 'gpt',
'value': 'Yes, it was probably taken following '
'endotracheal tube placement. An endotracheal '
'tube is a flexible plastic tube that is '
'inserted through the mouth or nose and into the '
'trachea (windpipe) to help maintain an open '
'airway and assist with breathing. In this '
'context, the X-ray is taken to assess the '
'positioning of the tube and identify any '
'potential complications, such as lung '
'hyperinflation or other abnormalities as '
'described in the findings.'},
{'from': 'human',
'value': 'Do you see any abnormalities in upper lobes?'},
{'from': 'gpt',
'value': 'Yes, there are abnormalities in the bilateral '
'upper lobes. The increased lucency in the '
'bilateral upper lobes suggests that there is '
'less tissue or fluid density in those areas, '
'which could be due to various reasons such as '
'lung disease, infection, or structural '
'abnormalities. It is important to consider the '
"patient's clinical history and symptoms, as "
'well as consult a healthcare professional for a '
'thorough evaluation and proper diagnosis of the '
'underlying cause of these findings.'}],
'domain': {'chest_xray': True,
'ct_scan': False,
'gross': False,
'histology': False,
'mri': False},
'fig_caption': 'Anteroposterior chest X-ray following endotracheal tube '
'placement showing hyperinflated lungs with multiple areas of '
'hyperlucency on the left lung base and left apex, surrounded '
'by a thin linear demarcation (arrows).',
'fig_id': 'fig1',
'fig_label': 'Figure 1',
'in_text_mention': ['Chest X-ray showed hyperinflation with increased '
'lucency in bilateral upper lobes ( Figure 1 ) .'],
'pair_id': '24511405_fig1',
'pmid': '24511405'},
{'conversations': [{'from': 'human', 'value': 'Where is the lesion located?'},
{'from': 'gpt',
'value': 'The lesion is located in the posterior aspect '
'of the right upper lobe of the lung.'},
{'from': 'human',
'value': 'Is it extending into the chest wall?'},
{'from': 'gpt',
'value': 'Yes, the CT scan suggests that the large '
'cavitating lesion in the right upper lobe is '
'likely extending into the chest wall.'},
{'from': 'human',
'value': 'Can you explain more about the cavitating '
'lesion?'},
{'from': 'gpt',
'value': 'Certainly. A cavitating lesion refers to an '
'abnormal mass or growth within the lung tissue '
'that has a cavity or hollow space inside it. '
'This cavity can be formed due to the necrosis '
'(death) of the tissue inside the lesion, '
'leading to the breakdown and disintegration of '
'the affected tissue. Cavitating lesions can be '
'caused by various factors, such as infections '
'(like tuberculosis or fungal infections), '
'autoimmune diseases, or malignancies (cancer). '
'In the context of the CT scan provided, the '
'large cavitating lesion in the right upper lobe '
'of the lung is suggestive of a malignant '
'(cancerous) growth. The cavity within the '
'lesion may be a result of the rapid and '
'uncontrolled growth of cancer cells, which can '
'lead to the destruction of surrounding healthy '
"tissue. It's important to note that further "
'diagnostic tests, such as a biopsy, would be '
'required to confirm the malignancy and '
'determine the specific type of cancer '
'involved.'}],
'domain': {'chest_xray': False,
'ct_scan': True,
'gross': False,
'histology': False,
'mri': False},
'fig_caption': 'Contrast-enhanced CT scan of the chest for patient #1. A '
'large cavitating lesion was identified in the right upper '
'lobe with pleural involvement and likely extension into the '
'chest wall. In addition, right hilar lymphadenopathy was '
'suspected. This was the primary malignant lesion in this '
'patient.',
'fig_id': 'F4',
'fig_label': 'Figure 4',
'in_text_mention': ['Computerized tomography ( CT ) scans of the chest ( '
'Figure 4 ) were obtained .',
'( Figure 4 ) and demonstrated a large cavitating lesion '
'in the posterior aspect of the right upper lobe with '
'probable pleural involvement likely representing the '
'primary lesion .'],
'pair_id': '16734899_F4',
'pmid': '16734899'},
{'conversations': [{'from': 'human',
'value': 'What is the color of the speciment?'},
{'from': 'gpt',
'value': 'It seems to be a tan gray color.'},
{'from': 'human', 'value': 'Does it have a hard surface?'},
{'from': 'gpt',
'value': 'No, the specimen seems to have a soft surface.'},
{'from': 'human', 'value': 'Is it a tumor?'},
{'from': 'gpt',
'value': 'It is likely that the specimen is a tumor. '
'However, as I mentioned earlier, further '
'testing and analysis would be necessary to '
'determine the nature of the tumor, whether it '
'is benign or malignant.'}],
'domain': {'chest_xray': False,
'ct_scan': False,
'gross': True,
'histology': False,
'mri': False},
'fig_caption': 'Gross image of the specimen; The specimen was measured at '
'5.2 × 5.0 × 5.0 cm and had a tan gray, soft, fish-fleshy cut '
'surface.',
'fig_id': 'F3',
'fig_label': 'Figure 3',
'in_text_mention': ['Grossly , the tumor measured 5.2 × 5.0 × 5.0 cm and had '
'a tan gray , soft , fish-fleshy cut surface ( Figure 3 '
') .'],
'pair_id': '18727836_F3',
'pmid': '18727836'},
{'conversations': [{'from': 'human',
'value': 'What organ is presented in the image?'},
{'from': 'gpt',
'value': 'It is likely a gross section of a lung.'},
{'from': 'human',
'value': 'What do the contours indicate?'},
{'from': 'gpt',
'value': 'They represent the external border of the lung '
'section that was examined, as well as the '
'extent of macroscopic (visible to the naked '
'eye) tumor present in the lung tissue.'},
{'from': 'human', 'value': 'How were the contours drawn?'},
{'from': 'gpt',
'value': 'It appears that they were placed digitally.'}],
'domain': {'chest_xray': False,
'ct_scan': False,
'gross': True,
'histology': False,
'mri': False},
'fig_caption': 'The gross section is photographed, and the lung parenchyma, '
'visible tumour, and any intrinsic fiducial landmarks are '
'contoured using Photoshop (Adobe Systems Incorporated, San '
'Jose, CA, U.S.A.).',
'fig_id': 'f5-co15-5-225e62',
'fig_label': 'FIGURE 5',
'in_text_mention': ['Using Photoshop ( Adobe Systems Incorporated , San Jose '
', CA , U.S.A. ) , contours were placed on the '
'photographic images to represent the external border of '
'the section , and the extent of macroscopic disease ( '
'Figure 5 ) .'],
'pair_id': '19008992_f5-co15-5-225e62',
'pmid': '19008992'},
{'conversations': [{'from': 'human', 'value': 'Which organ is shown?'},
{'from': 'gpt',
'value': 'The image shows the epidermis, which is the '
'outermost layer of the skin.'},
{'from': 'human',
'value': 'Which cell types are prominent?'},
{'from': 'gpt',
'value': 'The prominent cell types observed in the '
'epidermis are atypical lymphocytes.'},
{'from': 'human',
'value': 'What can you say about the lymphocytes?'},
{'from': 'gpt',
'value': 'The image shows linearly arranged atypical '
'lymphocytes in the epidermis of a patient. The '
'lymphocytes are single/haloed, which means they '
'are individually surrounded by a clear space, '
'giving the appearance of a halo. This '
'appearance is characteristic of atypical '
'lymphocytes in Mycosis Fungoides (MF), a type '
'of cutaneous T-cell lymphoma.'}],
'domain': {'chest_xray': False,
'ct_scan': False,
'gross': False,
'histology': True,
'mri': False},
'fig_caption': 'Linearly arranged and single/haloed atypical lymphocytes in '
'epidermis in patient with patch stage MF were seen before '
'treatment (×400, H&E).',
'fig_id': 'fig1',
'fig_label': 'Figure 1',
'in_text_mention': ['Before treatment , epidermotropism was established in '
'all cases and linearly arranged cells were the most '
'prominent ( 93.8 % ) finding ( Figure 1 ) .'],
'pair_id': '22973172_fig1',
'pmid': '22973172'},
{'conversations': [{'from': 'human',
'value': 'What is the magnification level?'},
{'from': 'gpt',
'value': 'It seems to be a very high magnification. '
'However, it is important to note that the '
'actual magnification level of an image can vary '
'depending on the size of the monitor or screen '
'being used to view it, as well as other factors '
'such as the size of the original sample and the '
'imaging technique used.'},
{'from': 'human', 'value': 'What are those cells?'},
{'from': 'gpt',
'value': 'The cells are likely spermatogonia. '
'Spermatogonia are the undifferentiated male '
'germ cells that are located in the seminiferous '
'tubules of the testis. These cells undergo '
'mitosis and eventually differentiate and '
'develop into sperm cells through a process '
'called spermatogenesis.'},
{'from': 'human',
'value': 'What are the arrows pointing to?'},
{'from': 'gpt',
'value': 'The arrows in the image are pointing to the '
'spermatogonia. These are the early, '
'undifferentiated germ cells found in the testis '
'of a male kid. They will eventually develop '
'into sperm cells through the process of '
'spermatogenesis. The image is stained with '
'hematoxylin and eosin (H&E).'}],
'domain': {'chest_xray': False,
'ct_scan': False,
'gross': False,
'histology': True,
'mri': False},
'fig_caption': 'Photomicrograph of the testis of a two-month old male kid '
'showing the presence of propermatogonia (arrows), H&E., 1000 '
'X.',
'fig_id': 'fig5',
'fig_label': 'Figure 5',
'in_text_mention': ['These cells were termed as prespermatogonia which could '
'be seen in the sex cords of 2 month-old kids ( group-II '
') ( Figure 5 ) .'],
'pair_id': '22567313_fig5',
'pmid': '22567313'},
{'conversations': [{'from': 'human', 'value': 'Which organ is in the image?'},
{'from': 'gpt',
'value': 'The organ in the image is the sacrum, which is '
'part of the human skeletal system. The sacrum '
'is a large, triangular bone at the base of the '
'spine and at the upper and back part of the '
'pelvic cavity, where it is inserted like a '
'wedge between the two hip bones. Its upper part '
'connects with the last lumbar vertebra, and '
'bottom part with the coccyx (tailbone).'},
{'from': 'human', 'value': 'What are the arrows pointing?'},
{'from': 'gpt',
'value': 'The arrows in the MRI image are likely pointing '
'to areas of patchy, low-intensity edema. Edema '
'refers to an abnormal accumulation of fluid in '
'the tissues, which can be caused by various '
'conditions such as inflammation, injury, or '
'disease.'},
{'from': 'human',
'value': 'What does it tell about the sacrum?'},
{'from': 'gpt',
'value': 'The axial T1-weighted MRI image of the sacrum '
'shows patchy, low-intensity edema, as marked by '
'arrows. Additionally, the T1-weighted images '
'demonstrate symmetrical hypointense areas '
'within both sacral alar. In simpler terms, the '
'MRI image reveals swelling (edema) in the '
'sacrum region, which appears as patchy, '
'low-intensity areas on the image. Furthermore, '
'the sacral alar, which are the wing-like '
'structures on either side of the sacrum, '
'exhibit symmetrical hypointense (darker) areas. '
'This may indicate some sort of injury, '
'inflammation, or other pathological changes in '
'the sacrum region. Further analysis and '
'clinical correlation are needed to determine '
'the cause and significance of these findings.'}],
'domain': {'chest_xray': False,
'ct_scan': False,
'gross': False,
'histology': False,
'mri': True},
'fig_caption': 'Axial T1-weighted MRI image of sacrum. Note: Patchy, '
'low-intensity edema evident (arrows). Abbreviation: MRI, '
'magnetic resonance imaging.',
'fig_id': 'f2-imcrj-7-093',
'fig_label': 'Figure 2',
'in_text_mention': ['T1-weighted images of the sacrum demonstrated '
'symmetrical hypointense areas within both sacral alar ( '
'Figure 2 ) .'],
'pair_id': '24940083_f2-imcrj-7-093',
'pmid': '24940083'}]