ByteTrack_yolov5
ByteTrack_yolov5 copied to clipboard
why can't use non_max_suppression replace of postprocess ?
outputs = self.model(img, False, False)
# if self.decoder is not None:
# outputs = self.decoder(outputs, dtype=outputs.type())
print('before nms:', outputs.size())
outputs = postprocess(outputs, self.num_classes, self.confthre, self.nmsthre)
# outputs = non_max_suppression(outputs, 0.1, 0.45, classes=[0], max_det=1000)
# print(outputs[0].shape)
i notice that if i use non_max_suppression instead of postprocess , i won't get any bbox , and postprocess cost much time waiting for your reply sincerely thank you !
postprocess = nms + resize box to original size of frame, you can check code here https://github.com/tungdop2/ByteTrack_yolov5/blob/fbbdafaa076b3bf654fb1113c1ef792f88f4ab3b/yolov5/utils/boxes.py#L33
@tungdop2 I found that the postprocess function takes a lot of time. Whether this step in the tracking task is the connection operation of passing the detection results to the tracker, I found that it seems that NMS is enough in the detection task. Is there any way to reduce the time consumption of postprocess?
In your code, I found that you commented non_ max_ suppression out. i guess you had tried to use non_ max_ suppression replaces postprocess, but it didn't work , is that right ? @tungdop2
I found the reason why postprocess is slow. It is related to tsize. The tsize of the standard yolov5 is (640, 640), but (608 , 1088) is used in your code, which leads to a significant increase in the time of NMS as one of the operations of postprocess, so I want to know why you choose to use (608 , 1088). I found that (608 , 1088) does not drift the prediction box, but (640, 640) will drift . @tungdop2
I found the reason why postprocess is slow. It is related to tsize. The tsize of the standard yolov5 is (640, 640), but (608 , 1088) is used in your code, which leads to a significant increase in the time of NMS as one of the operations of postprocess, so I want to know why you choose to use (608 , 1088). I found that (608 , 1088) does not drift the prediction box, but (640, 640) will drift . @tungdop2
Have you understood why can only (800,1440) or (608,1088)?