mikel-brostrom/Yolov7_StrongSORT_OSNet

ModuleNotFoundError: No module named 'torchreid'

dsnsabari opened this issue · 3 comments

Search before asking

  • I have searched the Yolov7_StrongSORT_OSNet issues and discussions and found no similar questions.

Yolov7_StrongSORT_OSNet Component

No response

Bug

File "D:\Person_Tracking\Yolov7_StrongSORT_OSNet-main\strong_sort\sort\nn_matching.py", line 6, in
from torchreid.metrics.distance import compute_distance_matrix
ModuleNotFoundError: No module named 'torchreid'

Environment

  • Yolo7 = yolov7.pt
  • strong-sort-weights = osnet_x1_0_imagenet.pth
  • OS: windows10

Minimal Reproducible Example

python track.py --source D:/Person_Tracking/2_person/GTVideos/3746_20220113_fm24745l_20220109125210_20220109125225/*.jpg  --yolo-weights D:/Person_Tracking/Yolov7_StrongSORT_OSNet-main/yolov7.pt --strong-sort-weights D:/Person_Tracking/Yolov7_StrongSORT_OSNet-main/osnet_x1_0_imagenet.pth

@mikel-brostrom , I am getting the below error. But when i downloaded the pre-trained os_net. it is available only in ".pth" format. What should i do?

Could you share the osnet model in .pt format?

AssertionError: D:/Person_Tracking/Yolov7_StrongSORT_OSNet-main/osnet_x1_0_imagenet.pth acceptable suffix is ['.pt', '.torchscript', '.onnx', '_openvino_model', '.engine', '.mlmodel', '_saved_model', '.pb', '.tflite', '_edgetpu.tflite', '_web_model', '.xml']

MJ-06 commented

hi @dsnsabari, for torch reid download this repository: https://github.com/KaiyangZhou/deep-person-reid
and then move the torchreid folder to the proper directory
you will have to install the requirements, setup of reid is not necessary.

And for os_net.pth models try renaming the .pth model to .pt it should work

👋 Hello, this issue has been automatically marked as stale because it has not had recent activity. Please note it will be closed if no further activity occurs.
Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!