recognize-anything icon indicating copy to clipboard operation
recognize-anything copied to clipboard

Demo: batch_inference.py: error: the following arguments are required: --checkpoint, --dataset

Open ooza opened this issue 1 year ago • 2 comments

Hi, Thanks a lot for making this great work available. I got this bug when working on your demo notebook You selected Tag2Text You selected multiple images usage: batch_inference.py [-h] --model-type {ram_plus,ram,tag2text} --checkpoint CHECKPOINT [--backbone {swin_l,swin_b}] [--open-set] --dataset {openimages_common_214,openimages_rare_200} [--input-size INPUT_SIZE] [--threshold THRESHOLD | --threshold-file THRESHOLD_FILE] [--output-dir OUTPUT_DIR] [--batch-size BATCH_SIZE] [--num-workers NUM_WORKERS] batch_inference.py: error: the following arguments are required: --checkpoint, --dataset code (from your notebook demo): elif model == "Tag2Text" and task == "multiple images": !python batch_inference.py --image-dir {images_dir} \ --pretrained pretrained/tag2text_swin_14m.pth --model-type tag2text I used these args : model = "Tag2Text" task = "multiple images" images_dir = "/data1/home/jupyter-ouza/VLM/images/onfire-subset" Am I missing something ?

ooza avatar Dec 10 '23 16:12 ooza

Hi, thanks for your attention. After continuous code iteration, it seems that the current Notebook demo does not support batch inference. I will try to fix it, but my busy schedule prevents me from completing it in the near feature. I recommend that you can directly run batch_inference.py. Best wishes.

xinyu1205 avatar Dec 11 '23 02:12 xinyu1205

@ooza #@title Clone the repository !git clone https://github.com/xinyu1205/recognize-anything.git %cd recognize-anything

You may use this right after importing the above;

!git checkout b3a48c64311d8d19503befe9c5f1360bc1bc6b51

satvikgarg27 avatar Dec 13 '23 21:12 satvikgarg27