HowieMa / DeepSORT_YOLOv5_Pytorch

DeepSORT + YOLOv5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If I want to detect only some specific label, which file need to be edited?

DimaMirana opened this issue · comments

Hello, I want to detect only some specific label in video. Where is the label for tracking?

Hi, you can change the label here. By default, 0 is for the "person" class.
https://github.com/HowieMa/DeepSORT_YOLOv5_Pytorch/blob/master/main.py#L248

Note that, since the embedding is only for "person", you may also need to change it to your own embedding network here:
https://github.com/HowieMa/DeepSORT_YOLOv5_Pytorch/blob/master/configs/deep_sort.yaml#L2

If I want to detect all the coco labels and only keep track of the person then I n
[https://github.com/HowieMa/DeepSORT_YOLOv5_Pytorch/blob/master/main.py#L248]
here default = [] will be enough?

I didn't get the embedding part. Can you explain please>

commented

Hi @HowieMa @DimaMirana ,

If I want to use the DeepSORT to detect only vehicles classes from the coco dataset (3-car, 4-motorbike, 6-bus and 8-truck for example) then I could change the classes from the main.py but how do I get the embeddings for the vehicle tracking?

Sorry for the newbie question, I'm a little new with object tracking

Best Regards,
Abu

Hi @HowieMa @DimaMirana ,

If I want to use the DeepSORT to detect only vehicles classes from the coco dataset (3-car, 4-motorbike, 6-bus and 8-truck for example) then I could change the classes from the main.py but how do I get the embeddings for the vehicle tracking?

Sorry for the newbie question, I'm a little new with object tracking

Best Regards,
Abu

You need to train the embedding by yourself or download it from other pretrained models. Sorry I am not familiar with the vehicle tracking, probably you can find some helpful here: https://github.com/bismex/Awesome-vehicle-re-identification

commented

Hi @HowieMa ,

Thanks for the clarification and reference, so just to confirm, the embedding is similar to a deep learning model (eg .pt) but instead trained on re-identification and is saved as a .t7 file. Does that sound correct? So I would need to look for a pre-trained model something similar to the ckpt.t7 but instead trained on vehicle re-identification. Again, thank you and please correct me if I'm wrong

Best Regards,
Abu

Hi @HowieMa ,

Thanks for the clarification and reference, so just to confirm, the embedding is similar to a deep learning model (eg .pt) but instead trained on re-identification and is saved as a .t7 file. Does that sound correct? So I would need to look for a pre-trained model something similar to the ckpt.t7 but instead trained on vehicle re-identification. Again, thank you and please correct me if I'm wrong

Best Regards,
Abu

Actually, the architecture of the vehicle embedding you find may be different from that for human embedding, which is defined in https://github.com/HowieMa/DeepSORT_YOLOv5_Pytorch/blob/master/deep_sort/deep/model.py.
Thus you may need to revise the definition of its architecture as well.

Hi @HowieMa ,I need to insert a label instead of sort number, how to do it

@hareskoruz in this code block

img0 = draw_boxes(img0, bbox_xyxy, identities) # BGR

Here you can change the identities (which is the string parameter going as an input to the function) change this . Issue solved