This demo provides an inference pipeline for persons' detection, recognition and reidentification. The demo uses Person Detection network followed by the Person Attributes Recognition and Person Reidentification Retail networks applied on top of the detection results. The corresponding pre-trained models are delivered with the product:
person-vehicle-bike-detection-crossroad-0078
, which is a primary detection network for finding the persons (and other objects if needed)person-attributes-recognition-crossroad-0200
, which is executed on top of the results from the first network and reports person attributes like gender, has hat, has long-sleeved clothesperson-reidentification-retail-0079
, which is executed on top of the results from the first network and prints a vector of features for each detected person. This vector is used to conclude if it is already detected person or not.For details on the models, please refer to the descriptions in the deployment_tools/intel_models
folder of the OpenVINO™ toolkit installation directory.
Other demo objectives are:
On the start-up, the application reads command line parameters and loads the specified networks. The Person Detection network is required, the other two are optional.
Upon getting a frame from the OpenCV VideoCapture, the application performs inference of Person Detection network, then performs another two inferences of Person Attributes Recognition and Person Reidentification Retail networks if they were specified in the command line, and displays the results.
In case of a Person Reidentification Retail network specified, the resulting vector is generated for each detected person. This vector is compared one-by-one with all previously detected persons vectors using cosine similarity algorithm. If comparison result is greater than the specified (or default) threshold value, it is concluded that the person was already detected and a known REID value is assigned. Otherwise, the vector is added to a global list, and new REID value is assigned.
Running the application with the -h
option yields the following usage message:
Running the application with an empty list of options yields the usage message given above and an error message.
To run the demo, you can use public models or a set of pre-trained and optimized models delivered with the package:
<INSTAL_DIR>/deployment_tools/intel_models/person-vehicle-bike-detection-crossroad-0078
<INSTAL_DIR>/deployment_tools/intel_models/person-attributes-recognition-crossroad-0200
<INSTAL_DIR>/deployment_tools/intel_models/person-reidentification-retail-0079
For example, to do inference on a GPU with the OpenVINO™ toolkit pre-trained models, run the following command:
NOTE: Public models should be first converted to the Inference Engine format (
*.xml
+*.bin
) using the Model Optimizer tool.
The demo uses OpenCV to display the resulting frame with detections rendered as bounding boxes and text. In the default mode, the demo reports Person Detection time - inference time for the Person/Vehicle/Bike Detection network.
If Person Attributes Recognition or Person Reidentification Retail are enabled, the additional info below is reported also: