fengyang0317 / unsupervised_captioning

Code for Unsupervised Image Captioning
MIT License
215 stars 51 forks source link

preprocessing/extract_descriptions.py #30

Closed ironmanx1 closed 3 years ago

ironmanx1 commented 4 years ago

https://github.com/fengyang0317/unsupervised_captioning/blob/0e75b6aff4cc9e94249bc272fc5490e566ef5d7c/preprocessing/extract_descriptions.py#L16 ModuleNotFoundError: No module named 'data'

sorry to trouble you,I can't find a module called 'data',also there is no 'build_mscoco_data' module in 'data' file,how can i solve this?

ironmanx1 commented 4 years ago

ok,i find this in /workspace/tf_models/research/im2txt/im2txt/data

ironmanx1 commented 4 years ago

https://github.com/fengyang0317/unsupervised_captioning/blob/0e75b6aff4cc9e94249bc272fc5490e566ef5d7c/preprocessing/extract_descriptions.py#L34 TypeError: a bytes-like object is required, not 'str'

i try to change this line to c = c.decode().split('\n'),and this may cause many problems in run process_descriptions.py. can you teach me how to solve this?

fengyang0317 commented 3 years ago

Use python 2 or convert str to bytes in python 3.