This project focuses on intelligent assisted diagnosis of precancerous lesions, supporting analysis of endoscopic images for:
- Classification: Identifying whether images contain precancerous lesions (0 - no lesion, 1 - precancerous lesion)
- Detection: Using GroundingDINO for object detection to locate lesion areas
- Segmentation: Using Segment Anything (SAM) for semantic segmentation to generate precise lesion region masks
SynPED/
├── src/ # Core source code
│ ├── config/ # Model configuration files
│ ├── datasets/ # Dataset definitions
│ ├── models/ # Model implementations
│ │ └── modeling.py # SynPED main model
│ └── utils/ # Utility functions
├── scripts/ # Evaluation and inference scripts
│ ├── inference.py # Single image inference example
│ ├── eval_classification.py
│ ├── eval_detection.py
│ ├── eval_segmentation.py
│ └── eval_synped.py
├── GroundingDINO/ # GroundingDINO dependency
├── segment_anything/ # SAM dependency
├── clip/ # CLIP dependency
└── wise-ft/ # Incremental fine-tuning related code
# Install GroundingDINO
cd GroundingDINO
pip install -e .
# Install Segment Anything
cd segment_anything
pip install -e .Configure model paths in scripts/inference.py and run the script:
clip_path = "/path/to/finetuned_classifier.pt"
dino_config_file = "src/config/GroundingDINO_SwinT_OGC.py"
dino_path = "/path/to/dino_checkpoint.pth"
sam_path = "/path/to/medsam_model.pth"