Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
6018 Discussions

_compute_mct_distance_matrix across thousands of tracks

Duggy
New Contributor I
584 Views

Hi,

Am using OpenVino Toolkit for multi camera multi targets.

The _compute_mct_distance_matrix function checks the cosine distance between each and every track to each other (across multiple cameras). That is if there are 1000 tracks then it will run through all 1000 tracks comparing them to all 999 tracks to find those that are the same/similar features therefore the same person/track. However there could be hundreds of thousands of tracks that run through this nested for loop. This is hours to days to check the tracks.

 
Each track has the clustered feature which is effectively the Reid features of the track summarized and this is what is evaluated/compared track to track.
 
My question is, has anyone thought of a more efficient/quicker way to do these tests so that it doesn't take this long to achieve? Of course it needs to run these tests to compare relationships to tracks and the actual comparison functions running in the for loop are quick it seems, its just the number of iterations in the nested for loop that cause it to take so long to complete.
 
Much appreciated.
Labels (3)
0 Kudos
5 Replies
Duggy
New Contributor I
573 Views

Tried looking at threading but seems not to be the answer. As for 5 minutes there are 15,000 tracks to parse which takes hours. For a full day I'm sure no amount of threads will resolve. 

 

Iffa_Intel
Moderator
550 Views

Greetings,

 

First and foremost, are you actually training your model?, validating it? or inferencing it?

 

If you are using PyTorch, you could validate your model by evaluating model performance on unseen data (for test dataset, NOT training dataset) using " with torch.no_grad( )". This will impact the auto gradient engine and essentially deactivate it.

In this context, we are telling the program not to worry about backpropagation since we are just evaluating the model (no need to change weight/biases/etc).

 

This would reduce memory usage and speed up computation.

 

If you have your model ready and expect to increase performance from OpenVINO perspective (means you are trying to do inferencing), you may use the Post Training Optimization Tool (POT). This POT uses Low Precision Optimization which should reduce the inferencing time.

 

 

Sincerely,

Iffa

 

 

 

Duggy
New Contributor I
541 Views

Hi,

 

Thank you for the reply.

We have deployed the "standard" :

person-detection-retail-0013 and person-reidentification-retail-0277 model provided by intel from the downloads. We haven't tinkered with it at all. In truth our camera angles are higher up then on the same plane as the person (more 45 degree angles). Is there a way to (as you mention above) "train/adapt/enhance" the model to our angles to increase accuracy?
 
I'm not to fluent in the information you provided above so any tutorials/documents for this request would be appreciated
 
Thanks
Iffa_Intel
Moderator
534 Views

You may carefully refer & follow this step by step guide to implement POT: Use Post-Training Optimization Tool Command-Line Interface



Sincerely,

Iffa


Iffa_Intel
Moderator
481 Views

Greetings,


Intel will no longer monitor this thread since we have provided a solution. If you need any additional information from Intel, please submit a new question. 



Sincerely,

Iffa


Reply