This model performs medical image classification and report generation using a custom architecture that combines a video model and a text generation model.
Model Details
Architecture
: Custom model combining a 3D ResNet (
r3d_18
) and BioBART.
Tasks
:
Classification
: Classifies medical images into one of four classes: acute, normal, chronic, or lacunar.
Report Generation
: Generates medical reports based on the input images.
Usage
import torch
from transformers import AutoTokenizer
from model import CombinedModel, ImageToTextProjector
from torchvision import models
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("YOUR_HF_USERNAME/combined-multimodal-model")
# Initialize models
video_model = models.video.r3d_18(pretrained=True)
video_model.fc = torch.nn.Linear(video_model.fc.in_features, 512)
report_generator = AutoModelForSeq2SeqLM.from_pretrained("GanjinZero/biobart-v2-base")
projector = ImageToTextProjector(512, report_generator.config.d_model)
num_classes = 4
combined_model = CombinedModel(video_model, report_generator, num_classes, projector)
# Load state dict
state_dict = torch.hub.load_state_dict_from_url(
"https://huggingface.co/YOUR_HF_USERNAME/combined-multimodal-model/resolve/main/pytorch_model.bin",
map_location=torch.device('cpu')
)
combined_model.load_state_dict(state_dict)
combined_model.eval()
# Now you can use combined_model for inference
Runs of KYAGABA combined-multimodal-model on huggingface.co
3
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
3
30-day runs
More Information About combined-multimodal-model huggingface.co Model
combined-multimodal-model huggingface.co
combined-multimodal-model huggingface.co is an AI model on huggingface.co that provides combined-multimodal-model's model effect (), which can be used instantly with this KYAGABA combined-multimodal-model model. huggingface.co supports a free trial of the combined-multimodal-model model, and also provides paid use of the combined-multimodal-model. Support call combined-multimodal-model model through api, including Node.js, Python, http.
combined-multimodal-model huggingface.co is an online trial and call api platform, which integrates combined-multimodal-model's modeling effects, including api services, and provides a free online trial of combined-multimodal-model, you can try combined-multimodal-model online for free by clicking the link below.
KYAGABA combined-multimodal-model online free url in huggingface.co:
combined-multimodal-model is an open source model from GitHub that offers a free installation service, and any user can find combined-multimodal-model on GitHub to install. At the same time, huggingface.co provides the effect of combined-multimodal-model install, users can directly use combined-multimodal-model installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
combined-multimodal-model install url in huggingface.co: