facebookresearch / vilbert-multi-task

Multi Task Vision and Language
MIT License
797 stars 180 forks source link

Referred Object Comprehension code (tools/refer) is in python 2 #33

Open bhargavaurala opened 4 years ago

bhargavaurala commented 4 years ago

Hello,

I am trying to use reproduce train and test performance using this repository however one of the external packages in tools/refer seems to be written in python2.

Am I looking at the wrong version or is there any workaround apart from converting the print statements (which seem to be the culprit for now?)

Please let me know.

AIstudentSH commented 4 years ago

May I ask how to modify the compatibility in py3? I can't find a suitable cPickle package.

vedanuj commented 4 years ago

After you update the submodule you can replace the refer.py with this https://gist.github.com/vedanuj/9d3497d107cfca0b6f3dfdc28d5cb226

That should work.

galsk87 commented 4 years ago

Have the same issue. I did what you said and I still get the error:

Traceback (most recent call last): File "eval_tasks.py", line 26, in from vilbert.task_utils import ( File "/home/gal/vilbert-multi-task/vilbert/task_utils.py", line 19, in from vilbert.datasets import DatasetMapTrain, DatasetMapEval File "/home/gal/vilbert-multi-task/vilbert/datasets/init.py", line 15, in from .refer_expression_dataset import ReferExpressionDataset File "/home/gal/vilbert-multi-task/vilbert/datasets/refer_expression_dataset.py", line 16, in from tools.refer.refer import REFER File "/home/gal/vilbert-multi-task/tools/refer/refer.py", line 40, in from .external import mask File "/home/gal/vilbert-multi-task/tools/refer/external/mask.py", line 3, in import external._mask as _mask ModuleNotFoundError: No module named 'external._mask'

RenShuhuai-Andy commented 4 years ago

I have the same issue @galsk87 How did you solve it?

galsk87 commented 4 years ago

I didn't

בתאריך יום ד׳, 16 בספט׳ 2020, 12:21, מאת Shuhuai Ren ‏< notifications@github.com>:

I have the same issue @galsk87 https://github.com/galsk87 How did you solve it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookresearch/vilbert-multi-task/issues/33#issuecomment-693284586, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGZQGMTQB4EC7BWXQVZIKC3SGB7SBANCNFSM4NACG44Q .

RenShuhuai-Andy commented 4 years ago
cd vilbert-multi-task/tools/refer
python setup.py install
make

It works for me. reference: https://github.com/cocodataset/cocoapi/issues/272