bridenmj/wound-dyneode

Model

0

stars

5

commits

1

linked in READMEs

Aug 27, 2026

updated

image-forecasting
latent-dynamics
longitudinal-imaging
medical-imaging
neural-ode
porcine
research
time-series
wound-healing

README

Wound DyneODE

This repository contains the final variable-context DyneODE checkpoint used in the Wound Forecasting project.

DyneODE forecasts longitudinal wound progression in the W latent space of a wound-specific StyleGAN generator. A time-aware GRU encodes a variable-length sequence of observed latent states, and the resulting context representation conditions a Neural ODE vector field.

This repository is currently private while public-release authority and licensing are being confirmed.

Released artifact

FieldValue
Filebest_val_checkpoint.pth
State-dictionary fieldodefunc
Selected epoch75
Model typetime_context_w_gru_ode
Latent dimension512
Hidden dimension64
Context hidden dimension64
Network depth3
Time scale21 days
Context sizes during training1-7
Selection metriclpips_loss

Required dependencies

Project code

https://github.com/bridenmj/wound-forecasting

The public implementation provides:

  • ContextConditionedODEFunc
  • conditioned_odeint
  • broadcast-W validation
  • variable-context conditioning

Wound StyleGAN generator

https://huggingface.co/bridenmj/wound-stylegan

The StyleGAN generator is required to decode predicted W-space latents into images.

Precomputed e4e inversions

DyneODE consumes precomputed e4e W-space inversion trajectories. The e4e encoder itself is not required for training or evaluation when these inversions are available. It is needed only to reproduce the raw-image-to-latent preprocessing stage.

The inversion latents and their trajectory mapping should be distributed as derived data rather than embedded in this model repository.

Loading

import torch
from wound_forecasting.dyneode import (
    ContextConditionedODEFunc,
)

checkpoint = torch.load(
    "best_val_checkpoint.pth",
    map_location="cpu",
    weights_only=False,
)

model = ContextConditionedODEFunc(
    dim=512,
    hidden_dim=checkpoint["hidden_dim"],
    depth=checkpoint["depth"],
    context_encoder_type=checkpoint["context_encoder_type"],
    context_hidden_dim=checkpoint["context_hidden_dim"],
)

model.load_state_dict(
    checkpoint["odefunc"],
    strict=True,
)

model.eval()

Temporal convention

Observation days are divided by the checkpoint time scale before integration. The final observed latent is the ODE initial state. The forecast-time vector must begin at that same observation time.

The public implementation uses fixed-step RK4 integration with atol=1e-3 and rtol=1e-3, matching the final experiment.

Intended use

This checkpoint is provided for research reproduction and study of continuous-time latent dynamics in longitudinal imaging.

Project license

The original project-trained weights released in this repository are licensed under the Creative Commons Attribution–NonCommercial 4.0 International license (CC BY-NC 4.0).

Third-party implementations, base models, tokenizers, and other external dependencies are not relicensed by this repository and remain subject to their respective licenses and terms. Any upstream license or notice files included in this repository continue to apply to the corresponding upstream materials.

Contributors

bridenmj

5 commits

bridenmj/wound-dyneode

Model

0

stars

5

commits

1

linked in READMEs

Aug 27, 2026

updated

image-forecasting
latent-dynamics
longitudinal-imaging
medical-imaging
neural-ode
porcine
research
time-series
wound-healing

README

Wound DyneODE

This repository contains the final variable-context DyneODE checkpoint used in the Wound Forecasting project.

DyneODE forecasts longitudinal wound progression in the W latent space of a wound-specific StyleGAN generator. A time-aware GRU encodes a variable-length sequence of observed latent states, and the resulting context representation conditions a Neural ODE vector field.

This repository is currently private while public-release authority and licensing are being confirmed.

Released artifact

FieldValue
Filebest_val_checkpoint.pth
State-dictionary fieldodefunc
Selected epoch75
Model typetime_context_w_gru_ode
Latent dimension512
Hidden dimension64
Context hidden dimension64
Network depth3
Time scale21 days
Context sizes during training1-7
Selection metriclpips_loss

Required dependencies

Project code

https://github.com/bridenmj/wound-forecasting

The public implementation provides:

  • ContextConditionedODEFunc
  • conditioned_odeint
  • broadcast-W validation
  • variable-context conditioning

Wound StyleGAN generator

https://huggingface.co/bridenmj/wound-stylegan

The StyleGAN generator is required to decode predicted W-space latents into images.

Precomputed e4e inversions

DyneODE consumes precomputed e4e W-space inversion trajectories. The e4e encoder itself is not required for training or evaluation when these inversions are available. It is needed only to reproduce the raw-image-to-latent preprocessing stage.

The inversion latents and their trajectory mapping should be distributed as derived data rather than embedded in this model repository.

Loading

import torch
from wound_forecasting.dyneode import (
    ContextConditionedODEFunc,
)

checkpoint = torch.load(
    "best_val_checkpoint.pth",
    map_location="cpu",
    weights_only=False,
)

model = ContextConditionedODEFunc(
    dim=512,
    hidden_dim=checkpoint["hidden_dim"],
    depth=checkpoint["depth"],
    context_encoder_type=checkpoint["context_encoder_type"],
    context_hidden_dim=checkpoint["context_hidden_dim"],
)

model.load_state_dict(
    checkpoint["odefunc"],
    strict=True,
)

model.eval()

Temporal convention

Observation days are divided by the checkpoint time scale before integration. The final observed latent is the ODE initial state. The forecast-time vector must begin at that same observation time.

The public implementation uses fixed-step RK4 integration with atol=1e-3 and rtol=1e-3, matching the final experiment.

Intended use

This checkpoint is provided for research reproduction and study of continuous-time latent dynamics in longitudinal imaging.

Project license

The original project-trained weights released in this repository are licensed under the Creative Commons Attribution–NonCommercial 4.0 International license (CC BY-NC 4.0).

Third-party implementations, base models, tokenizers, and other external dependencies are not relicensed by this repository and remain subject to their respective licenses and terms. Any upstream license or notice files included in this repository continue to apply to the corresponding upstream materials.

Contributors

bridenmj

5 commits