Image Classification
Transformers
Safetensors
siglip2_hier_doc
feature-extraction
siglip2
document-classification
hierarchical
multi-task
custom_code
Instructions to use ekacare/med-doc-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ekacare/med-doc-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="ekacare/med-doc-classifier", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ekacare/med-doc-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 5,108 Bytes
29467f3 | 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 | {
"architectures": [
"Siglip2HierForDocClassification"
],
"auto_map": {
"AutoConfig": "configuration_siglip2_hier.Siglip2HierConfig",
"AutoModel": "modeling_siglip2_hier.Siglip2HierForDocClassification"
},
"base_model_id": "google/siglip2-base-patch16-naflex",
"default_scope": "flat",
"dtype": "bfloat16",
"flat_l2_classes": [
"letter",
"other_document",
"scan_interpretation",
"lab_diagnostic_report",
"opd_consultation_record",
"discharge_summary",
"insurance_document",
"form",
"invoice_bill",
"certificate",
"other_miscellaneous",
"medication_image",
"ultrasound",
"x_ray",
"mri",
"ct",
"other_diagnostic_imaging",
"abha_card",
"voter_id",
"aadhaar_card",
"insurance_e_card",
"pan_card",
"pmjay_ayushman",
"other_card",
"headshot",
"skin_wound",
"other_body_images"
],
"flat_l2_to_l1": {
"aadhaar_card": "Card / credential",
"abha_card": "Card / credential",
"certificate": "Document",
"ct": "Diagnostic imaging",
"discharge_summary": "Document",
"form": "Document",
"headshot": "Body images",
"insurance_document": "Document",
"insurance_e_card": "Card / credential",
"invoice_bill": "Document",
"lab_diagnostic_report": "Document",
"letter": "Document",
"medication_image": "Miscellaneous",
"mri": "Diagnostic imaging",
"opd_consultation_record": "Document",
"other_body_images": "Body images",
"other_card": "Card / credential",
"other_diagnostic_imaging": "Diagnostic imaging",
"other_document": "Document",
"other_miscellaneous": "Miscellaneous",
"pan_card": "Card / credential",
"pmjay_ayushman": "Card / credential",
"scan_interpretation": "Document",
"skin_wound": "Body images",
"ultrasound": "Diagnostic imaging",
"voter_id": "Card / credential",
"x_ray": "Diagnostic imaging"
},
"hand_classes": [
"printed",
"handwritten"
],
"head_hidden": 512,
"hidden_size": 768,
"l1_classes": [
"Document",
"Miscellaneous",
"Diagnostic imaging",
"Card / credential",
"Body images"
],
"l2_by_l1": {
"Body images": [
"headshot",
"skin_wound",
"other_body_images"
],
"Card / credential": [
"abha_card",
"voter_id",
"aadhaar_card",
"insurance_e_card",
"pan_card",
"pmjay_ayushman",
"other_card"
],
"Diagnostic imaging": [
"ultrasound",
"x_ray",
"mri",
"ct",
"other_diagnostic_imaging"
],
"Document": [
"letter",
"other_document",
"scan_interpretation",
"lab_diagnostic_report",
"opd_consultation_record",
"discharge_summary",
"insurance_document",
"form",
"invoice_bill",
"certificate"
],
"Miscellaneous": [
"other_miscellaneous",
"medication_image"
]
},
"l2_display": {
"aadhaar_card": "Aadhaar card",
"abha_card": "ABHA card",
"certificate": "Certificate",
"ct": "CT",
"discharge_summary": "Discharge summary",
"form": "Form",
"headshot": "Headshot",
"insurance_document": "Insurance document",
"insurance_e_card": "Insurance e-card",
"invoice_bill": "Invoice / bill",
"lab_diagnostic_report": "Lab / diagnostic report",
"letter": "Letter",
"medication_image": "Medication image",
"mri": "MRI",
"opd_consultation_record": "OPD Consultation Record",
"other_body_images": "Other (Body images)",
"other_card": "Other card",
"other_diagnostic_imaging": "Other (Diagnostic imaging)",
"other_document": "Other document",
"other_miscellaneous": "Other (Miscellaneous)",
"pan_card": "PAN card",
"pmjay_ayushman": "PMJAY / Ayushman",
"scan_interpretation": "Scan interpretation",
"skin_wound": "Skin / wound",
"ultrasound": "Ultrasound",
"voter_id": "Voter ID",
"x_ray": "X-ray"
},
"max_num_patches": 1024,
"med_classes": [
"non_medical",
"medical"
],
"model_type": "siglip2_hier_doc",
"qual_classes": [
"poor",
"good"
],
"quality_score_label": "good",
"quality_score_max": 100,
"quality_score_min": 1,
"sigmoid_heads": [
"med",
"hand",
"qual"
],
"transformers_version": "5.10.2",
"vision_config": {
"_name_or_path": "",
"architectures": null,
"attention_dropout": 0.0,
"chunk_size_feed_forward": 0,
"dtype": null,
"hidden_act": "gelu_pytorch_tanh",
"hidden_size": 768,
"id2label": {
"0": "LABEL_0",
"1": "LABEL_1"
},
"intermediate_size": 3072,
"is_encoder_decoder": false,
"label2id": {
"LABEL_0": 0,
"LABEL_1": 1
},
"layer_norm_eps": 1e-06,
"model_type": "siglip2_vision_model",
"num_attention_heads": 12,
"num_channels": 3,
"num_hidden_layers": 12,
"num_patches": 256,
"output_attentions": false,
"output_hidden_states": false,
"patch_size": 16,
"problem_type": null,
"return_dict": true,
"transformers_version": "5.10.2"
}
}
|