confmaps
sleap.gui.overlays.confmaps
¶
GUI overlay for confidence maps (not currently used).
Previously, a DataOverlay class retrieved data from a model (i.e., it ran inference
on the current frame) and then used a ConfMapsPlot object to show the resulting
confidence maps.
Example: ::
>>> cm = ConfMapsPlot(conf_data.get_frame(0))
>>> window.view.scene.addItem(cm)
Classes:
| Name | Description |
|---|---|
ConfMapPlot |
QGraphicsPixmapItem object for drawing single channel of confidence map. |
ConfMapsPlot |
QGraphicsObject to display multiple confidence maps in a QGraphicsView. |
Functions:
| Name | Description |
|---|---|
demo_confmaps |
Demo function. |
show_confmaps_from_h5 |
Demo function. |
ConfMapPlot
¶
Bases: QGraphicsPixmapItem
QGraphicsPixmapItem object for drawing single channel of confidence map.
Not currently used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
confmap
|
array
|
(h, w) array of one confidence map channel. |
None
|
color
|
list
|
optional (r, g, b) array for channel color. |
[255, 255, 255]
|
Returns:
| Type | Description |
|---|---|
|
None. |
Note
In most cases this should only be called by ConfMapsPlot.
Methods:
| Name | Description |
|---|---|
get_conf_image |
Converts array data stored in object to QImage. |
Source code in sleap/gui/overlays/confmaps.py
get_conf_image()
¶
Converts array data stored in object to QImage.
Returns:
| Type | Description |
|---|---|
QImage
|
QImage. |
Source code in sleap/gui/overlays/confmaps.py
ConfMapsPlot
¶
Bases: QGraphicsObject
QGraphicsObject to display multiple confidence maps in a QGraphicsView.
Not currently used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
frame
|
array
|
Data for one frame of confidence map data. Shape of array should be (channels, height, width). |
None
|
show
|
list
|
List of channels to show. If None, show all channels. |
None
|
show_box
|
bool
|
Draw bounding box around confidence maps. |
True
|
Returns:
| Type | Description |
|---|---|
|
None. |
When initialized, creates one child ConfMapPlot item for each channel.
Methods:
| Name | Description |
|---|---|
boundingRect |
Method required by Qt. |
paint |
Method required by Qt. |
Source code in sleap/gui/overlays/confmaps.py
boundingRect()
¶
demo_confmaps(confmaps, video, scale=None, standalone=False, callback=None)
¶
Demo function.
Source code in sleap/gui/overlays/confmaps.py
show_confmaps_from_h5(filename, input_format='channels_last', standalone=False)
¶
Demo function.