VisionLearningGroup / caption-guided-saliency

Supplementary material to "Top-down Visual Saliency Guided by Captions" (CVPR 2017)
https://visionlearninggroup.github.io/caption-guided-saliency/
BSD 2-Clause "Simplified" License
107 stars 35 forks source link

run_s2vt.py:62: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. #8

Closed brucejk closed 5 years ago

brucejk commented 7 years ago

Hi, when I ran the code for testing, it gave me some error like "" run_s2vt.py:62: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy train_vids['video_path'] = train_vids['video_id'].map(lambda x: os.path.join(cfg.path_to_trainval_descriptors, x + "_incp_v3.npy")) run_s2vt.py:63: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy val_vids['video_path'] = val_vids['video_id'].map(lambda x: os.path.join(cfg.path_to_trainval_descriptors, x + "_incp_v3.npy")) {'CIDEr': 0.38908523814484475, 'Bleu_4': 0.3488993782941496, 'Bleu_3': 0.4645981761823224, 'Bleu_2': 0.6031291787236476, 'Bleu_1': 0.7600115088383854, 'ROUGE_L': 0.57838682993085411, 'METEOR': 0.26565351293713196} 2990 ""

Do you know what is going on the testing code? Appreciate any kinds help.

xingtengfei commented 7 years ago

This is just a warning, not an error, do not care about it

ramanishka commented 7 years ago

@xingtengfei, thanks. Indeed, it shouldn't give problems in this case. The rest of the output seems correct, isn't it? I'll take care of it later.

FuHongy commented 6 years ago

@ramanishka Hi, I got this warning as well when i ran the code for testing using python3.6 on win10. Do you know how to get rid of this warning? Thanks~