Hongyu Zhou
commited on
Commit
•
a8889be
1
Parent(s):
604cb3d
update
Browse files- README.md +1 -1
- __pycache__/utils.cpython-39.pyc +0 -0
- inference.py +8 -1
- medomni/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/common/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/common/__pycache__/config.cpython-39.pyc +0 -0
- medomni/common/__pycache__/dist_utils.cpython-39.pyc +0 -0
- medomni/common/__pycache__/logger.cpython-39.pyc +0 -0
- medomni/common/__pycache__/registry.cpython-39.pyc +0 -0
- medomni/common/__pycache__/utils.cpython-39.pyc +0 -0
- medomni/datasets/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/datasets/__pycache__/data_utils.cpython-39.pyc +0 -0
- medomni/datasets/builders/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/datasets/builders/__pycache__/base_dataset_builder.cpython-39.pyc +0 -0
- medomni/datasets/builders/__pycache__/image_text_pair_builder.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/base_dataset.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/caption_datasets.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/cc_sbu_dataset.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/laion_dataset.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/med_dataset.cpython-39.pyc +0 -0
- medomni/datasets/datasets/__pycache__/medcaption_datasets.cpython-39.pyc +0 -0
- medomni/models/__pycache__/Qformer.cpython-39.pyc +0 -0
- medomni/models/__pycache__/UNet.cpython-39.pyc +0 -0
- medomni/models/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/models/__pycache__/base_model.cpython-39.pyc +0 -0
- medomni/models/__pycache__/blip2.cpython-39.pyc +0 -0
- medomni/models/__pycache__/eva_vit.cpython-39.pyc +0 -0
- medomni/models/__pycache__/medomni.cpython-39.pyc +0 -0
- medomni/models/__pycache__/modeling_llama.cpython-39.pyc +0 -0
- medomni/models/pyarmor_runtime_000000/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/processors/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/processors/__pycache__/base_processor.cpython-39.pyc +0 -0
- medomni/processors/__pycache__/blip_processors.cpython-39.pyc +0 -0
- medomni/processors/__pycache__/randaugment.cpython-39.pyc +0 -0
- medomni/tasks/__pycache__/__init__.cpython-39.pyc +0 -0
- medomni/tasks/__pycache__/base_task.cpython-39.pyc +0 -0
- medomni/tasks/__pycache__/image_text_pretrain.cpython-39.pyc +0 -0
README.md
CHANGED
@@ -42,7 +42,7 @@ from torch import cuda
|
|
42 |
# --- Launch Model ---
|
43 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
44 |
model_cls = registry.get_model_class('medomni') # medomni is the architecture name :)
|
45 |
-
model = model_cls.from_pretrained('hyzhou/
|
46 |
|
47 |
# --- Define examples ---
|
48 |
examples = [
|
|
|
42 |
# --- Launch Model ---
|
43 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
44 |
model_cls = registry.get_model_class('medomni') # medomni is the architecture name :)
|
45 |
+
model = model_cls.from_pretrained('hyzhou/MedVersa_Internal').to(device).eval()
|
46 |
|
47 |
# --- Define examples ---
|
48 |
examples = [
|
__pycache__/utils.cpython-39.pyc
CHANGED
Binary files a/__pycache__/utils.cpython-39.pyc and b/__pycache__/utils.cpython-39.pyc differ
|
|
inference.py
CHANGED
@@ -4,7 +4,7 @@ from torch import cuda
|
|
4 |
# --- Launch Model ---
|
5 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
6 |
model_cls = registry.get_model_class('medomni') # medomni is the architecture name :)
|
7 |
-
model = model_cls.from_pretrained('hyzhou/
|
8 |
|
9 |
# --- Define examples ---
|
10 |
examples = [
|
@@ -43,6 +43,13 @@ examples = [
|
|
43 |
"cxr",
|
44 |
"report generation",
|
45 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
[
|
47 |
["./demo_ex/ISIC_0032258.jpg"],
|
48 |
"Age:70.\nGender:female.\nLocation:back.",
|
|
|
4 |
# --- Launch Model ---
|
5 |
device = 'cuda' if cuda.is_available() else 'cpu'
|
6 |
model_cls = registry.get_model_class('medomni') # medomni is the architecture name :)
|
7 |
+
model = model_cls.from_pretrained('hyzhou/MedVersa_Internal').to(device).eval()
|
8 |
|
9 |
# --- Define examples ---
|
10 |
examples = [
|
|
|
43 |
"cxr",
|
44 |
"report generation",
|
45 |
],
|
46 |
+
[
|
47 |
+
["./demo_ex/79eee504-b1b60ab8-5e8dd843-b6ed87aa-670747b1.png"],
|
48 |
+
"",
|
49 |
+
"What is the primary diagnosis?",
|
50 |
+
"cxr",
|
51 |
+
"classification",
|
52 |
+
],
|
53 |
[
|
54 |
["./demo_ex/ISIC_0032258.jpg"],
|
55 |
"Age:70.\nGender:female.\nLocation:back.",
|
medomni/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/__pycache__/__init__.cpython-39.pyc and b/medomni/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/common/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/__init__.cpython-39.pyc and b/medomni/common/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/common/__pycache__/config.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/config.cpython-39.pyc and b/medomni/common/__pycache__/config.cpython-39.pyc differ
|
|
medomni/common/__pycache__/dist_utils.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/dist_utils.cpython-39.pyc and b/medomni/common/__pycache__/dist_utils.cpython-39.pyc differ
|
|
medomni/common/__pycache__/logger.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/logger.cpython-39.pyc and b/medomni/common/__pycache__/logger.cpython-39.pyc differ
|
|
medomni/common/__pycache__/registry.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/registry.cpython-39.pyc and b/medomni/common/__pycache__/registry.cpython-39.pyc differ
|
|
medomni/common/__pycache__/utils.cpython-39.pyc
CHANGED
Binary files a/medomni/common/__pycache__/utils.cpython-39.pyc and b/medomni/common/__pycache__/utils.cpython-39.pyc differ
|
|
medomni/datasets/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/__pycache__/__init__.cpython-39.pyc and b/medomni/datasets/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/datasets/__pycache__/data_utils.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/__pycache__/data_utils.cpython-39.pyc and b/medomni/datasets/__pycache__/data_utils.cpython-39.pyc differ
|
|
medomni/datasets/builders/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/builders/__pycache__/__init__.cpython-39.pyc and b/medomni/datasets/builders/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/datasets/builders/__pycache__/base_dataset_builder.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/builders/__pycache__/base_dataset_builder.cpython-39.pyc and b/medomni/datasets/builders/__pycache__/base_dataset_builder.cpython-39.pyc differ
|
|
medomni/datasets/builders/__pycache__/image_text_pair_builder.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/builders/__pycache__/image_text_pair_builder.cpython-39.pyc and b/medomni/datasets/builders/__pycache__/image_text_pair_builder.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/__init__.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/base_dataset.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/base_dataset.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/base_dataset.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/caption_datasets.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/caption_datasets.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/caption_datasets.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/cc_sbu_dataset.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/cc_sbu_dataset.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/cc_sbu_dataset.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/laion_dataset.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/laion_dataset.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/laion_dataset.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/med_dataset.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/med_dataset.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/med_dataset.cpython-39.pyc differ
|
|
medomni/datasets/datasets/__pycache__/medcaption_datasets.cpython-39.pyc
CHANGED
Binary files a/medomni/datasets/datasets/__pycache__/medcaption_datasets.cpython-39.pyc and b/medomni/datasets/datasets/__pycache__/medcaption_datasets.cpython-39.pyc differ
|
|
medomni/models/__pycache__/Qformer.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/Qformer.cpython-39.pyc and b/medomni/models/__pycache__/Qformer.cpython-39.pyc differ
|
|
medomni/models/__pycache__/UNet.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/UNet.cpython-39.pyc and b/medomni/models/__pycache__/UNet.cpython-39.pyc differ
|
|
medomni/models/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/__init__.cpython-39.pyc and b/medomni/models/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/models/__pycache__/base_model.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/base_model.cpython-39.pyc and b/medomni/models/__pycache__/base_model.cpython-39.pyc differ
|
|
medomni/models/__pycache__/blip2.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/blip2.cpython-39.pyc and b/medomni/models/__pycache__/blip2.cpython-39.pyc differ
|
|
medomni/models/__pycache__/eva_vit.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/eva_vit.cpython-39.pyc and b/medomni/models/__pycache__/eva_vit.cpython-39.pyc differ
|
|
medomni/models/__pycache__/medomni.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/medomni.cpython-39.pyc and b/medomni/models/__pycache__/medomni.cpython-39.pyc differ
|
|
medomni/models/__pycache__/modeling_llama.cpython-39.pyc
CHANGED
Binary files a/medomni/models/__pycache__/modeling_llama.cpython-39.pyc and b/medomni/models/__pycache__/modeling_llama.cpython-39.pyc differ
|
|
medomni/models/pyarmor_runtime_000000/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/models/pyarmor_runtime_000000/__pycache__/__init__.cpython-39.pyc and b/medomni/models/pyarmor_runtime_000000/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/processors/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/processors/__pycache__/__init__.cpython-39.pyc and b/medomni/processors/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/processors/__pycache__/base_processor.cpython-39.pyc
CHANGED
Binary files a/medomni/processors/__pycache__/base_processor.cpython-39.pyc and b/medomni/processors/__pycache__/base_processor.cpython-39.pyc differ
|
|
medomni/processors/__pycache__/blip_processors.cpython-39.pyc
CHANGED
Binary files a/medomni/processors/__pycache__/blip_processors.cpython-39.pyc and b/medomni/processors/__pycache__/blip_processors.cpython-39.pyc differ
|
|
medomni/processors/__pycache__/randaugment.cpython-39.pyc
CHANGED
Binary files a/medomni/processors/__pycache__/randaugment.cpython-39.pyc and b/medomni/processors/__pycache__/randaugment.cpython-39.pyc differ
|
|
medomni/tasks/__pycache__/__init__.cpython-39.pyc
CHANGED
Binary files a/medomni/tasks/__pycache__/__init__.cpython-39.pyc and b/medomni/tasks/__pycache__/__init__.cpython-39.pyc differ
|
|
medomni/tasks/__pycache__/base_task.cpython-39.pyc
CHANGED
Binary files a/medomni/tasks/__pycache__/base_task.cpython-39.pyc and b/medomni/tasks/__pycache__/base_task.cpython-39.pyc differ
|
|
medomni/tasks/__pycache__/image_text_pretrain.cpython-39.pyc
CHANGED
Binary files a/medomni/tasks/__pycache__/image_text_pretrain.cpython-39.pyc and b/medomni/tasks/__pycache__/image_text_pretrain.cpython-39.pyc differ
|
|