full / README.md
caubetotbunggg's picture
Upload folder using huggingface_hub
ef8a991 verified

ScalpPipeline (pipeline.py)

Refactored pipeline combining all steps into a single class.

Usage

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)