basic_bot.commons.recognition_provider
RecognitionProvider Objects
This singleton class detects objects in frames it gets from the camera object passed to the constructor.
It uses the TFLiteDetect class to detect objects in the frames.
It sends the detected objects to the central hub via a websocket connection
using the recognition
key
To use, simply instantiate it:
from basic_bot.commons.recognition_provider import RecognitionProvider
from basic_bot.commons.camera_opencv import OpenCvCamera
camera = OpenCvCamera()
recognition_provider = RecognitionProvider(camera)
__init__
Constructor
get_objects
Return the last objects seen
get_next_objects
Wait for and return the next objects seen
pause
Pause the recognition thread
resume
Resume the recognition thread
stop
Stops the singleton recognition thread
stats
Return the fps stats dictionary.