DeepSORT_YOLOv5_Pytorch icon indicating copy to clipboard operation
DeepSORT_YOLOv5_Pytorch copied to clipboard

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

Open DimaMirana opened this issue 3 years ago • 8 comments

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

DimaMirana avatar Jan 25 '21 15:01 DimaMirana

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

HowieMa avatar Jan 25 '21 18:01 HowieMa

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>

DimaMirana avatar Jan 26 '21 14:01 DimaMirana

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

abuelgasimsaadeldin avatar Mar 21 '21 14:03 abuelgasimsaadeldin

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

HowieMa avatar Mar 21 '21 21:03 HowieMa

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

abuelgasimsaadeldin avatar Mar 22 '21 01:03 abuelgasimsaadeldin

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.

HowieMa avatar Mar 22 '21 03:03 HowieMa

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

hareskoruz avatar Jun 24 '21 13:06 hareskoruz

@hareskoruz in this code block https://github.com/HowieMa/DeepSORT_YOLOv5_Pytorch/blob/45439e7c9b3b42b2ed0ab426b9732002da803fa7/main.py#L138

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

AbhishekMaity001 avatar Oct 22 '21 18:10 AbhishekMaity001