Open 123alaa opened 5 years ago
@123alaa Hi,
I tried this: nn.MaxPool2d(kernel_size, stride = stride, padding = (kernel_size-1)//2)
Yes, it seems you should use this. Does it work?
There is used padding="SAME" in the Yolov3-spp: https://github.com/opencv/opencv/pull/9705/files#diff-fedccfdab4befb41d5ba901df318b1d2R197
What does it mean SAME
: https://stackoverflow.com/a/37675359/1558037
For example, there are 2 padding algorithms VALID and SAME in the TensorFlow: https://www.tensorflow.org/api_docs/python/tf/nn/convolution
It isn't implemented yet in the Pytorch: https://github.com/pytorch/pytorch/issues/3867
Yes, it works. I have an additional question: In each batch you do multi scaling right? Are you also resize the anchors in same way?
Because in the training resized images to 320*320, and the best anchors were the anchors of coco, although on their anchors is (373,326) that is bigger the my image, how it is work?
Best
No I don't resize anchors. May be it make sense to get higher accuracy.
although on their anchors is (373,326) that is bigger the my image, how it is work?
It isn't a big problem, receptive field of final activation doesn't depend on object size, so in general the object size (and anchor) may be any value.
@AlexeyAB , I don't understood, darknet got absolute anchors like this: 10,13, 16,30, 33,23, 30,61, 62,45, 59,119, 116,90, 156,198, 373,326
Are you make them relative to the image size?
@123alaa No. Anchors are the sizes of objects on images that are resized to the network size. So most likely they need to be resized during network resizing during training.
Hi @AlexeyAB, I trained a model using this cfg (the same arch as yolov3-spp) yolov3-spp-320.log
and i try to test it using pytorch project based on this project: https://github.com/ayooshkathuria/pytorch-yolo-v3
Please take a look on darknet.py, I tried to integrate the max pool layer to this implementation, but i did not know which parameters you use (i search in your project).
How can i call your maxpool from torch.nn , with which param?
I tried this: nn.MaxPool2d(kernel_size, stride = stride, padding = (kernel_size-1)//2)
I see in your implementation that the padding in kernel_size -1 but it is not good.
Thnaks