adding the training stage with object database