YOLO-World icon indicating copy to clipboard operation
YOLO-World copied to clipboard

Deployment Issue

Open CVHub520 opened this issue 1 year ago • 6 comments

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.

CVHub520 avatar Feb 01 '24 06:02 CVHub520

where is the code?

drilistbox avatar Feb 01 '24 06:02 drilistbox

@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 avatar Feb 02 '24 02:02 wondervictor

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

wondervictor avatar Feb 02 '24 02:02 wondervictor

@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 avatar Feb 02 '24 03:02 CVHub520

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

May I ask if there is any context available?

CVHub520 avatar Feb 04 '24 05:02 CVHub520

@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.

wondervictor avatar Mar 01 '24 12:03 wondervictor