baaivision / EVA

EVA Series: Visual Representation Fantasies from BAAI
MIT License
2.13k stars 150 forks source link

detection inference error #26

Closed sobikim closed 1 year ago

sobikim commented 1 year ago

Hi. Thx for the great work!

I tried detection inference with the following code

!python demo/demo.py \
    --config-file projects/ViTDet/configs/COCO/cascade_mask_rcnn_vitdet_eva.py \
    --input test.jpg \
    --output detect_test \
    --opts MODEL.WEIGHTS eva_coco_det.pth

And the following error occurred.

yaml.parser.ParserError: expected '<document start>', but found '<scalar>'
  in "projects\ViTDet\configs\COCO\cascade_mask_rcnn_vitdet_eva.py", line 6, column 5

Do you know why the error occurs? or Can you show me the detection inference sample code?

Thank you very much!

Yuxin-CV commented 1 year ago

Hi @sobikim, I believe this is essentially an Detectron2 issue which is not very much related to our work, and recently we have no plan to make a demo for object detection.

I suggest you refer to the awesome Detectron2 community for help.

sobikim commented 1 year ago

Ok. thank you for advice!

Franklin905 commented 5 months ago

Hi, sobikim and author. I am trying to use EVA-02 detection models for inference with a similar 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 encounter the error 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

Have you encountered this issue? Do you know how to use detection models for inference?