ZQPei / deep_sort_pytorch

MOT using deepsort and yolov3 with pytorch
MIT License
2.81k stars 725 forks source link

您好,请问你是怎么将这个修改成多类别的 #194

Open susie-evil opened 3 years ago

susie-evil commented 3 years ago

这样吗?这个需要修改 yolov3_deepsort.py

# select person class
mask = cls_ids == 0

bbox_xywh = bbox_xywh[mask]
# bbox dilation just in case bbox too small, delete this line if using a better pedestrian detector
bbox_xywh[:, 3:] *= 1.2
cls_conf = cls_conf[mask]

_Originally posted by @Single430 in https://github.com/ZQPei/deep_sort_pytorch/issues/173#issuecomment-733518339_

h-enes-simsek commented 3 years ago

mask = (cls_ids == 20) + (cls_ids == 22) for example 20 for elephants, 22 for zebras

full list is here labels = ["person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed", "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"]

susie-evil commented 3 years ago

大佬,你有在xavier上部署代码吗

---原始邮件--- 发件人: "Enes Şimşek"<notifications@github.com> 发送时间: 2021年2月13日(周六) 晚上11:51 收件人: "ZQPei/deep_sort_pytorch"<deep_sort_pytorch@noreply.github.com>; 抄送: "susie-evil"<1475227016@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [ZQPei/deep_sort_pytorch] 您好,请问你是怎么将这个修改成多类别的 (#194)

mask = (cls_ids == 20) + (cls_ids == 22) for example 20 for elephants, 22 for zebras

full list is here labels = ["person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed", "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"]

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

susie-evil commented 3 years ago

大佬,你id前的类别是怎么加上去的

---原始邮件--- 发件人: "Enes Şimşek"<notifications@github.com> 发送时间: 2021年2月13日(周六) 晚上11:51 收件人: "ZQPei/deep_sort_pytorch"<deep_sort_pytorch@noreply.github.com>; 抄送: "susie-evil"<1475227016@qq.com>;"Author"<author@noreply.github.com>; 主题: Re: [ZQPei/deep_sort_pytorch] 您好,请问你是怎么将这个修改成多类别的 (#194)

mask = (cls_ids == 20) + (cls_ids == 22) for example 20 for elephants, 22 for zebras

full list is here labels = ["person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat", "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat", "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella", "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat", "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup", "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli", "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed", "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone", "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors", "teddy bear", "hair drier", "toothbrush"]

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.