Aesthetic_attributes_maps icon indicating copy to clipboard operation
Aesthetic_attributes_maps copied to clipboard

Can you please provide necessary files to run this code ? such as train.pkl and val.pkl

Open PaTricksStar opened this issue 7 years ago • 8 comments

PaTricksStar avatar Jul 25 '17 03:07 PaTricksStar

I will upload the data_prepration script by end of the day, you should be able to generate train.pkl and other files from that script.

gautamMalu avatar Jul 25 '17 07:07 gautamMalu

Thanks!

2017-07-25 7:20 GMT+00:00 Gautam Malu [email protected]:

I will upload the data_prepration script by end of the day, you should be able to generate train.pkl and other files from that script.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gautamMalu/Aesthetic_attributes_maps/issues/1#issuecomment-317652239, or mute the thread https://github.com/notifications/unsubscribe-auth/AWRsDBdT-T4g5PgABWiRw4U5vMlLcPARks5sRZc4gaJpZM4OiAYe .

PaTricksStar avatar Jul 25 '17 07:07 PaTricksStar

@gautamMalu Traceback (most recent call last): File "data_preparation.py", line 53, in x = prepare_image(_image, spp=False) TypeError: prepare_image() got an unexpected keyword argument 'spp'

PaTricksStar avatar Jul 25 '17 08:07 PaTricksStar

I delete spp and set target_size =[299, 299].

PaTricksStar avatar Jul 25 '17 09:07 PaTricksStar

I have updated the code, try now. Let me know if you face any problems. I am also updating the README.md, it will take some time probably by tomorrow.

gautamMalu avatar Jul 25 '17 09:07 gautamMalu

ImportError: No module named SpatialPyramidPooling I comment it

PaTricksStar avatar Jul 25 '17 09:07 PaTricksStar

@gautamMalu starting training now Traceback (most recent call last): File "train.py", line 93, in model.fit_generator(datagen.flow(train_data[0], train_data[1],batch_size=batch_size),8448, nb_epoch, verbose=2, File "/opt/conda/lib/python2.7/site-packages/keras/preprocessing/image.py", line 461, in flow save_format=save_format) File "/opt/conda/lib/python2.7/site-packages/keras/preprocessing/image.py", line 770, in init (np.asarray(x).shape, np.asarray(y).shape)) ValueError: X (images tensor) and y (labels) should have the same length. Found: X.shape = (8458, 299, 299, 3), y.shape = ()

Also, what does 8448 mean ? since train size =8458,batchsize = 16,so it should be 8458/16?

PaTricksStar avatar Jul 26 '17 02:07 PaTricksStar

Try with fit instead fit_generator() like: model.fit(train_data[0], train_data[1], batch_size=batch_size, nb_epoch=nb_epoch, callbacks=[checkpoint, tb],#, lr_scheduler], validation_data=(val_data[0], val_data[1]), shuffle=True, initial_epoch=initial_epoch) 8448 == number images to be cosindered in one epoch, actually with batch size = 16 and total number of images 8458, I have set it up to be 8448 because 8458/16 is fraction. Just try with the fit instead of fit_generator once it will consume more RAM though.

gautamMalu avatar Jul 26 '17 08:07 gautamMalu