ssd_keras icon indicating copy to clipboard operation
ssd_keras copied to clipboard

wrong training result when changing training data

Open lantuzi opened this issue 7 years ago • 2 comments

When I use VOC2007 data to train, every thing is perfect. But when I download 'cat' from Imagenet website, the training result is wrong even I changed the number of classes to 1 and the other corresponding place to 2.

Could anyone give a hint?

lantuzi avatar Mar 10 '17 10:03 lantuzi

Hello @lantuzi Are you pre-processing the image correctly? You might be missing the pre-processing step found in the generator. If I recall correctly you should pre-process your input using this function

from keras.applications.imagenet_utils import preprocess_input

oarriaga avatar Mar 10 '17 10:03 oarriaga

Hi, @oarriaga I still use the code from repo with slight change. So the training has this one in 'SSD_training.ipynb': yield preprocess_input(tmp_inp), tmp_targets

and the test has this one in 'SSD.ipynb': inputs = preprocess_input(np.array(inputs))

lantuzi avatar Mar 10 '17 10:03 lantuzi