package fehu

  1. Overview
  2. Docs

Module Fehu_visualize.OverlaySource

Overlays for augmenting rendered frames with diagnostic annotations.

Sourcetype ctx = {
  1. step_idx : int;
  2. episode_idx : int;
  3. info : Fehu.Info.t;
  4. action : Fehu.Space.Value.t option;
  5. value : float option;
  6. log_prob : float option;
  7. reward : float;
  8. done_ : bool;
}

Context provided to overlays for each frame.

Overlay transformation applied to a rendered image.

Sourceval compose : t list -> t

Compose multiple overlays sequentially.

Sourceval text : ?pos:(int * int) -> ?color:(int * int * int) -> (ctx -> string) -> t

Draw text at the given position (default: 10, 20) in RGB color.

Sourceval bar : ?pos:(int * int) -> ?size:(int * int) -> ?color:(int * int * int) -> ?background:(int * int * int) -> value:(ctx -> float) -> t

Draw a horizontal progress bar representing a value in 0, 1.

Sourceval identity : t

Overlay that leaves the image unchanged.