YOLOv4-pytorch icon indicating copy to clipboard operation
YOLOv4-pytorch copied to clipboard

Understanding some parameters

Open a-haja opened this issue 3 years ago • 0 comments

Hi Zijie,

It would be nice if you can explain to me the following:

  1. Why the last label shape in dataset.py (__creat_label function) is 6+self.num_classes ? label = [np.zeros((int(train_output_size[i]), int(train_output_size[i]), anchors_per_scale, 6+self.num_classes)) for i in range(3)] Based on my understanding it should be 5+self.num_classes, where 5 is [x, y, w, h, conf]. I see that the 5th value is always 1.0 ( see https://github.com/jingtianyilong/YOLOv4-pytorch/blob/a536f6498f9e2b4b9ec42c39250d81df8c309d5e/utils/datasets.py#L316 and https://github.com/jingtianyilong/YOLOv4-pytorch/blob/a536f6498f9e2b4b9ec42c39250d81df8c309d5e/utils/datasets.py#L356 )

  2. Why bbox_ind is calculated with regards to module 90? Shouldn't it be the index of the bbox based on the scale index and anchor index? https://github.com/jingtianyilong/YOLOv4-pytorch/blob/a536f6498f9e2b4b9ec42c39250d81df8c309d5e/utils/datasets.py#L359

  3. Why the size of sbboxes, mbboxes and lbboxes is 150? https://github.com/jingtianyilong/YOLOv4-pytorch/blob/8a74bec5fac1438b3795edfc7cb78a1f96ab3b17/model/loss/yolo_loss.py#L40 size of these boxes should be 90 based on the current implementation https://github.com/jingtianyilong/YOLOv4-pytorch/blob/a536f6498f9e2b4b9ec42c39250d81df8c309d5e/utils/datasets.py#L319 Why 90 ?

Looking forward to hearing from you.

a-haja avatar Jul 13 '21 12:07 a-haja