This is the code for all models mentioned in the paper "", where the HMIL model is an innovative multiple instance learning model proposed in this paper.
HMIL/
βββ MIL/ # Multiple Instance Learning Module
β βββ models/ # MIL Models
β β βββ HMIL.py # HMIL model, including 2 stages: HMILIC and HMILCC
β β βββ AttentionMIL.py # Attention MIL model
β β βββ TransMIL.py # Transformer MIL model
β β βββ ClassicalMIL.py # Classical MIL model
β βββ training_MIL.py # MIL training script
β βββ inference_MIL.py # MIL inference script (image classification, for HMILIC)
β βββ inference_HMIL.py # HMIL inference script (case classification, for HMILCC)
β βββ metrics_MIL.py # MIL evaluation metrics
β βββ data_processor_MIL.py # MIL data processing
β
βββ segmentation/ # Image Segmentation Module
β βββ models/ # Segmentation Models
β β βββ AttentionUNet.py # Attention U-Net
β β βββ DeepLabv3_plus.py # DeepLabv3+
β β βββ SegFormer/ # SegFormer Series
β β βββ segformer.py
β β βββ mix_transformer.py
β β βββ segformer_head.py
β βββ training.py # Segmentation model training script
β βββ inference.py # Segmentation model inference script
β βββ metrics.py # Segmentation evaluation metrics
β βββ loss_criteria.py # Loss functions
β βββ data_processor.py # Data processing
β βββ FPSTest.py # FPS performance test
β
βββ LICENSE # License file
βββ README.md # Project documentation
- Python>=3.10
- CUDA==12.4
- torch==2.6.0+cu124
- torchvision==0.20.0+cu124
- albumentations==2.0.8
- einops==0.8.1
- huggingface-hub==0.34.3
- monai==1.5.0
- numpy==1.26.4
- opencv-python-headless==4.11.0.86
- openpyxl==3.1.5
- pandas==2.3.1
- pillow==11.0.0
- scikit-learn==1.7.1
- scipy==1.15.3
- timm==1.0.19