Article ID: 000088711 Content Type: Maintenance & Performance Last Reviewed: 09/07/2022

Multi Camera Multi Target Python* Demo in OpenVINO™ Is Slow When Using Many Tracks

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Options to improve performance of the Multi Camera Multi Target Python Demo

Description
  1. The _compute_mct_distance_matrixfunction in Multi-Camera Multi-Target Python Demo checks the cosine distance between each and every track to each other across multiple cameras.
  2. A large number of tracks would cost hours to days to check the tracks.
Resolution

Option 1: Validate the model by evaluating model performance on unseen data in PyTorch.

  • Use the function:
    with torch.no_grad():
    for i,data in enumerate(X_test):
    y_val = model.forward(data) #this function is to grab prediction

  • The with torch.no_grad() function will impact the auto gradient engine and essentially deactivate it. The program won't emphasize backpropagation since this is just about evaluating the model, thus, there's no requirement to change weight or biases, etc. Hence, it helps to reduce memory usage and speed up computation. However, this is only applicable to the test dataset, but not the training dataset.

Option 2: Accelerate the inference of deep learning models using Post-Training Optimization (POT).

Related Products

This article applies to 1 products