facebookresearch / mmbt

Supervised Multimodal Bitransformers for Classifying Images and Text
Other
243 stars 52 forks source link

train.jsonl for foo101 #1

Closed mahdiabavisani closed 4 years ago

mahdiabavisani commented 4 years ago

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'
SeaOfOcean commented 4 years ago

+1

sebastianffx commented 4 years ago

+1 It would be great if authors can provide a script to build the datasets from the raw sources. Thanks anyway for the great work!

pnnngchg commented 4 years ago

+1 Got the same problem. Waiting for the script. Thanks a lot!

apugoneappu commented 4 years ago

+1 It would be great if the required format for the dataset could be detailed in the README.

zhtsh commented 4 years ago

+1 It would be great if authors can provide a script to build the datasets from the raw sources.

suvrat96 commented 4 years ago

Hi everyone! I have added scripts for generating jsonl files for Food101 and MMIMDB datasets. Let me know if you run into any issues.

fiona-lxd commented 3 years ago

Hi everyone! I have added scripts for generating jsonl files for Food101 and MMIMDB datasets. Let me know if you run into any issues.

Can you provide the URLs for downloading Food101 and MMIMDB dataset?

douwekiela commented 3 years ago

Sure: