ultralytics / xview-yolov3

xView 2018 Object Detection Challenge: YOLOv3 Training and Inference.
https://docs.ultralytics.com
GNU Affero General Public License v3.0
252 stars 57 forks source link

image normalization #10

Closed wizyoung closed 4 years ago

wizyoung commented 5 years ago

In your code, the image normalization method is (img - mean) / sigma, is that consistent with the original repo? Many articles I googled use img / 255. to normalize the image from [0, 255] to [0, 1] instead. Which one is correct?

glenn-jocher commented 5 years ago

Be advised that the https://github.com/ultralytics/xview-yolov3 repository is not under active development anymore. We recommend you use https://github.com/ultralytics/yolov3 instead, our main YOLOv3 repository.

mseals1 commented 5 years ago

Even though it isn't under active development anymore doesn't mean you can't at least answer their question.

glenn-jocher commented 5 years ago

@wizyoung @mseals1 image normalization has various forms. The native darknet method is more of a rescaling than a normalization. https://github.com/ultralytics/yolov3 performs this rescaling, which you may be more familiar with, though it does not normalize the mean and the standard deviation in the more robust statistical sense, which is what this repo does.

https://github.com/ultralytics/yolov3/blob/fdc02115b5422027e5b4592f7de9ed392897c164/utils/datasets.py#L184-L187