yashkant / sam-textvqa

Official code for paper "Spatially Aware Multimodal Transformers for TextVQA" published at ECCV, 2020.
https://yashkant.github.io/projects/sam-textvqa
63 stars 13 forks source link

Unable to run your code in Colab #20

Closed kobrafarshidi closed 1 year ago

kobrafarshidi commented 1 year ago

Hi Mr @yashkant First of all thanks for your great code. I decided to run your code with Colab. So, I started with installing requirement packages, loading data and code in Colab as following image that I attached.

sam-1

But when I run your project with following code, it gives me below error. Should I change config file? If yes, I changed the code as below, but I can’t solve this problem.

!python /content/samtextvqa/train.py --config /content/samtextvqa/configs/train-tvqa-eval-tvqa-c3.yml --pretrained_eval /content/samtextvqa/data/pretrained-models/best_model.tar

Error that show me. File "/content/samtextvqa/sam/datasets/_image_features_reader.py", line 66, in __init__ self.env = lmdb.open( lmdb.Error: /samtextvqa/data/textvqa/tvqa_trainval_obj.lmdb: No such file or directory

Changed code in config file. /content/samtextvqa/data/textvqa/tvqa_{}_obj.lmdb

I'd be so appreciated if you could help me to solve this problem in running.

Regards

seuppp commented 1 year ago

Hi, @kobrafarshidi ,I am a graduate student from China. Due to various domestic reasons,I can not download datasets from Dropbox. Could you see if you can send the dataset to me through Baidu Netdisk? If I encounter problems similar to yours later, we can discuss them together. Thank you for your generous help!

kobrafarshidi commented 1 year ago

Hi, @Maxovovo and @yashkant actually I could solve this problem. The reason was that .lmdb files couldn't identify and extract .mdb files. So first of all, I downloaded .mdb files then put them in .lmdb file.

seuppp commented 1 year ago

Hi, @kobrafarshidi , I tried your method, but I still failded, here is my data structure: image After debugging, I found that I have problem in running code below, it is in _image_features_reader.py: image And my error below: image It seems like I can not read my .mdb file because it is already damaged or incomplete.

I download my .mdb file through this dropbox link provided by the author @yashkant , I guess the reason is because I am in China, I must use VPN to download and the VPN is unstable which result in these damaged .mdb files.

If you can obtain the. mdb files from another link, please let me know. Or can you send these .mdb files to me through Baidu Netdisk? (Baidu Netdisk is a domestic software in China, which is relatively more convenient for me to use). If you have a better way to transfer these .mdb files, please let me know. Thank you very much for your generous help.

A friend from China, Regards

kobrafarshidi commented 1 year ago

Hi @Maxovovo, Actually I wanted to join with that software, but I couldn't use that. Because I'm not from China and I can't use that. But if you have another way to be in contact you can use other software or send your email. But I've just sent codes that I use. I hope to help you. If you can use Colab and google drive, you can upload data in your google drive with following example codes. !wget -O /content/samtextvqa/data/textvqa/tvqa_test_imdb.npy https://www.dropbox.com/sh/dk6oubjlt2x7w0h/AAA0JiTo2qs9FVUaqusP9R3Ba/data/textvqa/tvqa_test_imdb.npy?dl=0 and then copy in your google drive with following code. !cp "path_data_in_colab" "/content/drive/MyDrive" You can test this to get files. I hope works for you.

seuppp commented 11 months ago

Hi @Maxovovo, Actually I wanted to join with that software, but I couldn't use that. Because I'm not from China and I can't use that. But if you have another way to be in contact you can use other software or send your email. But I've just sent codes that I use. I hope to help you. If you can use Colab and google drive, you can upload data in your google drive with following example codes. !wget -O /content/samtextvqa/data/textvqa/tvqa_test_imdb.npy https://www.dropbox.com/sh/dk6oubjlt2x7w0h/AAA0JiTo2qs9FVUaqusP9R3Ba/data/textvqa/tvqa_test_imdb.npy?dl=0 and then copy in your google drive with following code. !cp "path_data_in_colab" "/content/drive/MyDrive" You can test this to get files. I hope works for you.

Hi @kobrafarshidi , First of all, I am very sorry for my late reply, I was too busy a while ago. Now I run your command, and it shows that the resource no longer exists.

image

My email is boh7284@gmail.com, please contact me by email. We can exchange contact information in emails, which is more convenient than on GitHub or email.

Thank you very much again for your help. Looking forward to your reply!