ssd_keras
ssd_keras copied to clipboard
Generator generate function and preprocess_input function
Hello , I am using the Generator class for generating input for the SSD machine . I have couple of question please ,
My input images are gray scale but loaded with 3 channels with gray same level, the generator doing the next steps for an input image :
-
Input image :
-
self.random_sized_crop(np.array(img), y)
-
imresize(img, self.image_size).astype('float32')
-
preprocess_input(tmp_inp)
Questions : A. The random_sized_crop is cutting the the original image which causes lose of information , Why this step is needed ? is this due to the need for converting the image to float32 ? and what about the lose of image information ? I should not label things in this place which is catted ?
B. preprocess_input is made for RGB images ,and doing next thing :
a. convert to BGR (because of VGG16(open cv)) b. Zero-center by mean pixel , can any one explain me this step ? c. should I use preprocess_input in my case ?
D. Where can I read about all this preprocess and why its done ? E. Is inputting image like in step 4 can decrease the detection results ?
Thanks !