Upload VQA model in safetensors format after training
Browse files- config.json +143 -0
- metadata.json +9 -0
- model.safetensors +3 -0
config.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cnn_type": "vit-base",
|
| 3 |
+
"config_dict": {
|
| 4 |
+
"answer_spaces": {
|
| 5 |
+
"choice_multiple": {
|
| 6 |
+
"barretts": 3,
|
| 7 |
+
"biopsy forceps": 14,
|
| 8 |
+
"cecum": 8,
|
| 9 |
+
"hemorrhoids": 5,
|
| 10 |
+
"ileum": 6,
|
| 11 |
+
"injection needle": 13,
|
| 12 |
+
"metal clip": 11,
|
| 13 |
+
"none": 15,
|
| 14 |
+
"oesophagitis": 0,
|
| 15 |
+
"polyp": 4,
|
| 16 |
+
"polyp snare": 12,
|
| 17 |
+
"pylorus": 9,
|
| 18 |
+
"short-segment barretts": 2,
|
| 19 |
+
"tube": 10,
|
| 20 |
+
"ulcerative colitis": 1,
|
| 21 |
+
"z-line": 7
|
| 22 |
+
},
|
| 23 |
+
"choice_single": {
|
| 24 |
+
"11-20mm": 8,
|
| 25 |
+
"5-10mm": 7,
|
| 26 |
+
"<5mm": 6,
|
| 27 |
+
">20": 10,
|
| 28 |
+
">20mm": 9,
|
| 29 |
+
"capsule endoscopy": 3,
|
| 30 |
+
"colonoscopy": 4,
|
| 31 |
+
"gastroscopy": 5,
|
| 32 |
+
"none": 11,
|
| 33 |
+
"paris iia": 1,
|
| 34 |
+
"paris ip": 0,
|
| 35 |
+
"paris is": 2
|
| 36 |
+
},
|
| 37 |
+
"color": {
|
| 38 |
+
"black": 3,
|
| 39 |
+
"blue": 8,
|
| 40 |
+
"brown": 11,
|
| 41 |
+
"flesh": 1,
|
| 42 |
+
"green": 10,
|
| 43 |
+
"grey": 9,
|
| 44 |
+
"landmark:grey": 0,
|
| 45 |
+
"none": 13,
|
| 46 |
+
"orange": 4,
|
| 47 |
+
"pink": 2,
|
| 48 |
+
"purple": 12,
|
| 49 |
+
"red": 5,
|
| 50 |
+
"white": 6,
|
| 51 |
+
"yellow": 7
|
| 52 |
+
},
|
| 53 |
+
"location": {
|
| 54 |
+
"center": 4,
|
| 55 |
+
"center-left": 3,
|
| 56 |
+
"center-right": 5,
|
| 57 |
+
"lower-center": 7,
|
| 58 |
+
"lower-left": 6,
|
| 59 |
+
"lower-right": 8,
|
| 60 |
+
"lower-rigth": 8,
|
| 61 |
+
"none": 9,
|
| 62 |
+
"upper-center": 1,
|
| 63 |
+
"upper-left": 0,
|
| 64 |
+
"upper-right": 2
|
| 65 |
+
},
|
| 66 |
+
"numerical": {
|
| 67 |
+
"0": 0,
|
| 68 |
+
"1": 1,
|
| 69 |
+
"10": 10,
|
| 70 |
+
"11": 11,
|
| 71 |
+
"12": 12,
|
| 72 |
+
"13": 13,
|
| 73 |
+
"14": 14,
|
| 74 |
+
"15": 15,
|
| 75 |
+
"16": 16,
|
| 76 |
+
"2": 2,
|
| 77 |
+
"3": 3,
|
| 78 |
+
"4": 4,
|
| 79 |
+
"5": 5,
|
| 80 |
+
"6": 6,
|
| 81 |
+
"7": 7,
|
| 82 |
+
"8": 8,
|
| 83 |
+
"9": 9
|
| 84 |
+
},
|
| 85 |
+
"yesno": {
|
| 86 |
+
"no": 1,
|
| 87 |
+
"not relevant": 2,
|
| 88 |
+
"yes": 0
|
| 89 |
+
}
|
| 90 |
+
},
|
| 91 |
+
"batch_size": 32,
|
| 92 |
+
"captions_file": "data/kvasir-captions.json",
|
| 93 |
+
"checkpoint_path": "artifacts/vqa_cnn_bilstm.pth",
|
| 94 |
+
"cnn_out_dim": 512,
|
| 95 |
+
"dataset_name": "SimulaMet-HOST/Kvasir-VQA",
|
| 96 |
+
"device": "cuda",
|
| 97 |
+
"embedding_dim": 128,
|
| 98 |
+
"hidden_dim": 256,
|
| 99 |
+
"img_dir": "data/images",
|
| 100 |
+
"img_size": [
|
| 101 |
+
224,
|
| 102 |
+
224
|
| 103 |
+
],
|
| 104 |
+
"jsonl_file": "data/kvasir-vqa.jsonl",
|
| 105 |
+
"learning_rate": 0.0001,
|
| 106 |
+
"max_seq_len": 20,
|
| 107 |
+
"num_epochs": 1,
|
| 108 |
+
"num_workers": 2,
|
| 109 |
+
"output_dir": "artifacts/output",
|
| 110 |
+
"patience": 5,
|
| 111 |
+
"question_types": {
|
| 112 |
+
"Are there any abnormalities in the image? Check all that are present.": "choice_multiple",
|
| 113 |
+
"Are there any anatomical landmarks in the image? Check all that are present.": "choice_multiple",
|
| 114 |
+
"Are there any instruments in the image? Check all that are present.": "choice_multiple",
|
| 115 |
+
"Does this image contain any finding?": "yesno",
|
| 116 |
+
"Have all polyps been removed?": "yesno",
|
| 117 |
+
"How many findings are present?": "numerical",
|
| 118 |
+
"How many instruments are in the image?": "numerical",
|
| 119 |
+
"How many instrumnets are in the image?": "numerical",
|
| 120 |
+
"How many polyps are in the image?": "numerical",
|
| 121 |
+
"Is there a green/black box artefact?": "yesno",
|
| 122 |
+
"Is there text?": "yesno",
|
| 123 |
+
"Is this finding easy to detect?": "yesno",
|
| 124 |
+
"What color is the abnormality? If more than one separate with ;": "color",
|
| 125 |
+
"What color is the anatomical landmark? If more than one separate with ;": "color",
|
| 126 |
+
"What is the size of the polyp?": "choice_single",
|
| 127 |
+
"What type of polyp is present?": "choice_single",
|
| 128 |
+
"What type of procedure is the image taken from?": "choice_single",
|
| 129 |
+
"Where in the image is the abnormality?": "location",
|
| 130 |
+
"Where in the image is the anatomical landmark?": "location",
|
| 131 |
+
"Where in the image is the instrument?": "location"
|
| 132 |
+
},
|
| 133 |
+
"seed": 42,
|
| 134 |
+
"test_split": 0.15,
|
| 135 |
+
"train_split": 0.7,
|
| 136 |
+
"use_multi_gpu": true,
|
| 137 |
+
"val_split": 0.15,
|
| 138 |
+
"vocab_size": 1399
|
| 139 |
+
},
|
| 140 |
+
"model_type": "vqa_cnn_bilstm",
|
| 141 |
+
"transformers_version": "4.51.1",
|
| 142 |
+
"vocab_size": 1399
|
| 143 |
+
}
|
metadata.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "vit-base",
|
| 3 |
+
"dataset": "SimulaMet-HOST/Kvasir-VQA",
|
| 4 |
+
"training_args": {
|
| 5 |
+
"batch_size": 32,
|
| 6 |
+
"num_epochs": 1,
|
| 7 |
+
"learning_rate": 0.0001
|
| 8 |
+
}
|
| 9 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7b78bf022353183e0a969c90510a50690ec02587edecc2db88d89574b988c4f
|
| 3 |
+
size 368335032
|