Sorry for the late reply
To get the results using the outside a deepstream environment, clone the repo mentioned below and follow the instructions in the Readme.md of that repository:
Like to the repository :
I filtered out all the other classes from the yolo model other than humans by using the yolov5 _crowdhuman weights and passing the argument --classes 0 while running the script. The reid model used was Osnet_x1_0 model trained on MSMT 17 dataset .
The link to the ReID model zoo and Yolov5_Crowdhuman Weights are given in the repository
For the deepstream environment , the mars128-small_deepstream.mp4 results was obtained by running the defualt deepstream-test-2 app given in deepstream 6.1 with the only change being the detector used was peoplenet.
For the osnet_x10_msmt17_deepstream.mp4 results, the detector again used was peoplenet and the reid model used was the engine file generated from the Osnet_x1_0 model trained on MSMT 17 pytorch model.
To generate the engine file ,.the pytorch model was first converted into onnx model using torch.onnx.export command, to load the model in python for export, please refer to the following link : How-to — torchreid 1.4.0 documentation
Using the FeatureExtractor you can easily load the network and weights which can then be exported to onnx.
The engine file is then created using trtexec located in /usr/src/tensorrt/bin.
Command used : trtexec --onnx=/path/to/osnet.onnx --saveEngine=/path/to/osnet.engine
The configuration files have already been shared in a previous reply , please refer to that, for the yolov5_deepsort python script , outside deepstream environment, please change the values in config.yaml located in deep_sort/configs. The following values needs to be changed :
Model_Type : To the type of model you have selected, in this case osnet_x1_0
Max_age : 500