tencent-ml-images icon indicating copy to clipboard operation
tencent-ml-images copied to clipboard

About image processing

Open AlgoHunt opened this issue 6 years ago • 3 comments

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

AlgoHunt avatar Nov 08 '18 04:11 AlgoHunt

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.

mylyu avatar Nov 16 '18 01:11 mylyu

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

wubaoyuan avatar Nov 16 '18 02:11 wubaoyuan

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

bobopit avatar Jul 19 '19 04:07 bobopit