Instructions to use toolevalxm/MedVision-XRay-TestRepo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use toolevalxm/MedVision-XRay-TestRepo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="toolevalxm/MedVision-XRay-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-XRay-TestRepo") model = AutoModelForImageClassification.from_pretrained("toolevalxm/MedVision-XRay-TestRepo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from toolevalxm/MedVision-XRay-TestRepo: direct link, hf CLI and curl.
- Browser
- Download file 3.21 kB
-
https://huggingface.co/toolevalxm/MedVision-XRay-TestRepo/resolve/main/README.md
- Command line
-
hf download hf://toolevalxm/MedVision-XRay-TestRepo/README.md
-
curl -L -o README.md https://huggingface.co/toolevalxm/MedVision-XRay-TestRepo/resolve/main/README.md
3.21 kB
| license: apache-2.0 | |
| library_name: transformers | |
| # MedVision-XRay | |
| <!-- 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-XRay" /> | |
| </div> | |
| <hr> | |
| <div align="center" style="line-height: 1;"> | |
| <a href="LICENSE" style="margin: 2px;"> | |
| <img alt="License" src="figures/badge.png" style="display: inline-block; vertical-align: middle;"/> | |
| </a> | |
| </div> | |
| ## 1. Introduction | |
| MedVision-XRay is a state-of-the-art deep learning model for multi-label chest X-ray classification. The model has been trained on large-scale medical imaging datasets and can detect 14 different thoracic pathologies including pneumonia, atelectasis, cardiomegaly, and more. | |
| <p align="center"> | |
| <img width="80%" src="figures/performance.png"> | |
| </p> | |
| The model architecture is based on a modified ResNet backbone with attention mechanisms specifically designed for medical imaging applications. It achieves competitive performance across multiple medical imaging benchmarks. | |
| ## 2. Evaluation Results | |
| ### Comprehensive Benchmark Results | |
| <div align="center"> | |
| | | Benchmark | BaselineModel | ResNet-50 | DenseNet-121 | MedVision-XRay | | |
| |---|---|---|---|---|---| | |
| | **Detection Tasks** | Pneumonia Detection | 0.821 | 0.845 | 0.856 | 0.840 | | |
| | | Atelectasis Detection | 0.756 | 0.778 | 0.785 | 0.809 | | |
| | | Cardiomegaly Detection | 0.889 | 0.901 | 0.912 | 0.919 | | |
| | **Segmentation Tasks** | Lung Segmentation | 0.912 | 0.925 | 0.931 | 0.934 | | |
| | | Lesion Segmentation | 0.782 | 0.801 | 0.815 | 0.811 | | |
| | | Cardiac Segmentation | 0.845 | 0.862 | 0.871 | 0.861 | | |
| | **Classification Tasks** | Multi-label Classification | 0.723 | 0.751 | 0.768 | 0.775 | | |
| | | Severity Grading | 0.678 | 0.701 | 0.712 | 0.761 | | |
| | | Finding Localization | 0.645 | 0.678 | 0.692 | 0.688 | | |
| | **Robustness Tests** | Noise Resistance | 0.812 | 0.834 | 0.845 | 0.847 | | |
| | | Contrast Variation | 0.789 | 0.812 | 0.825 | 0.815 | | |
| | | Resolution Invariance | 0.756 | 0.778 | 0.789 | 0.800 | | |
| </div> | |
| ### Overall Performance Summary | |
| MedVision-XRay demonstrates strong performance across all evaluated medical imaging benchmark categories, with particularly notable results in detection and segmentation tasks. | |
| ## 3. Model Usage | |
| The model can be loaded using the Hugging Face Transformers library: | |
| ```python | |
| from transformers import AutoModelForImageClassification, AutoFeatureExtractor | |
| model = AutoModelForImageClassification.from_pretrained("medical-ai/MedVision-XRay") | |
| feature_extractor = AutoFeatureExtractor.from_pretrained("medical-ai/MedVision-XRay") | |
| ``` | |
| ## 4. Training Details | |
| The model was trained with the following configuration: | |
| - Optimizer: AdamW with learning rate 1e-4 | |
| - Batch size: 32 | |
| - Image resolution: 224x224 | |
| - Augmentations: Random rotation, horizontal flip, color jitter | |
| - Training epochs: 50 | |
| ## 5. License | |
| This model is licensed under the [Apache 2.0 License](LICENSE). For research and clinical use, please consult with your institution's IRB. | |
| ## 6. Contact | |
| If you have any questions, please raise an issue on our GitHub repository or contact us at support@medvision-ai.org. | |