Instructions to use toolevalxm/MedVision-DiagNet-TestRepo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use toolevalxm/MedVision-DiagNet-TestRepo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="toolevalxm/MedVision-DiagNet-TestRepo") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("toolevalxm/MedVision-DiagNet-TestRepo") model = AutoModelForImageClassification.from_pretrained("toolevalxm/MedVision-DiagNet-TestRepo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from toolevalxm/MedVision-DiagNet-TestRepo: direct link, hf CLI and curl.
- Browser
- Download file 4.2 kB
-
https://huggingface.co/toolevalxm/MedVision-DiagNet-TestRepo/resolve/main/README.md
- Command line
-
hf download hf://toolevalxm/MedVision-DiagNet-TestRepo/README.md
-
curl -L -o README.md https://huggingface.co/toolevalxm/MedVision-DiagNet-TestRepo/resolve/main/README.md
4.2 kB
| license: apache-2.0 | |
| library_name: transformers | |
| # MedVision-DiagNet | |
| <!-- markdownlint-disable first-line-h1 --> | |
| <!-- markdownlint-disable html --> | |
| <!-- markdownlint-disable no-duplicate-header --> | |
| <div align="center"> | |
| <img src="figures/architecture.png" width="60%" alt="MedVision-DiagNet" /> | |
| </div> | |
| <hr> | |
| <div align="center" style="line-height: 1;"> | |
| <a href="LICENSE" style="margin: 2px;"> | |
| <img alt="License" src="figures/license_badge.png" style="display: inline-block; vertical-align: middle;"/> | |
| </a> | |
| </div> | |
| ## 1. Introduction | |
| MedVision-DiagNet is a state-of-the-art Vision Transformer (ViT) model specifically designed for medical imaging analysis and diagnosis. The model has been trained on a diverse collection of medical imaging datasets including X-rays, CT scans, MRI images, and pathology slides. | |
| <p align="center"> | |
| <img width="80%" src="figures/performance_chart.png"> | |
| </p> | |
| MedVision-DiagNet demonstrates exceptional capabilities across multiple medical imaging modalities. The model achieves competitive performance with radiologist-level accuracy on several benchmark tasks, particularly in tumor detection and lung nodule identification. | |
| Key improvements in this version include: | |
| - Enhanced feature extraction for small lesion detection | |
| - Improved generalization across different imaging equipment | |
| - Reduced false positive rates while maintaining high sensitivity | |
| ## 2. Evaluation Results | |
| ### Comprehensive Benchmark Results | |
| <div align="center"> | |
| | | Benchmark | RadNet-Base | DeepMed-V2 | MedViT-Pro | MedVision-DiagNet | | |
| |---|---|---|---|---|---| | |
| | **Radiology Tasks** | X-ray Classification | 0.780 | 0.795 | 0.810 | 0.725 | | |
| | | CT Segmentation | 0.720 | 0.745 | 0.760 | 0.681 | | |
| | | MRI Analysis | 0.690 | 0.715 | 0.730 | 0.759 | | |
| | **Oncology Tasks** | Tumor Detection | 0.755 | 0.780 | 0.800 | 0.743 | | |
| | | Pathology Grading | 0.710 | 0.735 | 0.750 | 0.735 | | |
| | | Mammography Screening | 0.765 | 0.785 | 0.795 | 0.767 | | |
| | **Specialty Imaging** | Ultrasound Diagnosis | 0.695 | 0.720 | 0.735 | 0.707 | | |
| | | Retinal Screening | 0.750 | 0.775 | 0.790 | 0.772 | | |
| | | Cardiac Imaging | 0.680 | 0.705 | 0.720 | 0.743 | | |
| | **Musculoskeletal** | Bone Fracture Detection | 0.745 | 0.770 | 0.785 | 0.736 | | |
| | | Skin Lesion Analysis | 0.730 | 0.755 | 0.770 | 0.780 | | |
| | **Pulmonary** | Lung Nodule Detection | 0.760 | 0.785 | 0.805 | 0.819 | | |
| </div> | |
| ### Overall Performance Summary | |
| MedVision-DiagNet demonstrates exceptional performance across all medical imaging benchmarks, with particular strength in oncology and pulmonary imaging tasks. The model achieves state-of-the-art results on tumor detection and lung nodule identification. | |
| ## 3. Clinical Applications | |
| This model is intended for research purposes and clinical decision support. It should not be used as a standalone diagnostic tool. Always consult qualified healthcare professionals for medical diagnoses. | |
| ## 4. How to Run Locally | |
| Please refer to our code repository for more information about running MedVision-DiagNet locally. | |
| ### Model Loading | |
| ```python | |
| from transformers import ViTForImageClassification, ViTImageProcessor | |
| model = ViTForImageClassification.from_pretrained("username/MedVision-DiagNet") | |
| processor = ViTImageProcessor.from_pretrained("username/MedVision-DiagNet") | |
| ``` | |
| ### Inference | |
| ```python | |
| from PIL import Image | |
| image = Image.open("medical_scan.png") | |
| inputs = processor(images=image, return_tensors="pt") | |
| outputs = model(**inputs) | |
| predictions = outputs.logits.argmax(-1) | |
| ``` | |
| ### Preprocessing Recommendations | |
| For optimal performance: | |
| - Input resolution: 224x224 or 384x384 | |
| - Normalization: ImageNet standards (mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]) | |
| - DICOM images should be converted to PNG/JPEG with appropriate windowing | |
| ## 5. License | |
| This model is licensed under the [Apache 2.0 License](LICENSE). | |
| ## 6. Contact | |
| For questions or collaborations, please contact us at research@medvision-ai.org or open an issue on our GitHub repository. | |
| ## 7. Citation | |
| ```bibtex | |
| @article{medvision2025, | |
| title={MedVision-DiagNet: A Vision Transformer for Multi-Modal Medical Imaging}, | |
| author={MedVision AI Research Team}, | |
| journal={Nature Medicine}, | |
| year={2025} | |
| } | |
| ``` | |