abhaydoke09 / Bilinear-CNN-TensorFlow

This is an implementation of Bilinear CNN for fine grained visual recognition using TensorFlow.
191 stars 72 forks source link

Can you expleain please, why training image size is 488 * 488 ? #7

Open mahfuj9346449 opened 7 years ago

mahfuj9346449 commented 7 years ago

build_hdf5_image_dataset(new_train, image_shape=(488, 488), mode='file', output_path='new_train_488.h5', categorical_labels=True, normalize=False)

In your code :

sess = tf.Session()     ## Start session to create training graph

imgs = tf.placeholder(tf.float32, [None, 448, 448, 3])
target = tf.placeholder("float", [None, 100])

Can you explain please why 488,488 and 448,448

abhaydoke09 commented 7 years ago

As we are looking at features which are useful for fine grained visual recognition, scaling of images is likely to improve results for the classification.

alg-leon commented 6 years ago

The resolution of image in train.h5 is 488, while the input of the placeholder is in 448. There is an error in create_h5 file.

abhaydoke09 commented 6 years ago

@thkinglee It's not an error. I am keeping the resolution to 488 in create_h5, because at the training time I am cropping an image of 448x448 randomly from the original image of 488x488. This is called data augmentation. It is used for better generalisation and expanding the dataset.

JUSTDODoDo commented 6 years ago

hello, I still have a problem. After running the second part of the whole model, I will finish training. It seems that the final model is not saved in the code. Why is this done in the absence of the training model? Can you give me some details?

xiaomiHuang commented 5 years ago

In the first step,I set the breaking epoch at x then I got the last_layers_epoch_x.npz .That .npz was loaded to do the second part for finetuning the whole model.So the training model was not absent.I don't know whether this can solve your problem.