Tencent / tencent-ml-images

Largest multi-label image database; ResNet-101 model; 80.73% top-1 acc on ImageNet
Other
3.06k stars 515 forks source link

About image processing #25

Open AlgoHunt opened 6 years ago

AlgoHunt commented 6 years ago

Hi

I have some question about image normalization. as I notice the preprocess way is not like some standard resnet .

if we have an image in rgb order with dataformat of int8 ranging from 0~255. so are we suppose to do the nomalization as below:

image = ((image/255) -0.5 ) * 2

Thanks

mylyu commented 6 years ago

Hi

I have some question about image normalization. as I notice the preprocess way is not like some standard resnet .

if we have an image in rgb order with dataformat of int8 ranging from 0~255. so are we suppose to do the nomalization as below:

image = ((image/255) -0.5 ) * 2

Thanks

I think so. I have tested this.

wubaoyuan commented 6 years ago

@AlgoHunt Yes, please refer to Line 165 in image_preprocessing.py. We normalize the image to [-1, 1]. @mylyu Thanks.

bobopit commented 5 years ago

I download the openImage dataset from urls, the size of the whole dataset is about 14T, and the pixel of every image in openImage >4k. How should i scale it? or CenterCrop? in order to save storage