RACLAHE_Image_Enhancement_for_CNN_model_segmentation

RACLAHE Quick Start Guide

Prerequisites

Step 1: Prepare Your Data

Organize your medical images in folders:

input/
├── patient001/
│   ├── slice001.dcm
│   ├── slice002.dcm
│   └── ...
├── patient002/
│   └── scan.nii.gz
└── ...

Each patient folder should contain either:

Step 2: Run with Docker Compose

# Clone the repository
git clone <repository-url>
cd RACLAHE_Image_Enhancement_for_CNN_model_segmentation

# Create directories
mkdir -p input output shared

# Copy your patient data into input/
cp -r /path/to/your/patients/* input/

# Run processing
docker-compose up --build

Step 3: Get Results

Enhanced images will be saved in:

output/RACLAHE OUTPUT/
├── patient001/
│   ├── image_1.dcm
│   ├── image_2.dcm
│   └── ...
└── patient002/
    └── patient002.nii.gz

Alternative: Run with Docker (without Compose)

# Build image (run `git lfs pull` first to fetch bbox_weights/)
docker build -t raclahe:3.0 .

# Run with volumes
docker run \
  -v $(pwd)/input:/home/ds/datasets:ro \
  -v $(pwd)/output:/home/ds/persistent-home \
  raclahe:3.0 /home/ds/datasets /home/ds/persistent-home/output

EUCAIM Platform

On EUCAIM, volumes are automatically mounted:

Submit the job with jobman, passing the input and output directories after the -- separator:

jobman submit -i raclahe -- <INPUT_DIR> <OUTPUT_DIR>
jobman submit -i raclahe -- ~/datasets/87f3be56-4725-45c3-9baa-d338de530f73/ ~/persistent-home/results/

Pick an OUTPUT_DIR under persistent-home, otherwise the results are lost when the job ends. If both arguments are omitted, the tool falls back to /home/ds/datasets and /home/ds/persistent-home/output.


Configuration

Argument Description Default
INPUT_DIR (1st positional) Dataset directory, one sub-directory per patient /home/ds/datasets
OUTPUT_DIR (2nd positional) Where the enhanced images are written /home/ds/persistent-home/output
--weights Bounding-box U-Net weights (.h5) /home/ds/bbox_weights/checkpoint_external.h5

The environment variables INPUT_DIR, OUTPUT_DIR and WEIGHTS_PATH are still honoured as fallbacks; command-line arguments take precedence.

docker run \
  -v $(pwd)/input:/custom/input:ro \
  -v $(pwd)/output:/custom/output \
  raclahe:3.0 /custom/input /custom/output

Troubleshooting

No output generated

Permission errors

Processing fails


Support

For issues or questions: