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
| Field | Value |
|---|---|
| File | best_val_checkpoint.pth |
| State-dictionary field | odefunc |
| Selected epoch | 75 |
| Model type | time_context_w_gru_ode |
| Latent dimension | 512 |
| Hidden dimension | 64 |
| Context hidden dimension | 64 |
| Network depth | 3 |
| Time scale | 21 days |
| Context sizes during training | 1-7 |
| Selection metric | lpips_loss |
Required dependencies
Project code
https://github.com/bridenmj/wound-forecasting
The public implementation provides:
ContextConditionedODEFuncconditioned_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.