facebookresearch / mmbt Goto Github PK
View Code? Open in Web Editor NEWSupervised Multimodal Bitransformers for Classifying Images and Text
License: Other
Supervised Multimodal Bitransformers for Classifying Images and Text
License: Other
Downloaded UPMC_Food101
, and trying to run the code for the food101
experiment. It seems the code needs json files for the dataset (which is not provided by dataset itself). How can I get them?
$ python mmbt/train.py --batch_sz 4 --gradient_accumulation_steps 40 --savedir mmbt/ --name mmbt_model_run --data_path mmbt/data/ --task food101 --task_type classification --model mmbt --num_image_embeds 3 --freeze_txt 5 --freeze_img 3 --patience 5 --dropout 0.1 --lr 5e-05 --warmup 0.1 --max_epochs 100 --seed 1
Traceback (most recent call last):
File "mmbt/train.py", line 280, in <module>
cli_main()
File "mmbt/train.py", line 272, in cli_main
train(args)
File "mmbt/train.py", line 183, in train
train_loader, val_loader, test_loaders = get_data_loaders(args)
File "/home/fb/mmbt/data/helpers.py", line 113, in get_data_loaders
os.path.join(args.data_path, args.task, "train.jsonl")
File "/home/fb/mmbt/data/helpers.py", line 40, in get_labels_and_frequencies
data_labels = [json.loads(line)["label"] for line in open(path)]
FileNotFoundError: [Errno 2] No such file or directory: 'mmbt/data/food101/train.jsonl'
Hello
Do you have an instructions to run MMBT on the GQA dataset?
I've tried to make changes in the repo but it doesn't seem to work.
I've tried to run with this CMD:
python mmbt/train.py --batch_sz 4 --gradient_accumulation_steps 40 --savedir /users/yonatan/mmbt/savedir --name mmbt_model_run --data_path /users/yonatan/gqa_data_and_images_dir --task food101 --task_type classification --model mmbt --num_image_embeds 3 --freeze_txt 5 --freeze_img 3 --patience 5 --dropout 0.1 --lr 5e-05 --warmup 0.1 --max_epochs 100 --seed 1
Thank you
In the MultimodalBertEncoder, the text and image embeddings order of concatentation does not match the comment:
encoder_input = torch.cat([img_embed_out, txt_embed_out], 1) # Bx(TEXT+IMG)xHID
Hi,
Can you please provide pretrained models for the different models/baselines used in the paper?
Hi,
I downloaded UPMC_Food101, and ran food_101.py. And I'm trying to run the code "train.py" for the food101 datasets.
It seems that the code need jsonl file named "test_hard_gt.jsonl".
Error is follows, please could you help me prepare "test_hard_gt.jsonl".
python mmbt/train.py --batch_sz 4 --gradient_accumulation_steps 40 --savedir savedir --name mmbt_model_run --data_path datasets --task food101 --task_type classification --model mmbt --num_image_embeds 3 --freeze_txt 5 --freeze_img 3 --patience 5 --dropout 0.1 --lr 5e-05 --warmup 0.1 --max_epochs 100 --seed 1
Traceback (most recent call last):
File "mmbt/train.py", line 280, in <module>
cli_main()
File "mmbt/train.py", line 272, in cli_main
train(args)
File "mmbt/train.py", line 183, in train
train_loader, val_loader, test_loaders = get_data_loaders(args)
File "E:\mmbt\mmbt\data\helpers.py", line 197, in get_data_loaders
args,
File "E:\mmbt\mmbt\data\dataset.py", line 23, in __init__
self.data = [json.loads(l) for l in open(data_path)]
FileNotFoundError: [Errno 2] No such file or directory: 'datasets\\food101\\test_hard_gt.jsonl'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.