sleap.gui.overlays.confmaps¶
Overlay for confidence maps.
Currently a DataOverlay gets data from a model (i.e., it runs inference on the current frame) and then uses a ConfMapsPlot object to show the resulting confidence maps.
Example
>>> cm = ConfMapsPlot(conf_data.get_frame(0))
>>> window.view.scene.addItem(cm)
-
class
sleap.gui.overlays.confmaps.
ConfMapPlot
(confmap: numpy.array = None, color=[255, 255, 255], *args, **kwargs)[source]¶ QGraphicsPixmapItem object for drawing single channel of confidence map.
- Parameters
confmap (numpy.array) – (h, w) array of one confidence map channel.
color (list) – optional (r, g, b) array for channel color.
- Returns
None.
Note
In most cases this should only be called by ConfMapsPlot.
-
class
sleap.gui.overlays.confmaps.
ConfMapsPlot
(frame: numpy.array = None, show=None, show_box=True, *args, **kwargs)[source]¶ QGraphicsObject to display multiple confidence maps in a QGraphicsView.
- Parameters
frame (numpy.array) – Data for one frame of confidence map data. Shape of array should be (channels, height, width).
show (list, optional) – List of channels to show. If None, show all channels.
show_box (bool, optional) – Draw bounding box around confidence maps.
- Returns
None.
When initialized, creates one child ConfMapPlot item for each channel.