AILab-CVC / YOLO-World

[CVPR 2024] Real-Time Open-Vocabulary Object Detection
https://www.yoloworld.cc
GNU General Public License v3.0
4.06k stars 391 forks source link

Deployment Issue #4

Open CVHub520 opened 5 months ago

CVHub520 commented 5 months ago

Thank you very much for the excellent work done by the authors! I have a few questions and would like to discuss them:

  1. When attempting to perform inference using the exported ONNX model with ort, I encountered the following error:
Traceback (most recent call last):
  File "main_onnxruntime.py", line 111, in <module>
    main()
  File "main_onnxruntime.py", line 86, in main
    decoder_outputs = decoder(
  File "/home/cvhub/workspace/projects/python/detection/YOLO-World/yolo_world/easydeploy/examples/numpy_coder.py", line 43, in __call__
    feats = [
  File "/home/cvhub/workspace/projects/python/detection/YOLO-World/yolo_world/easydeploy/examples/numpy_coder.py", line 44, in <listcomp>
    np.ascontiguousarray(feat[0].transpose(1, 2, 0))
ValueError: axes don't match array

The relevant command used for running is:

python main_onnxruntime.py /home/cvhub/workspace/projects/python/detection/YOLO-World/third_party/mmyolo/demo/dog.jpg /home/cvhub/workspace/projects/python/detection/YOLO-World/work_dirs/yolow-l.onnx --type YOLOV5

Upon observation, the inference process seems normal, but there appears to be an issue with decoding.

  1. How can open vocabulary detection be supported? I noticed that the provided demo and running examples are based on the 80 classes of the COCO dataset for detection results.
drilistbox commented 5 months ago

where is the code?

wondervictor commented 5 months ago

@CVHub520 I'll check the exporting scripts and details soon. As for the vocabulary, you can define your own vocabulary/text prompts and input it in the text boxes. We adopt the COCO vocabulary as an example.

wondervictor commented 5 months ago

Hi @drilistbox, our code and models are available now!

CVHub520 commented 5 months ago

@CVHub520 I'll check the exporting scripts and details soon. As for the vocabulary, you can define your own vocabulary/text prompts and input it in the text boxes. We adopt the COCO vocabulary as an example.

Thank you for your patient reply. However, based on the ORT running example you provided, it seems that the option of text prompts is not supported, and this function can only be applied on the huggingface's online demo at present.

CVHub520 commented 5 months ago

Hello, @wondervictor, dear owner, excuse the interruption.

May I ask if there is any context available?

wondervictor commented 4 months ago

@drilistbox, @CVHub520 Hi all, we have updated the exporting scripts. You can have a try. If you have any questions, feel free to raise them.