baaivision / EVA

EVA Series: Visual Representation Fantasies from BAAI
MIT License
2.24k stars 165 forks source link

How to use EVA-02 detection models for inference? #139

Open Franklin905 opened 7 months ago

Franklin905 commented 7 months ago

Hi, authors. I am struggling with using the EVA-02 detection models for inference. Do you have example code available?

I ran the following command

python demo/demo.py \
    --config-file ./projects/ViTDet/configs/eva2_o365_to_lvis/eva2_o365_to_lvis_cascade_mask_rcnn_vitdet_l_8attn_1536_lrd0p8.py \
    --input ../Desktop/1.jpg \
    --output ./output_temp \
    --opts MODEL.WEIGHTS ./checkpoints/det/eva02_L_lvis_sys_o365.pth

but encountered issues below

File ".../anaconda3/envs/eva_02/lib/python3.10/site-packages/yaml/scanner.py", line 577, in fetch_value
    raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
  in "projects/ViTDet/configs/eva2_o365_to_lvis/eva2_o365_to_lvis_cascade_mask_rcnn_vitdet_l_8attn_1536_lrd0p8.py", line 54, column 44

I haven't found anyone asking this question in this repo or in the detectron2 repo, and I couldn't find a solution through Google.