sleap.nn.viz¶
Visualization and plotting utilities.
-
sleap.nn.viz.
imgfig
(size: Union[float, Tuple] = 6, dpi: int = 72, scale: float = 1.0) → matplotlib.figure.Figure[source]¶ Create a tight figure for image plotting.
- Parameters
size – Scalar or 2-tuple specifying the (width, height) of the figure in inches. If scalar, will assume equal width and height.
dpi – Dots per inch, controlling the resolution of the image.
scale – Factor to scale the size of the figure by. This is a convenience for increasing the size of the plot at the same DPI.
- Returns
A matplotlib.figure.Figure to use for plotting.
-
sleap.nn.viz.
plot_confmaps
(confmaps: numpy.ndarray, output_scale: float = 1.0)[source]¶ Plot confidence maps reduced over channels.
-
sleap.nn.viz.
plot_img
(img: numpy.ndarray, dpi: int = 72, scale: float = 1.0) → matplotlib.figure.Figure[source]¶ Plot an image in a tight figure.
-
sleap.nn.viz.
plot_instance
(instance, skeleton=None, cmap=None, color_by_node=False, lw=2, ms=10, bbox=None, scale=1.0, **kwargs)[source]¶ Plot a single instance with edge coloring.
-
sleap.nn.viz.
plot_instances
(instances, skeleton=None, cmap=None, color_by_track=False, tracks=None, **kwargs)[source]¶ Plot a list of instances with identity coloring.