Skip to content

junming732/biomedical-segmentation

Repository files navigation

Biomedical Image Segmentation

This repository contains code for biomedical image segmentation using U‑Net and ResUNet architectures. It is based on an assignment from Advanced Deep Learning for Image Processing (1MD042).

Project structure

biomedical-segmentation/
├── models/                  # Model definitions (UNet, ResUNet)
├── scripts/                 # Training scripts
├── utils/                   # Data loading & preprocessing
├── tests/                   # Unit tests (pytest)
├── pyproject.toml           # Project config (dependencies, tools)
├── .pre-commit-config.yaml  # Local hooks (flake8, pytest, etc.)
└── .github/workflows/ci.yml # GitHub Actions workflow

Installation

python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
python -m pip install -U pip

# Install the project and its dependencies
pip install -e .

Pre-commit (recommended)

pre-commit install
pre-commit run --all-files

Running tests

pytest -q

Training

python scripts/train.py --config configs/unet.yaml

Docker

This repo includes Docker support (e.g., a Dockerfile and possibly docker-compose.yml).

Build and run with Dockerfile

# Build image (use the Dockerfile in the repo root; adjust -f if it lives elsewhere)
docker build -t biomedical-segmentation -f Dockerfile .

# Run tests inside the container
docker run --rm -it -v "$PWD":/app -w /app biomedical-segmentation pytest -q

# Train inside the container
docker run --rm -it -v "$PWD":/app -w /app biomedical-segmentation \
  python scripts/train.py --config configs/unet.yaml

Using Docker Compose (if docker-compose.yml / compose.yaml is present)

# Build and run tests
docker compose run --rm app pytest -q

# Train
docker compose run --rm app python scripts/train.py --config configs/unet.yaml

Replace app with the actual service name in your compose file if different.

Continuous Integration (GitHub Actions)

A minimal CI workflow is provided at .github/workflows/ci.yml. It installs the project from pyproject.toml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages