Vehicle Recognition Stream API
The Vehicle Recognition Stream API is used for license plate and vehicle recognition on videos or time-ordered image sequences.
The Vehicle Recognition Stream API organizes video streams so that they can be efficiently processed by Rekor. The library utilizes motion detection to improve performance, and groups sequential plate results for each vehicle into a single result with the highest possible confidence. The Vehicle Recognition Stream API also buffers incoming video and handles cases where video input is faster than the available processing by evenly dropping frames from the video buffer.
You may configure the Vehicle Recognition Stream API to connect directly to a video feed (either an IP camera stream URL or a file). The API will create a background thread that constantly pulls from the source to keep the video buffer full. You may also feed video frames directly. If sending video manually, you should do this on a separate thread.
Vehicle Recognition Stream API maintains a buffer of frames for processing. You may share an AlprStream
object across threads. Each thread should maintain its own Alpr
object. Passing the Alpr
object to the API using a process_frame()
call performs a recognition and returns individual results. The AlprStream
object keeps track of these results and forms plate groups.
Plate Groups can be accessed at any time by popping or peeking from the active list. Once a plate group is fully formed, and we are confident that the vehicle is no longer in the scene, it is available to be popped. Otherwise, it will remain on the list that you can peek until enough time has passed.
Vehicle recognition is optionally run on each AlprGroup
after it has been popped. Vehicle Recognition is CPU/GPU intensive. The API looks for a vehicle detection that encompasses the plate and uses that bounding box to classify the vehicle attributes (make, color, body type, etc).
The AlprStream
object should be initialized once for each video stream. The initialization time is minimal. The Vehicle Recognition Stream API instance is thread-safe.
Last updated