File size: 1,062 Bytes
7bf5a8e ef8a991 7bf5a8e ef8a991 7bf5a8e 70b104c 7bf5a8e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
## ScalpPipeline (`pipeline.py`)
Refactored pipeline combining all steps into a single class.
### Usage
```bash
python pipeline.py --pixel_ratio 2.54
```
Arguments:
- `--root_dir`: Root directory of the project (default: `.`)
- `--pixel_ratio`: Pixel to micrometer ratio (default: `2.54`)
### Dependencies (Files)
The pipeline requires the following files and directories to exist:
1. **Input Images**:
- `datasets/data/` : Directory containing input images (`.jpg`, `.jpeg`, `.png`).
2. **Model Weights**:
- `segmentation/model/U2NET.pth` : Pre-trained U2NET model.
- `sam_vit_h_4b8939.pth` : SAM (Segment Anything Model) checkpoint (ViT-H).
3. **Code Modules**:
- `segmentation/data_loader.py` : Data loading utilities for U2NET.
### Output
Results are saved in:
- `datasets/seg_train/` (U2NET masks)
- `prediction/sam_result/sam_val/` (SAM masks)
- `prediction/ensemble_result/ensemble_val/` (Ensemble masks)
- `alopecia/thickness_result/` (Thickness data & visualization)
- `alopecia/count_result/` (Hair count CSV & visualization)
|