Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: example max/examples/inference/yolo-python-onnx fails under WSL #260

Open
bmerkle opened this issue Dec 8, 2024 · 2 comments
Open
Labels
bug Something isn't working max-repo

Comments

@bmerkle
Copy link

bmerkle commented Dec 8, 2024

Bug description

I ran MAX examples under WSL. Everything works fine, except examples max/examples/inference/yolo-python-onnx
Note that my WSL currently does not have a video cam, so the example falls back to use the video file. (see also #259)
However this seems not to work 100%. error message:

Steps to reproduce

  • Include relevant code snippet or link to code that did not work as expected.
    start the example:
    (YOLO Python Onnx) merklbe1@DEAGM13714:~/max/examples/inference/yolo-python-onnx$ bash run.sh

  • If applicable, add screenshots to help explain the problem.
    Please see the errormsgs

(YOLO Python Onnx) merklbe1@DEAGM13714:~/max/examples/inference/yolo-python-onnx$ bash run.sh
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
Requirement already satisfied: networkx==3.1 in ./.magic/envs/default/lib/python3.12/site-packages (from -r requirements.txt (line 3)) (3.1)
....
....
Requirement already satisfied: six>=1.5 in ./.magic/envs/default/lib/python3.12/site-packages (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics==8.2.5->-r requirements.txt (line 7)) (1.17.0)
Skipping ../../models/yolo (already exists)
[ WARN:[email protected]] global cap_v4l.cpp:997 open VIDEOIO(V4L2:/dev/video0): can't open camera by index
[ERROR:[email protected]] global obsensor_uvc_stream_channel.cpp:159 getStreamChannelGroup Camera index out of range
Webcam was not available.
Falling back to video file segmentation.

Loading and compiling model...
Traceback (most recent call last):
  File "/home/merklbe1/max/examples/inference/yolo-python-onnx/segment.py", line 382, in <module>
    main()
  File "/home/merklbe1/max/examples/inference/yolo-python-onnx/segment.py", line 378, in main
    process_video(args)
  File "/home/merklbe1/max/examples/inference/yolo-python-onnx/segment.py", line 226, in process_video
    yolo = session.load(f"{args.model_dir}/yolov8n-seg.onnx")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/merklbe1/max/examples/inference/yolo-python-onnx/.magic/envs/default/lib/python3.12/site-packages/max/engine/api.py", line 587, in load
    _model = self._impl.compile_from_path(model_path, options_dict)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid path: ../../models/yolo/yolov8n-seg.onnx

System information

- What OS did you do install MAX on ? 
WSL on Windows 10
merklbe1@DEAGM13714:~$ uname -a
Linux DEAGM13714 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

- Provide version information for MAX by pasting the output of max -v`
max                 24.5.0

- Provide version information for Mojo by pasting the output of mojo -v`

- Provide Modular CLI version by pasting the output of `modular -v`
magic 0.5.0 - (based on pixi 0.37.0)
@bmerkle bmerkle added the bug Something isn't working label Dec 8, 2024
@ehsanmok
Copy link
Contributor

Thanks! this is a bit hard to reproduce due to lack of access to windows machine.

@bmerkle
Copy link
Author

bmerkle commented Dec 11, 2024

Thanks, i understand.
If you send me a hint/instruction how i can debug this, i can search the root cause or send log files.
I tried with -v or --verbose but this does not enable logging, and i did not found documentation about enable debug/logging

@goldiegadde goldiegadde added the max-repo label Dec 18, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working max-repo
Projects
None yet
Development

No branches or pull requests

3 participants