get_current_predictions()¶
This method returns the model’s predictions just once at the moment it
is called. It is used when the model is activated with continues_msg in
True. It takes the information from the topic that are publishing.
Reference¶
Arguments¶
Arguments |
Type |
Default value |
Description |
|---|---|---|---|
as_dict |
|
|
If set to
|
get_timestamp |
|
|
If set to
|
Return¶
if as_dict is True and get_timestamp is True:
Type |
Description |
|---|---|
|
( |
if as_dict is True and get_timestamp is False:
Type |
Description |
|---|---|
|
Dictionary with prediccions. |
if as_dict is False and get_timestamp is True:
Type |
Description |
|---|---|
|
( |
if as_dict is False and get_timestamp is False:
Type |
Description |
|---|---|
|
List with prediccions. |
Exceptions¶
None
See the complete list of cv exceptions.
Examples¶
...
self.predictor = await self.cv.enable_model(
name='predictor_name',
continues_msg=True,
source='chest',
)
...
last_predictions, timestamp = \
await self.predictor.get_current_predictions(get_timestamp=True)
...