Dataset Viewer
Auto-converted to Parquet Duplicate
image
imagewidth (px)
1.02k
1.02k
image_id
stringlengths
12
12
sub_dataset
stringclasses
1 value
category
stringclasses
5 values
category_bn
stringclasses
5 values
modality
stringclasses
9 values
organ
stringclasses
18 values
question_en
stringclasses
433 values
answer_en
stringclasses
533 values
question_bn
stringlengths
17
88
answer_bn
stringclasses
680 values
00029039_020
chest_x-ray
abnormality
অস্বাভাবিকতা
Is an abnormality present?
Yes
কোন অস্বাভাবিকতা উপস্থিত আছে?
হ্যাঁ
00020751_003
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is an abnormality present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা উপস্থিত আছে?
হ্যাঁ
00023766_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities identified in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
না
00000744_006
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray.
Chest.
Does this image show any abnormalities?
Yes.
এই ছবিতে কোনো অস্বাভাবিকতা দেখা যাচ্ছে কি?
হ্যাঁ।
00009689_005
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities noted in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00022178_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00002763_031
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is an abnormality present in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা আছে কি?
হ্যাঁ
00019260_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is an abnormality present?
No
কি কোনও অস্বাভাবিকতা বিদ্যমান আছে?
না
00002980_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest.
Are abnormalities present?
Yes.
অস্বাভাবিকতা আছে কি?
হ্যাঁ।
00015799_012
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00005532_014
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00012428_003
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities noted in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00000143_005
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present?
No
কি কোনো অস্বাভাবিকতা আছে?
না
00027045_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities visible in this image?
No
এই ছবিতে কোন অস্বাভাবিকতা দৃশ্যমান আছে কি?
না
00017124_004
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00013555_009
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00010277_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Is there any abnormality present?
Yes
কি কোনও অস্বাভাবিকতা বিদ্যমান আছে?
হ্যাঁ
00010277_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00021896_003
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
Yes
এই ইমেজে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00030162_026
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00030279_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00010381_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Heart
Is an abnormality present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00010092_018
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Is there any abnormality detected in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা সনাক্ত হয়েছে কি?
হ্যাঁ
00010384_011
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা উপস্থিত আছে কি?
না
00016934_006
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities noted in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00017747_008
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Is an abnormality present in this image?
Yes
এই চিত্রে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00013991_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is there any abnormality present in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা আছে কি?
হ্যাঁ
00028816_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
না
00020857_008
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00011831_008
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00027817_001
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00016564_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray chest
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00004344_014
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is there any abnormality present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00029469_007
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Does this image show any abnormalities?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা দেখাচ্ছে কি?
হ্যাঁ
00019238_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Lungs
Is there any abnormality identified in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা চিহ্নিত হয়েছে কি?
না
00014778_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are abnormalities present?
Yes
অস্বাভাবিকতা উপস্থিত আছে কি?
হ্যাঁ
00007676_002
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00029532_014
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00019857_002
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities noted in the image?
No
চিত্রে কোন অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00001170_046
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are any abnormalities present?
Yes
কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00022215_012
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities noted in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
হ্যাঁ
00018361_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Are any abnormalities reported in the metadata for this image?
No
এই ছবির মেটাডেটাতে কোন অস্বাভাবিকতা রিপোর্ট করা হয়েছে?
না
00005730_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present?
No
কোনও অস্বাভাবিকতা আছে কি?
না
00012021_081
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present?
Yes
কি কোনো অস্বাভাবিকতা আছে?
হ্যাঁ
00021423_002
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities detected?
No
কোন অস্বাভাবিকতা সনাক্ত করা হয়েছে কি?
না
00010071_008
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest/Lungs
Is there any abnormality identified in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
হ্যাঁ
00010481_021
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00013850_000
chest_x-ray
abnormality
অস্বাভাবিকতা
x-ray
chest
Are there any abnormalities present in this image?
no
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00016487_002
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা উপস্থিত আছে?
হ্যাঁ
00016837_002
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities noted in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
হ্যাঁ
00026098_004
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Thoracic
Are there any abnormalities reported in the metadata?
No
মেটাডেটাতে কোনও অস্বাভাবিকতা রিপোর্ট করা হয়েছে কি?
না
00026451_068
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00012663_001
chest_x-ray
abnormality
অস্বাভাবিকতা
x-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00010172_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities noted in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
হ্যাঁ
00017981_004
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities identified in this image?
No
এই ছবিতে কি কোনও অস্বাভাবিকতা চিহ্নিত করা হয়েছে?
না
00002856_009
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Is an abnormality detected in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা সনাক্ত করা হয়েছে কি?
হ্যাঁ
00006186_005
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00017346_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00020967_004
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities noted in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00001688_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Does this image show any abnormalities?
Yes
এই ছবিতে কোন অস্বাভাবিকতা দেখা যাচ্ছে?
হ্যাঁ
00028873_009
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা আছে কি?
হ্যাঁ
00030801_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities noted in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা লক্ষ্য করা গেছে?
না
00018421_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোন অস্বাভাবিকতা আছে?
না
00015770_010
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities noted in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
হ্যাঁ
00003269_011
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities noted in this image?
No
এই ইমেজে কোন অস্বাভাবিকতা লক্ষ্য করা গেছে?
না
00028639_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities identified in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
না
00029250_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
No
এই চিত্রে কোন অস্বাভাবিকতা উপস্থিত আছে কি?
না
00029088_023
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00008814_010
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities present?
Yes
কি কোনও অস্বাভাবিকতা বিদ্যমান আছে?
হ্যাঁ
00029105_015
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00011649_008
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00018253_059
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Does this image show any abnormalities?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00012656_003
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
না
00019373_036
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00014447_004
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00011862_002
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
No
এই ইমেজে কোনও অস্বাভাবিকতা আছে কি?
না
00022611_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00027568_000
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities identified in this image?
No
এই ছবিতে কোনও অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
না
00018694_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray chest.
Chest.
Is there any abnormality present in this image?
No.
এই ছবিতে কোন অস্বাভাবিকতা আছে কি?
না।
00027455_007
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা উপস্থিত আছে কি?
না
00011477_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
না
00013111_069
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is an abnormality present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00025252_032
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities identified in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
হ্যাঁ
00000344_003
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is an abnormality present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00017670_005
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00024279_008
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
No
এই ইমেজে কোনো অস্বাভাবিকতা আছে কি?
না
00005791_008
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities noted in the metadata?
No
মেটাডেটাতে কোনো অস্বাভাবিকতা লক্ষ্য করা গেছে কি?
না
00013461_011
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities visible?
Yes
কোন অস্বাভাবিকতা দৃশ্যমান আছে কি?
হ্যাঁ
00010575_002
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00009669_003
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
হ্যাঁ
00018254_006
chest_x-ray
abnormality
অস্বাভাবিকতা
x-ray
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
না
00009683_005
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Does this image show any abnormalities?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা দেখা যাচ্ছে কি?
হ্যাঁ
00004296_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Is there any abnormality identified in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
হ্যাঁ
00014976_003
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00030015_001
chest_x-ray
abnormality
অস্বাভাবিকতা
Are there any abnormalities identified in this image?
No.
এই চিত্রে কোনও অস্বাভাবিকতা চিহ্নিত করা হয়েছে কি?
না।
00014626_017
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Chest
Are there any abnormalities present in this image?
Yes
এই ছবিতে কোনও অস্বাভাবিকতা আছে কি?
হ্যাঁ
00015794_000
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray chest
Chest
Are there any abnormalities noted in this image?
Yes
এই ছবিতে কোন অস্বাভাবিকতা লক্ষ্য করা গেছে?
হ্যাঁ
00013601_016
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
না
00016786_001
chest_x-ray
abnormality
অস্বাভাবিকতা
X-ray
Is an abnormality present?
Yes
কি কোনো অস্বাভাবিকতা আছে?
হ্যাঁ
00017717_004
chest_x-ray
abnormality
অস্বাভাবিকতা
Chest
Are there any abnormalities present in this image?
No
এই ছবিতে কোনো অস্বাভাবিকতা আছে কি?
না
End of preview. Expand in Data Studio

Medical VQA LoRA Training

Fine-tuning google/medgemma-4b-it vision-language model using FP32 LoRA with LLaMA Factory for Bengali medical question answering.

📁 Repository Structure

med-vqa-lora/
├── configs/
│   ├── qwen2.5-vl-7b.yaml        # Training configuration
│   ├── qwen2.5-vl-7b-test.yaml   # Testing configuration
│   ├── med-gemma-4b.yaml         # Legacy MedGemma training config
│   └── med-gemma-4b-test.yaml    # Legacy MedGemma testing config
├── data/
│   ├── dataset_info.json          # Master dataset registry
│   ├── chest_x-ray/
│   │   ├── train/
│   │   │   ├── images/            # Training images
│   │   │   ├── chest_x-ray.csv    # Training data
│   │   │   └── chest_x-ray_dataset.json
│   │   └── test/
│   │       ├── images/            # Test images
│   │       ├── chest_x-ray.csv    # Test data
│   │       └── chest_x-ray_dataset.json
│   └── medicat/
│       └── train/
│           ├── images/            # Medicat training images
│           ├── medicat.csv        # Medicat training data
│           └── medicat_dataset.json
├── output/                        # Model outputs and predictions
├── prepare_data.py                # Data preparation script
├── train_model.py                 # Main training/testing script
├── requirements.txt               # Python dependencies
├── Dockerfile                     # Container setup
└── README.md                      # This file

🚀 Usage

1. Build Docker Container

docker build -t med-vqa:latest .

2. Prepare Data

# Prepare all datasets
docker run --rm -v $(pwd):/app med-vqa:latest python prepare_data.py --all

# Prepare specific dataset
docker run --rm -v $(pwd):/app med-vqa:latest python prepare_data.py --dataset chest_x-ray --split train

3. Run Training

docker run --gpus all --ipc=host --rm --env-file .env -v $(pwd):/app med-vqa:latest python train_model.py --config configs/med-gemma-4b.yaml

4. Run Testing

docker run --gpus all --ipc=host --rm --env-file .env -v $(pwd):/app med-vqa:latest python train_model.py --config configs/med-gemma-4b-test.yaml

5. Complete Pipeline

# Train and test in sequence
docker run --gpus all --ipc=host --rm --env-file .env -v $(pwd):/app med-vqa:latest python train_model.py --config configs/med-gemma-4b.yaml
docker run --gpus all --ipc=host --rm --env-file .env -v $(pwd):/app med-vqa:latest python train_model.py --config configs/med-gemma-4b-test.yaml

⚙️ Configuration

Training (configs/med-gemma-4b.yaml)

  • Model: google/medgemma-4b-it
  • LoRA Rank: 16, Alpha: 32
  • Batch Size: 2 per device, 2 gradient accumulation
  • Template: gemma3

Testing (configs/med-gemma-4b-test.yaml)

  • Loads trained adapter from ./output
  • Generates predictions for test dataset

📝 Data Preparation

# Prepare all datasets
python prepare_data.py --all

# Prepare specific dataset
python prepare_data.py --dataset chest_x-ray --split train

# Custom paths
python prepare_data.py --dataset chest_x-ray --split test --csv data/chest_x-ray/test/chest_x-ray.csv --images data/chest_x-ray/test/images --output data/chest_x-ray/test/chest_x-ray_dataset.json

🎯 Output Files

Training Outputs

  • output/adapter_model.safetensors - LoRA weights (119MB)
  • output/adapter_config.json - LoRA configuration
  • output/checkpoint-32/ - Training checkpoint
  • output/train_results.json - Training metrics

Test Predictions

  • output/chest_x-ray_test_predictions.csv - Test predictions with columns:
    • image_id, image_path, category, category_bn
    • question, question_bn, llm_answer, llm_answer_bn
    • predicted_answer_bn - Model's predictions

🔍 Example Usage

Sample Predictions

image_id,image_path,question_bn,llm_answer_bn,predicted_answer_bn
test_001,data/chest_x-ray/test/images/00015953_015.png,এখানে কোন নির্দিষ্ট অবস্থা চিহ্নিত করা হয়েছে?,কোন নির্দিষ্ট অবস্থা চিহ্নিত হয়নি।,কোন নির্দিষ্ট অবস্থা চিহ্নিত করা হয়নি।
test_002,data/chest_x-ray/test/images/00011237_094.png,অনুপ্রবেশটি কোথায় অবস্থিত?,মধ্য ডান,মধ্য বাম

Model Loading

from transformers import AutoModelForCausalLM, AutoProcessor
from peft import PeftModel

model = AutoModelForCausalLM.from_pretrained("google/medgemma-4b-it")
processor = AutoProcessor.from_pretrained("google/medgemma-4b-it")
model = PeftModel.from_pretrained(model, "./output")
Downloads last month
93